diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/CHANGELOG.md b/sdk/datamigration/azure-resourcemanager-datamigration/CHANGELOG.md
index d518ea66cb153..28dae6aa9cd8a 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/CHANGELOG.md
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-02-09)
+- Azure Resource Manager DataMigration client library for Java. This package contains Microsoft Azure SDK for DataMigration Management SDK. Data Migration Client. Package tag package-preview-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-04-14)
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/README.md b/sdk/datamigration/azure-resourcemanager-datamigration/README.md
index 901c66b0d0d07..7fd810e523ed0 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/README.md
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager DataMigration client library for Java.
-This package contains Microsoft Azure SDK for DataMigration Management SDK. Data Migration Client. Package tag package-2018-04-19. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for DataMigration Management SDK. Data Migration Client. Package tag package-preview-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-datamigration
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/datamigration/azure-resourcemanager-datamigration/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/SAMPLE.md b/sdk/datamigration/azure-resourcemanager-datamigration/SAMPLE.md
new file mode 100644
index 0000000000000..9df2aaa3d8bc2
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/SAMPLE.md
@@ -0,0 +1,1787 @@
+# Code snippets and samples
+
+
+## DatabaseMigrationsSqlMi
+
+- [Cancel](#databasemigrationssqlmi_cancel)
+- [CreateOrUpdate](#databasemigrationssqlmi_createorupdate)
+- [Cutover](#databasemigrationssqlmi_cutover)
+- [Get](#databasemigrationssqlmi_get)
+
+## DatabaseMigrationsSqlVm
+
+- [Cancel](#databasemigrationssqlvm_cancel)
+- [CreateOrUpdate](#databasemigrationssqlvm_createorupdate)
+- [Cutover](#databasemigrationssqlvm_cutover)
+- [Get](#databasemigrationssqlvm_get)
+
+## Files
+
+- [CreateOrUpdate](#files_createorupdate)
+- [Delete](#files_delete)
+- [Get](#files_get)
+- [List](#files_list)
+- [Read](#files_read)
+- [ReadWrite](#files_readwrite)
+- [Update](#files_update)
+
+## Operations
+
+- [List](#operations_list)
+
+## Projects
+
+- [CreateOrUpdate](#projects_createorupdate)
+- [Delete](#projects_delete)
+- [Get](#projects_get)
+- [List](#projects_list)
+- [Update](#projects_update)
+
+## ResourceSkus
+
+- [List](#resourceskus_list)
+
+## ServiceTasks
+
+- [Cancel](#servicetasks_cancel)
+- [CreateOrUpdate](#servicetasks_createorupdate)
+- [Delete](#servicetasks_delete)
+- [Get](#servicetasks_get)
+- [List](#servicetasks_list)
+- [Update](#servicetasks_update)
+
+## Services
+
+- [CheckChildrenNameAvailability](#services_checkchildrennameavailability)
+- [CheckNameAvailability](#services_checknameavailability)
+- [CheckStatus](#services_checkstatus)
+- [CreateOrUpdate](#services_createorupdate)
+- [Delete](#services_delete)
+- [GetByResourceGroup](#services_getbyresourcegroup)
+- [List](#services_list)
+- [ListByResourceGroup](#services_listbyresourcegroup)
+- [ListSkus](#services_listskus)
+- [Start](#services_start)
+- [Stop](#services_stop)
+- [Update](#services_update)
+
+## SqlMigrationServices
+
+- [CreateOrUpdate](#sqlmigrationservices_createorupdate)
+- [Delete](#sqlmigrationservices_delete)
+- [DeleteNode](#sqlmigrationservices_deletenode)
+- [GetByResourceGroup](#sqlmigrationservices_getbyresourcegroup)
+- [List](#sqlmigrationservices_list)
+- [ListAuthKeys](#sqlmigrationservices_listauthkeys)
+- [ListByResourceGroup](#sqlmigrationservices_listbyresourcegroup)
+- [ListMigrations](#sqlmigrationservices_listmigrations)
+- [ListMonitoringData](#sqlmigrationservices_listmonitoringdata)
+- [RegenerateAuthKeys](#sqlmigrationservices_regenerateauthkeys)
+- [Update](#sqlmigrationservices_update)
+
+## Tasks
+
+- [Cancel](#tasks_cancel)
+- [Command](#tasks_command)
+- [CreateOrUpdate](#tasks_createorupdate)
+- [Delete](#tasks_delete)
+- [Get](#tasks_get)
+- [List](#tasks_list)
+- [Update](#tasks_update)
+
+## Usages
+
+- [List](#usages_list)
+### DatabaseMigrationsSqlMi_Cancel
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+/** Samples for DatabaseMigrationsSqlMi Cancel. */
+public final class DatabaseMigrationsSqlMiCancelSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlMiCancelDatabaseMigration.json
+ */
+ /**
+ * Sample code: Stop ongoing migration for the database.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void stopOngoingMigrationForTheDatabase(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .databaseMigrationsSqlMis()
+ .cancel(
+ "testrg",
+ "managedInstance1",
+ "db1",
+ new MigrationOperationInput()
+ .withMigrationOperationId(UUID.fromString("4124fe90-d1b6-4b50-b4d9-46d02381f59a")),
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseMigrationsSqlMi_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.datamigration.models.BackupConfiguration;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationPropertiesSqlMi;
+import com.azure.resourcemanager.datamigration.models.OfflineConfiguration;
+import com.azure.resourcemanager.datamigration.models.SourceLocation;
+import com.azure.resourcemanager.datamigration.models.SqlConnectionInformation;
+import com.azure.resourcemanager.datamigration.models.SqlFileShare;
+import com.azure.resourcemanager.datamigration.models.TargetLocation;
+
+/** Samples for DatabaseMigrationsSqlMi CreateOrUpdate. */
+public final class DatabaseMigrationsSqlMiCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlMiCreateOrUpdateDatabaseMigrationMAX.json
+ */
+ /**
+ * Sample code: Create or Update Database Migration resource with Maximum parameters.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void createOrUpdateDatabaseMigrationResourceWithMaximumParameters(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .databaseMigrationsSqlMis()
+ .define("db1")
+ .withExistingManagedInstance("testrg", "managedInstance1")
+ .withProperties(
+ new DatabaseMigrationPropertiesSqlMi()
+ .withScope(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/instance")
+ .withSourceSqlConnection(
+ new SqlConnectionInformation()
+ .withDataSource("aaa")
+ .withAuthentication("WindowsAuthentication")
+ .withUsername("bbb")
+ .withPassword("placeholder")
+ .withEncryptConnection(true)
+ .withTrustServerCertificate(true))
+ .withSourceDatabaseName("aaa")
+ .withMigrationService(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent")
+ .withBackupConfiguration(
+ new BackupConfiguration()
+ .withSourceLocation(
+ new SourceLocation()
+ .withFileShare(
+ new SqlFileShare()
+ .withPath("C:\\aaa\\bbb\\ccc")
+ .withUsername("name")
+ .withPassword("placeholder")))
+ .withTargetLocation(
+ new TargetLocation()
+ .withStorageAccountResourceId("account.database.windows.net")
+ .withAccountKey("abcd")))
+ .withOfflineConfiguration(
+ new OfflineConfiguration().withOffline(true).withLastBackupName("last_backup_file_name")))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlMiCreateOrUpdateDatabaseMigrationMIN.json
+ */
+ /**
+ * Sample code: Create or Update Database Migration resource with Minimum parameters.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void createOrUpdateDatabaseMigrationResourceWithMinimumParameters(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .databaseMigrationsSqlMis()
+ .define("db1")
+ .withExistingManagedInstance("testrg", "managedInstance1")
+ .withProperties(
+ new DatabaseMigrationPropertiesSqlMi()
+ .withScope(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/instance")
+ .withSourceSqlConnection(
+ new SqlConnectionInformation()
+ .withDataSource("aaa")
+ .withAuthentication("WindowsAuthentication")
+ .withUsername("bbb")
+ .withPassword("placeholder")
+ .withEncryptConnection(true)
+ .withTrustServerCertificate(true))
+ .withSourceDatabaseName("aaa")
+ .withMigrationService(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent")
+ .withBackupConfiguration(
+ new BackupConfiguration()
+ .withSourceLocation(
+ new SourceLocation()
+ .withFileShare(
+ new SqlFileShare()
+ .withPath("C:\\aaa\\bbb\\ccc")
+ .withUsername("name")
+ .withPassword("placeholder")))
+ .withTargetLocation(
+ new TargetLocation()
+ .withStorageAccountResourceId("account.database.windows.net")
+ .withAccountKey("abcd")))
+ .withOfflineConfiguration(
+ new OfflineConfiguration().withOffline(true).withLastBackupName("last_backup_file_name")))
+ .create();
+ }
+}
+```
+
+### DatabaseMigrationsSqlMi_Cutover
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+/** Samples for DatabaseMigrationsSqlMi Cutover. */
+public final class DatabaseMigrationsSqlMiCutoverSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlMiCutoverDatabaseMigration.json
+ */
+ /**
+ * Sample code: Cutover online migration operation for the database.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void cutoverOnlineMigrationOperationForTheDatabase(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .databaseMigrationsSqlMis()
+ .cutover(
+ "testrg",
+ "managedInstance1",
+ "db1",
+ new MigrationOperationInput()
+ .withMigrationOperationId(UUID.fromString("4124fe90-d1b6-4b50-b4d9-46d02381f59a")),
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseMigrationsSqlMi_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseMigrationsSqlMi Get. */
+public final class DatabaseMigrationsSqlMiGetSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlMiGetDatabaseMigrationExpanded.json
+ */
+ /**
+ * Sample code: Get Sql MI database Migration with the expand parameter.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void getSqlMIDatabaseMigrationWithTheExpandParameter(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .databaseMigrationsSqlMis()
+ .getWithResponse("testrg", "managedInstance1", "db1", null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlMiGetDatabaseMigration.json
+ */
+ /**
+ * Sample code: Get Sql MI database Migration without the expand parameter.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void getSqlMIDatabaseMigrationWithoutTheExpandParameter(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .databaseMigrationsSqlMis()
+ .getWithResponse("testrg", "managedInstance1", "db1", null, null, Context.NONE);
+ }
+}
+```
+
+### DatabaseMigrationsSqlVm_Cancel
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+/** Samples for DatabaseMigrationsSqlVm Cancel. */
+public final class DatabaseMigrationsSqlVmCancelSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlVmCancelDatabaseMigration.json
+ */
+ /**
+ * Sample code: Stop ongoing migration for the database.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void stopOngoingMigrationForTheDatabase(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .databaseMigrationsSqlVms()
+ .cancel(
+ "testrg",
+ "testvm",
+ "db1",
+ new MigrationOperationInput()
+ .withMigrationOperationId(UUID.fromString("4124fe90-d1b6-4b50-b4d9-46d02381f59a")),
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseMigrationsSqlVm_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.datamigration.models.BackupConfiguration;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationPropertiesSqlVm;
+import com.azure.resourcemanager.datamigration.models.OfflineConfiguration;
+import com.azure.resourcemanager.datamigration.models.SourceLocation;
+import com.azure.resourcemanager.datamigration.models.SqlConnectionInformation;
+import com.azure.resourcemanager.datamigration.models.SqlFileShare;
+import com.azure.resourcemanager.datamigration.models.TargetLocation;
+
+/** Samples for DatabaseMigrationsSqlVm CreateOrUpdate. */
+public final class DatabaseMigrationsSqlVmCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlVmCreateOrUpdateDatabaseMigrationMAX.json
+ */
+ /**
+ * Sample code: Create or Update Database Migration resource with Maximum parameters.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void createOrUpdateDatabaseMigrationResourceWithMaximumParameters(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .databaseMigrationsSqlVms()
+ .define("db1")
+ .withExistingSqlVirtualMachine("testrg", "testvm")
+ .withProperties(
+ new DatabaseMigrationPropertiesSqlVm()
+ .withScope(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm")
+ .withSourceSqlConnection(
+ new SqlConnectionInformation()
+ .withDataSource("aaa")
+ .withAuthentication("WindowsAuthentication")
+ .withUsername("bbb")
+ .withPassword("placeholder")
+ .withEncryptConnection(true)
+ .withTrustServerCertificate(true))
+ .withSourceDatabaseName("aaa")
+ .withMigrationService(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent")
+ .withBackupConfiguration(
+ new BackupConfiguration()
+ .withSourceLocation(
+ new SourceLocation()
+ .withFileShare(
+ new SqlFileShare()
+ .withPath("C:\\aaa\\bbb\\ccc")
+ .withUsername("name")
+ .withPassword("placeholder")))
+ .withTargetLocation(
+ new TargetLocation()
+ .withStorageAccountResourceId("account.database.windows.net")
+ .withAccountKey("abcd")))
+ .withOfflineConfiguration(
+ new OfflineConfiguration().withOffline(true).withLastBackupName("last_backup_file_name")))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlVmCreateOrUpdateDatabaseMigrationMIN.json
+ */
+ /**
+ * Sample code: Create or Update Database Migration resource with Minimum parameters.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void createOrUpdateDatabaseMigrationResourceWithMinimumParameters(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .databaseMigrationsSqlVms()
+ .define("db1")
+ .withExistingSqlVirtualMachine("testrg", "testvm")
+ .withProperties(
+ new DatabaseMigrationPropertiesSqlVm()
+ .withScope(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm")
+ .withSourceSqlConnection(
+ new SqlConnectionInformation()
+ .withDataSource("aaa")
+ .withAuthentication("WindowsAuthentication")
+ .withUsername("bbb")
+ .withPassword("placeholder")
+ .withEncryptConnection(true)
+ .withTrustServerCertificate(true))
+ .withSourceDatabaseName("aaa")
+ .withMigrationService(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent")
+ .withBackupConfiguration(
+ new BackupConfiguration()
+ .withSourceLocation(
+ new SourceLocation()
+ .withFileShare(
+ new SqlFileShare()
+ .withPath("C:\\aaa\\bbb\\ccc")
+ .withUsername("name")
+ .withPassword("placeholder")))
+ .withTargetLocation(
+ new TargetLocation()
+ .withStorageAccountResourceId("account.database.windows.net")
+ .withAccountKey("abcd")))
+ .withOfflineConfiguration(
+ new OfflineConfiguration().withOffline(true).withLastBackupName("last_backup_file_name")))
+ .create();
+ }
+}
+```
+
+### DatabaseMigrationsSqlVm_Cutover
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+/** Samples for DatabaseMigrationsSqlVm Cutover. */
+public final class DatabaseMigrationsSqlVmCutoverSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlVmCutoverDatabaseMigration.json
+ */
+ /**
+ * Sample code: Cutover online migration operation for the database.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void cutoverOnlineMigrationOperationForTheDatabase(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .databaseMigrationsSqlVms()
+ .cutover(
+ "testrg",
+ "testvm",
+ "db1",
+ new MigrationOperationInput()
+ .withMigrationOperationId(UUID.fromString("4124fe90-d1b6-4b50-b4d9-46d02381f59a")),
+ Context.NONE);
+ }
+}
+```
+
+### DatabaseMigrationsSqlVm_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DatabaseMigrationsSqlVm Get. */
+public final class DatabaseMigrationsSqlVmGetSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlVmGetDatabaseMigrationExpanded.json
+ */
+ /**
+ * Sample code: Get Sql VM database Migration with the expand parameter.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void getSqlVMDatabaseMigrationWithTheExpandParameter(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.databaseMigrationsSqlVms().getWithResponse("testrg", "testvm", "db1", null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/SqlVmGetDatabaseMigration.json
+ */
+ /**
+ * Sample code: Get Sql VM database Migration without the expand parameter.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void getSqlVMDatabaseMigrationWithoutTheExpandParameter(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.databaseMigrationsSqlVms().getWithResponse("testrg", "testvm", "db1", null, null, Context.NONE);
+ }
+}
+```
+
+### Files_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.datamigration.models.ProjectFileProperties;
+
+/** Samples for Files CreateOrUpdate. */
+public final class FilesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Files_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Files_CreateOrUpdate.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void filesCreateOrUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .files()
+ .define("x114d023d8")
+ .withExistingProject("DmsSdkRg", "DmsSdkService", "DmsSdkProject")
+ .withProperties(new ProjectFileProperties().withFilePath("DmsSdkFilePath/DmsSdkFile.sql"))
+ .create();
+ }
+}
+```
+
+### Files_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Files Delete. */
+public final class FilesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Files_Delete.json
+ */
+ /**
+ * Sample code: Files_Delete.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void filesDelete(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.files().deleteWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", "x114d023d8", Context.NONE);
+ }
+}
+```
+
+### Files_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Files Get. */
+public final class FilesGetSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Files_Get.json
+ */
+ /**
+ * Sample code: Files_List.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void filesList(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.files().getWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", "x114d023d8", Context.NONE);
+ }
+}
+```
+
+### Files_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Files List. */
+public final class FilesListSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Files_List.json
+ */
+ /**
+ * Sample code: Files_List.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void filesList(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.files().list("DmsSdkRg", "DmsSdkService", "DmsSdkProject", Context.NONE);
+ }
+}
+```
+
+### Files_Read
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Files Read. */
+public final class FilesReadSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Files_Read.json
+ */
+ /**
+ * Sample code: Files_List.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void filesList(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.files().readWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", "x114d023d8", Context.NONE);
+ }
+}
+```
+
+### Files_ReadWrite
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Files ReadWrite. */
+public final class FilesReadWriteSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Files_ReadWrite.json
+ */
+ /**
+ * Sample code: Files_List.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void filesList(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.files().readWriteWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", "x114d023d8", Context.NONE);
+ }
+}
+```
+
+### Files_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.ProjectFile;
+import com.azure.resourcemanager.datamigration.models.ProjectFileProperties;
+
+/** Samples for Files Update. */
+public final class FilesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Files_Update.json
+ */
+ /**
+ * Sample code: Files_Update.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void filesUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ ProjectFile resource =
+ manager
+ .files()
+ .getWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", "x114d023d8", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(new ProjectFileProperties().withFilePath("DmsSdkFilePath/DmsSdkFile.sql"))
+ .apply();
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ListOperation.json
+ */
+ /**
+ * Sample code: Lists all of the available SQL Rest API operations.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void listsAllOfTheAvailableSQLRestAPIOperations(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### Projects_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.datamigration.models.ProjectSourcePlatform;
+import com.azure.resourcemanager.datamigration.models.ProjectTargetPlatform;
+
+/** Samples for Projects CreateOrUpdate. */
+public final class ProjectsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Projects_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Projects_CreateOrUpdate.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void projectsCreateOrUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .projects()
+ .define("DmsSdkProject")
+ .withRegion("southcentralus")
+ .withExistingService("DmsSdkRg", "DmsSdkService")
+ .withSourcePlatform(ProjectSourcePlatform.SQL)
+ .withTargetPlatform(ProjectTargetPlatform.SQLDB)
+ .create();
+ }
+}
+```
+
+### Projects_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Projects Delete. */
+public final class ProjectsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Projects_Delete.json
+ */
+ /**
+ * Sample code: Projects_Delete.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void projectsDelete(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.projects().deleteWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", null, Context.NONE);
+ }
+}
+```
+
+### Projects_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Projects Get. */
+public final class ProjectsGetSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Projects_Get.json
+ */
+ /**
+ * Sample code: Projects_Get.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void projectsGet(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.projects().getWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", Context.NONE);
+ }
+}
+```
+
+### Projects_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Projects List. */
+public final class ProjectsListSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Projects_List.json
+ */
+ /**
+ * Sample code: Projects_List.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void projectsList(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.projects().list("DmsSdkRg", "DmsSdkService", Context.NONE);
+ }
+}
+```
+
+### Projects_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.Project;
+import com.azure.resourcemanager.datamigration.models.ProjectSourcePlatform;
+import com.azure.resourcemanager.datamigration.models.ProjectTargetPlatform;
+
+/** Samples for Projects Update. */
+public final class ProjectsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Projects_Update.json
+ */
+ /**
+ * Sample code: Projects_Update.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void projectsUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ Project resource =
+ manager.projects().getWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", Context.NONE).getValue();
+ resource
+ .update()
+ .withSourcePlatform(ProjectSourcePlatform.SQL)
+ .withTargetPlatform(ProjectTargetPlatform.SQLDB)
+ .apply();
+ }
+}
+```
+
+### ResourceSkus_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceSkus List. */
+public final class ResourceSkusListSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ResourceSkus_ListSkus.json
+ */
+ /**
+ * Sample code: ListSkus.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void listSkus(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.resourceSkus().list(Context.NONE);
+ }
+}
+```
+
+### ServiceTasks_Cancel
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceTasks Cancel. */
+public final class ServiceTasksCancelSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ServiceTasks_Cancel.json
+ */
+ /**
+ * Sample code: Tasks_Cancel.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksCancel(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.serviceTasks().cancelWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkTask", Context.NONE);
+ }
+}
+```
+
+### ServiceTasks_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner;
+import com.azure.resourcemanager.datamigration.models.CheckOciDriverTaskInput;
+import com.azure.resourcemanager.datamigration.models.CheckOciDriverTaskProperties;
+
+/** Samples for ServiceTasks CreateOrUpdate. */
+public final class ServiceTasksCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ServiceTasks_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Tasks_CreateOrUpdate.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksCreateOrUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .serviceTasks()
+ .createOrUpdateWithResponse(
+ "DmsSdkRg",
+ "DmsSdkService",
+ "DmsSdkTask",
+ new ProjectTaskInner()
+ .withProperties(
+ new CheckOciDriverTaskProperties()
+ .withInput(new CheckOciDriverTaskInput().withServerVersion("NA"))),
+ Context.NONE);
+ }
+}
+```
+
+### ServiceTasks_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceTasks Delete. */
+public final class ServiceTasksDeleteSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ServiceTasks_Delete.json
+ */
+ /**
+ * Sample code: Tasks_Delete.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksDelete(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.serviceTasks().deleteWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkTask", null, Context.NONE);
+ }
+}
+```
+
+### ServiceTasks_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceTasks Get. */
+public final class ServiceTasksGetSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ServiceTasks_Get.json
+ */
+ /**
+ * Sample code: Tasks_Get.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksGet(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.serviceTasks().getWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkTask", null, Context.NONE);
+ }
+}
+```
+
+### ServiceTasks_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ServiceTasks List. */
+public final class ServiceTasksListSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ServiceTasks_List.json
+ */
+ /**
+ * Sample code: ServiceTasks_List.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void serviceTasksList(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.serviceTasks().list("DmsSdkRg", "DmsSdkService", null, Context.NONE);
+ }
+}
+```
+
+### ServiceTasks_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner;
+import com.azure.resourcemanager.datamigration.models.CheckOciDriverTaskInput;
+import com.azure.resourcemanager.datamigration.models.CheckOciDriverTaskProperties;
+
+/** Samples for ServiceTasks Update. */
+public final class ServiceTasksUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ServiceTasks_Update.json
+ */
+ /**
+ * Sample code: Tasks_Update.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .serviceTasks()
+ .updateWithResponse(
+ "DmsSdkRg",
+ "DmsSdkService",
+ "DmsSdkTask",
+ new ProjectTaskInner()
+ .withProperties(
+ new CheckOciDriverTaskProperties()
+ .withInput(new CheckOciDriverTaskInput().withServerVersion("NA"))),
+ Context.NONE);
+ }
+}
+```
+
+### Services_CheckChildrenNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.NameAvailabilityRequest;
+
+/** Samples for Services CheckChildrenNameAvailability. */
+public final class ServicesCheckChildrenNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_CheckChildrenNameAvailability.json
+ */
+ /**
+ * Sample code: Services_CheckChildrenNameAvailability.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesCheckChildrenNameAvailability(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .services()
+ .checkChildrenNameAvailabilityWithResponse(
+ "DmsSdkRg",
+ "DmsSdkService",
+ new NameAvailabilityRequest().withName("Task1").withType("tasks"),
+ Context.NONE);
+ }
+}
+```
+
+### Services_CheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.NameAvailabilityRequest;
+
+/** Samples for Services CheckNameAvailability. */
+public final class ServicesCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_CheckNameAvailability.json
+ */
+ /**
+ * Sample code: Services_CheckNameAvailability.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesCheckNameAvailability(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .services()
+ .checkNameAvailabilityWithResponse(
+ "eastus", new NameAvailabilityRequest().withName("DmsSdkService").withType("services"), Context.NONE);
+ }
+}
+```
+
+### Services_CheckStatus
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services CheckStatus. */
+public final class ServicesCheckStatusSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_CheckStatus.json
+ */
+ /**
+ * Sample code: Services_CheckStatus.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesCheckStatus(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.services().checkStatusWithResponse("DmsSdkRg", "DmsSdkService", Context.NONE);
+ }
+}
+```
+
+### Services_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.datamigration.models.ServiceSku;
+
+/** Samples for Services CreateOrUpdate. */
+public final class ServicesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Services_CreateOrUpdate.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesCreateOrUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .services()
+ .define("DmsSdkService")
+ .withRegion("southcentralus")
+ .withExistingResourceGroup("DmsSdkRg")
+ .withSku(new ServiceSku().withName("Basic_1vCore"))
+ .withVirtualSubnetId(
+ "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default")
+ .create();
+ }
+}
+```
+
+### Services_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services Delete. */
+public final class ServicesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_Delete.json
+ */
+ /**
+ * Sample code: Services_CreateOrUpdate.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesCreateOrUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.services().delete("DmsSdkRg", "DmsSdkService", null, Context.NONE);
+ }
+}
+```
+
+### Services_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services GetByResourceGroup. */
+public final class ServicesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_Get.json
+ */
+ /**
+ * Sample code: Services_CreateOrUpdate.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesCreateOrUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.services().getByResourceGroupWithResponse("DmsSdkRg", "DmsSdkService", Context.NONE);
+ }
+}
+```
+
+### Services_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services List. */
+public final class ServicesListSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_List.json
+ */
+ /**
+ * Sample code: Services_List.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesList(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.services().list(Context.NONE);
+ }
+}
+```
+
+### Services_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services ListByResourceGroup. */
+public final class ServicesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_ListByResourceGroup.json
+ */
+ /**
+ * Sample code: Services_ListByResourceGroup.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesListByResourceGroup(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.services().listByResourceGroup("DmsSdkRg", Context.NONE);
+ }
+}
+```
+
+### Services_ListSkus
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services ListSkus. */
+public final class ServicesListSkusSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_ListSkus.json
+ */
+ /**
+ * Sample code: Services_ListSkus.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesListSkus(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.services().listSkus("DmsSdkRg", "DmsSdkService", Context.NONE);
+ }
+}
+```
+
+### Services_Start
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services Start. */
+public final class ServicesStartSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_Start.json
+ */
+ /**
+ * Sample code: Services_Start.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesStart(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.services().start("DmsSdkRg", "DmsSdkService", Context.NONE);
+ }
+}
+```
+
+### Services_Stop
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services Stop. */
+public final class ServicesStopSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_Stop.json
+ */
+ /**
+ * Sample code: Services_Stop.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesStop(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.services().stop("DmsSdkRg", "DmsSdkService", Context.NONE);
+ }
+}
+```
+
+### Services_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.DataMigrationService;
+
+/** Samples for Services Update. */
+public final class ServicesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Services_Update.json
+ */
+ /**
+ * Sample code: Services_CreateOrUpdate.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesCreateOrUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ DataMigrationService resource =
+ manager.services().getByResourceGroupWithResponse("DmsSdkRg", "DmsSdkService", Context.NONE).getValue();
+ resource
+ .update()
+ .withVirtualSubnetId(
+ "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default")
+ .apply();
+ }
+}
+```
+
+### SqlMigrationServices_CreateOrUpdate
+
+```java
+/** Samples for SqlMigrationServices CreateOrUpdate. */
+public final class SqlMigrationServicesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/CreateOrUpdateMigrationServiceMAX.json
+ */
+ /**
+ * Sample code: Create or Update SQL Migration Service with maximum parameters.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void createOrUpdateSQLMigrationServiceWithMaximumParameters(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .sqlMigrationServices()
+ .define("testagent")
+ .withRegion("northeurope")
+ .withExistingResourceGroup("testrg")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/CreateOrUpdateMigrationServiceMIN.json
+ */
+ /**
+ * Sample code: Create or Update SQL Migration Service with minimum parameters.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void createOrUpdateSQLMigrationServiceWithMinimumParameters(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .sqlMigrationServices()
+ .define("testagent")
+ .withRegion("northeurope")
+ .withExistingResourceGroup("testrg")
+ .create();
+ }
+}
+```
+
+### SqlMigrationServices_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlMigrationServices Delete. */
+public final class SqlMigrationServicesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/DeleteMigrationService.json
+ */
+ /**
+ * Sample code: Delete SQL Migration Service.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void deleteSQLMigrationService(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.sqlMigrationServices().delete("testrg", "service1", Context.NONE);
+ }
+}
+```
+
+### SqlMigrationServices_DeleteNode
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.fluent.models.DeleteNodeInner;
+
+/** Samples for SqlMigrationServices DeleteNode. */
+public final class SqlMigrationServicesDeleteNodeSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/DeleteIntegrationRuntimeNode.json
+ */
+ /**
+ * Sample code: Delete the integration runtime node.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void deleteTheIntegrationRuntimeNode(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .sqlMigrationServices()
+ .deleteNodeWithResponse(
+ "testrg",
+ "service1",
+ new DeleteNodeInner().withNodeName("nodeName").withIntegrationRuntimeName("IRName"),
+ Context.NONE);
+ }
+}
+```
+
+### SqlMigrationServices_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlMigrationServices GetByResourceGroup. */
+public final class SqlMigrationServicesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/GetMigrationService.json
+ */
+ /**
+ * Sample code: Get Migration Service.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void getMigrationService(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.sqlMigrationServices().getByResourceGroupWithResponse("testrg", "service1", Context.NONE);
+ }
+}
+```
+
+### SqlMigrationServices_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlMigrationServices List. */
+public final class SqlMigrationServicesListSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ListBySubscriptionMigrationService.json
+ */
+ /**
+ * Sample code: Get Services in the Subscriptions.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void getServicesInTheSubscriptions(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.sqlMigrationServices().list(Context.NONE);
+ }
+}
+```
+
+### SqlMigrationServices_ListAuthKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlMigrationServices ListAuthKeys. */
+public final class SqlMigrationServicesListAuthKeysSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ListAuthKeysMigrationService.json
+ */
+ /**
+ * Sample code: Retrieve the List of Authentication Keys.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void retrieveTheListOfAuthenticationKeys(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.sqlMigrationServices().listAuthKeysWithResponse("testrg", "service1", Context.NONE);
+ }
+}
+```
+
+### SqlMigrationServices_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlMigrationServices ListByResourceGroup. */
+public final class SqlMigrationServicesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ListByResourceGroupMigrationService.json
+ */
+ /**
+ * Sample code: Get Migration Services in the Resource Group.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void getMigrationServicesInTheResourceGroup(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.sqlMigrationServices().listByResourceGroup("testrg", Context.NONE);
+ }
+}
+```
+
+### SqlMigrationServices_ListMigrations
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlMigrationServices ListMigrations. */
+public final class SqlMigrationServicesListMigrationsSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/ListMigrationsByMigrationService.json
+ */
+ /**
+ * Sample code: List database migrations attached to the service.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void listDatabaseMigrationsAttachedToTheService(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.sqlMigrationServices().listMigrations("testrg", "service1", Context.NONE);
+ }
+}
+```
+
+### SqlMigrationServices_ListMonitoringData
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlMigrationServices ListMonitoringData. */
+public final class SqlMigrationServicesListMonitoringDataSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/GetMonitorDataMigrationService.json
+ */
+ /**
+ * Sample code: Retrieve the Monitoring Data.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void retrieveTheMonitoringData(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.sqlMigrationServices().listMonitoringDataWithResponse("testrg", "service1", Context.NONE);
+ }
+}
+```
+
+### SqlMigrationServices_RegenerateAuthKeys
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.fluent.models.RegenAuthKeysInner;
+
+/** Samples for SqlMigrationServices RegenerateAuthKeys. */
+public final class SqlMigrationServicesRegenerateAuthKeysSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/RegenAuthKeysMigrationService.json
+ */
+ /**
+ * Sample code: Regenerate the of Authentication Keys.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void regenerateTheOfAuthenticationKeys(
+ com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .sqlMigrationServices()
+ .regenerateAuthKeysWithResponse(
+ "testrg", "service1", new RegenAuthKeysInner().withKeyName("authKey1"), Context.NONE);
+ }
+}
+```
+
+### SqlMigrationServices_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.SqlMigrationService;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SqlMigrationServices Update. */
+public final class SqlMigrationServicesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/UpdateMigrationService.json
+ */
+ /**
+ * Sample code: Update SQL Migration Service.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void updateSQLMigrationService(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ SqlMigrationService resource =
+ manager
+ .sqlMigrationServices()
+ .getByResourceGroupWithResponse("testrg", "testagent", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("mytag", "myval")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Tasks_Cancel
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Tasks Cancel. */
+public final class TasksCancelSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Tasks_Cancel.json
+ */
+ /**
+ * Sample code: Tasks_Cancel.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksCancel(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.tasks().cancelWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", "DmsSdkTask", Context.NONE);
+ }
+}
+```
+
+### Tasks_Command
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.MigrateSyncCompleteCommandInput;
+import com.azure.resourcemanager.datamigration.models.MigrateSyncCompleteCommandProperties;
+
+/** Samples for Tasks Command. */
+public final class TasksCommandSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Tasks_Command.json
+ */
+ /**
+ * Sample code: Tasks_Command.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksCommand(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .tasks()
+ .commandWithResponse(
+ "DmsSdkRg",
+ "DmsSdkService",
+ "DmsSdkProject",
+ "DmsSdkTask",
+ new MigrateSyncCompleteCommandProperties()
+ .withInput(new MigrateSyncCompleteCommandInput().withDatabaseName("TestDatabase")),
+ Context.NONE);
+ }
+}
+```
+
+### Tasks_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.datamigration.models.AuthenticationType;
+import com.azure.resourcemanager.datamigration.models.ConnectToTargetSqlDbTaskInput;
+import com.azure.resourcemanager.datamigration.models.ConnectToTargetSqlDbTaskProperties;
+import com.azure.resourcemanager.datamigration.models.SqlConnectionInfo;
+
+/** Samples for Tasks CreateOrUpdate. */
+public final class TasksCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Tasks_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Tasks_CreateOrUpdate.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksCreateOrUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .tasks()
+ .define("DmsSdkTask")
+ .withExistingProject("DmsSdkRg", "DmsSdkService", "DmsSdkProject")
+ .withProperties(
+ new ConnectToTargetSqlDbTaskProperties()
+ .withInput(
+ new ConnectToTargetSqlDbTaskInput()
+ .withTargetConnectionInfo(
+ new SqlConnectionInfo()
+ .withUsername("testuser")
+ .withPassword("testpassword")
+ .withDataSource("ssma-test-server.database.windows.net")
+ .withAuthentication(AuthenticationType.SQL_AUTHENTICATION)
+ .withEncryptConnection(true)
+ .withTrustServerCertificate(true))))
+ .create();
+ }
+}
+```
+
+### Tasks_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Tasks Delete. */
+public final class TasksDeleteSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Tasks_Delete.json
+ */
+ /**
+ * Sample code: Tasks_Delete.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksDelete(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager
+ .tasks()
+ .deleteWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", "DmsSdkTask", null, Context.NONE);
+ }
+}
+```
+
+### Tasks_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Tasks Get. */
+public final class TasksGetSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Tasks_Get.json
+ */
+ /**
+ * Sample code: Tasks_Get.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksGet(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.tasks().getWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", "DmsSdkTask", null, Context.NONE);
+ }
+}
+```
+
+### Tasks_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Tasks List. */
+public final class TasksListSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Tasks_List.json
+ */
+ /**
+ * Sample code: Tasks_List.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksList(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.tasks().list("DmsSdkRg", "DmsSdkService", "DmsSdkProject", null, Context.NONE);
+ }
+}
+```
+
+### Tasks_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.models.AuthenticationType;
+import com.azure.resourcemanager.datamigration.models.ConnectToTargetSqlDbTaskInput;
+import com.azure.resourcemanager.datamigration.models.ConnectToTargetSqlDbTaskProperties;
+import com.azure.resourcemanager.datamigration.models.ProjectTask;
+import com.azure.resourcemanager.datamigration.models.SqlConnectionInfo;
+
+/** Samples for Tasks Update. */
+public final class TasksUpdateSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Tasks_Update.json
+ */
+ /**
+ * Sample code: Tasks_Update.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void tasksUpdate(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ ProjectTask resource =
+ manager
+ .tasks()
+ .getWithResponse("DmsSdkRg", "DmsSdkService", "DmsSdkProject", "DmsSdkTask", null, Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new ConnectToTargetSqlDbTaskProperties()
+ .withInput(
+ new ConnectToTargetSqlDbTaskInput()
+ .withTargetConnectionInfo(
+ new SqlConnectionInfo()
+ .withUsername("testuser")
+ .withPassword("testpassword")
+ .withDataSource("ssma-test-server.database.windows.net")
+ .withAuthentication(AuthenticationType.SQL_AUTHENTICATION)
+ .withEncryptConnection(true)
+ .withTrustServerCertificate(true))))
+ .apply();
+ }
+}
+```
+
+### Usages_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Usages List. */
+public final class UsagesListSamples {
+ /*
+ * x-ms-original-file: specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2022-01-30-preview/examples/Usages_List.json
+ */
+ /**
+ * Sample code: Services_Usages.
+ *
+ * @param manager Entry point to DataMigrationManager.
+ */
+ public static void servicesUsages(com.azure.resourcemanager.datamigration.DataMigrationManager manager) {
+ manager.usages().list("westus", Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml b/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml
index 3d14efb45d538..a3e71eb887fd6 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml
@@ -1,55 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-datamigration
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-datamigration
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for DataMigration Management
- This package contains Microsoft Azure SDK for DataMigration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Data Migration Client. Package tag package-2018-04-19.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for DataMigration Management
+ This package contains Microsoft Azure SDK for DataMigration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Data Migration Client. Package tag package-preview-2022-01.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core
- 1.25.0
-
-
- com.azure
- azure-core-management
- 1.5.2
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.25.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.2
+
+
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/DataMigrationManager.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/DataMigrationManager.java
index 5ffdfecb40632..49684f55bf102 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/DataMigrationManager.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/DataMigrationManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,21 +17,32 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.datamigration.fluent.DataMigrationManagementClient;
import com.azure.resourcemanager.datamigration.implementation.DataMigrationManagementClientBuilder;
+import com.azure.resourcemanager.datamigration.implementation.DatabaseMigrationsSqlMisImpl;
+import com.azure.resourcemanager.datamigration.implementation.DatabaseMigrationsSqlVmsImpl;
+import com.azure.resourcemanager.datamigration.implementation.FilesImpl;
import com.azure.resourcemanager.datamigration.implementation.OperationsImpl;
import com.azure.resourcemanager.datamigration.implementation.ProjectsImpl;
import com.azure.resourcemanager.datamigration.implementation.ResourceSkusImpl;
+import com.azure.resourcemanager.datamigration.implementation.ServiceTasksImpl;
import com.azure.resourcemanager.datamigration.implementation.ServicesImpl;
+import com.azure.resourcemanager.datamigration.implementation.SqlMigrationServicesImpl;
import com.azure.resourcemanager.datamigration.implementation.TasksImpl;
import com.azure.resourcemanager.datamigration.implementation.UsagesImpl;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationsSqlMis;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationsSqlVms;
+import com.azure.resourcemanager.datamigration.models.Files;
import com.azure.resourcemanager.datamigration.models.Operations;
import com.azure.resourcemanager.datamigration.models.Projects;
import com.azure.resourcemanager.datamigration.models.ResourceSkus;
+import com.azure.resourcemanager.datamigration.models.ServiceTasks;
import com.azure.resourcemanager.datamigration.models.Services;
+import com.azure.resourcemanager.datamigration.models.SqlMigrationServices;
import com.azure.resourcemanager.datamigration.models.Tasks;
import com.azure.resourcemanager.datamigration.models.Usages;
import java.time.Duration;
@@ -39,20 +50,31 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to DataMigrationManager. Data Migration Client. */
public final class DataMigrationManager {
+ private DatabaseMigrationsSqlMis databaseMigrationsSqlMis;
+
+ private DatabaseMigrationsSqlVms databaseMigrationsSqlVms;
+
+ private Operations operations;
+
+ private SqlMigrationServices sqlMigrationServices;
+
private ResourceSkus resourceSkus;
private Services services;
private Tasks tasks;
+ private ServiceTasks serviceTasks;
+
private Projects projects;
private Usages usages;
- private Operations operations;
+ private Files files;
private final DataMigrationManagementClient clientObject;
@@ -97,6 +119,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -136,6 +159,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.
*
@@ -192,20 +226,33 @@ 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);
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
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 +264,40 @@ public DataMigrationManager authenticate(TokenCredential credential, AzureProfil
}
}
+ /** @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 +322,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 +346,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..a399a5acb4d2e 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,34 @@ public interface DataMigrationManagementClient {
*/
Duration getDefaultPollInterval();
+ /**
+ * 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 +93,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 +115,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/DatabaseMigrationsSqlMisClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlMisClient.java
new file mode 100644
index 0000000000000..281750d9bac26
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlMisClient.java
@@ -0,0 +1,298 @@
+// 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;
+import reactor.core.publisher.Mono;
+
+/** 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 The child resources to include 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 database Migration Resource for SQL Managed Instance along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @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 database Migration Resource for SQL Managed Instance along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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..e3f725751d624
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlVmsClient.java
@@ -0,0 +1,310 @@
+// 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;
+import reactor.core.publisher.Mono;
+
+/** 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 The child resources to include 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 database Migration Resource for SQL Virtual Machine along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @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 database Migration Resource for SQL Virtual Machine along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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..f89410b2e28c3
--- /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.
+ */
+ @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.
+ */
+ @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..5576726fc92bd 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.
*/
@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.
*/
@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..cd307d8fb83ca 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
@@ -25,7 +25,7 @@ public interface ProjectsClient {
* @return oData page of project resources.
*/
@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
@@ -40,7 +40,7 @@ public interface ProjectsClient {
* @return oData page of project resources.
*/
@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/ServiceTasksClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServiceTasksClient.java
new file mode 100644
index 0000000000000..265d98314a510
--- /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.
+ */
+ @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.
+ */
+ @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..42e2a51d18a89 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
@@ -16,6 +16,7 @@
import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceStatusResponseInner;
import com.azure.resourcemanager.datamigration.fluent.models.NameAvailabilityResponseInner;
import com.azure.resourcemanager.datamigration.models.NameAvailabilityRequest;
+import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in ServicesClient. */
public interface ServicesClient {
@@ -34,9 +35,10 @@ 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 a Database Migration Service resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataMigrationServiceInner> beginCreateOrUpdate(
String groupName, String serviceName, DataMigrationServiceInner parameters);
@@ -56,9 +58,10 @@ 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 a Database Migration Service resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataMigrationServiceInner> beginCreateOrUpdate(
String groupName, String serviceName, DataMigrationServiceInner parameters, Context context);
@@ -129,7 +132,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 +148,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 Response} on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String groupName, String serviceName, Boolean deleteRunningTasks);
/**
@@ -161,9 +164,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 Response} on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String groupName, String serviceName, Boolean deleteRunningTasks, Context context);
@@ -220,9 +223,10 @@ 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 a Database Migration Service resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataMigrationServiceInner> beginUpdate(
String groupName, String serviceName, DataMigrationServiceInner parameters);
@@ -238,9 +242,10 @@ 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 a Database Migration Service resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataMigrationServiceInner> beginUpdate(
String groupName, String serviceName, DataMigrationServiceInner parameters, Context context);
@@ -302,7 +307,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 +322,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 Response} on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStart(String groupName, String serviceName);
/**
@@ -332,9 +337,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 Response} on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStart(String groupName, String serviceName, Context context);
/**
@@ -374,9 +379,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 Response} on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStop(String groupName, String serviceName);
/**
@@ -390,9 +395,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 Response} on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStop(String groupName, String serviceName, Context context);
/**
@@ -465,7 +470,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 +483,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);
/**
@@ -557,7 +562,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..7d4792638ea7b
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/SqlMigrationServicesClient.java
@@ -0,0 +1,455 @@
+// 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;
+import reactor.core.publisher.Mono;
+
+/** 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 a SQL Migration Service along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @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 a SQL Migration Service along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 a SQL Migration Service along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @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 a SQL Migration Service along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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..1b4bbe2287f73 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. */
@@ -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/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..48e1b9ce12f9c
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AuthenticationKeysInner.java
@@ -0,0 +1,76 @@
+// 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.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An authentication key. */
+@Fluent
+public final class AuthenticationKeysInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AuthenticationKeysInner.class);
+
+ /*
+ * 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..e2b1deab04619 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
@@ -6,8 +6,8 @@
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.azure.resourcemanager.datamigration.models.AvailableServiceSkuSku;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -26,7 +26,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 +59,7 @@ public AvailableServiceSkuInner withResourceType(String resourceType) {
*
* @return the sku value.
*/
- public AvailableServiceSkuAutoGenerated sku() {
+ public AvailableServiceSkuSku sku() {
return this.sku;
}
@@ -69,7 +69,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..75d1f7e49b939
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/CommandPropertiesInner.java
@@ -0,0 +1,83 @@
+// 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.core.util.logging.ClientLogger;
+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.JsonIgnore;
+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 {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CommandPropertiesInner.class);
+
+ /*
+ * 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..9997e9f923f2c 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,8 +5,8 @@
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.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.datamigration.models.ServiceProvisioningState;
import com.azure.resourcemanager.datamigration.models.ServiceSku;
@@ -15,9 +15,8 @@
import java.util.Map;
/** A Database Migration Service resource. */
-@JsonFlatten
@Fluent
-public class DataMigrationServiceInner extends Resource {
+public final class DataMigrationServiceInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(DataMigrationServiceInner.class);
/*
@@ -33,30 +32,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 +89,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 +118,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 +156,7 @@ public ServiceProvisioningState provisioningState() {
* @return the publicKey value.
*/
public String publicKey() {
- return this.publicKey;
+ return this.innerProperties() == null ? null : this.innerProperties().publicKey();
}
/**
@@ -143,7 +166,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 +180,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 +191,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 +275,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..c6d3b8f641de2
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceProperties.java
@@ -0,0 +1,178 @@
+// 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.ServiceProvisioningState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the Database Migration Service instance. */
+@Fluent
+public final class DataMigrationServiceProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMigrationServiceProperties.class);
+
+ /*
+ * 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..78357b8747503 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
@@ -21,6 +21,12 @@ public final class DataMigrationServiceStatusResponseInner {
@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 +67,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..4372818ddc779
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationInner.java
@@ -0,0 +1,71 @@
+// 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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Database Migration Resource. */
+@Fluent
+public final class DatabaseMigrationInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseMigrationInner.class);
+
+ /*
+ * 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/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..0e4e34c639813
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlMiInner.java
@@ -0,0 +1,71 @@
+// 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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationPropertiesSqlMi;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Database Migration Resource for SQL Managed Instance. */
+@Fluent
+public final class DatabaseMigrationSqlMiInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseMigrationSqlMiInner.class);
+
+ /*
+ * 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..25045b528c9b0
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlVmInner.java
@@ -0,0 +1,71 @@
+// 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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationPropertiesSqlVm;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Database Migration Resource for SQL Virtual Machine. */
+@Fluent
+public final class DatabaseMigrationSqlVmInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseMigrationSqlVmInner.class);
+
+ /*
+ * 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..a9d4f65825850
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DeleteNodeInner.java
@@ -0,0 +1,76 @@
+// 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.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Details of node to be deleted. */
+@Fluent
+public final class DeleteNodeInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DeleteNodeInner.class);
+
+ /*
+ * 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..56a0ab4d3d8f8
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/FileStorageInfoInner.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.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** File storage information. */
+@Fluent
+public final class FileStorageInfoInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(FileStorageInfoInner.class);
+
+ /*
+ * 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..ee18c2e6e4b3b
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/IntegrationRuntimeMonitoringDataInner.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.datamigration.models.NodeMonitoringData;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Integration Runtime Monitoring Data. */
+@Immutable
+public final class IntegrationRuntimeMonitoringDataInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(IntegrationRuntimeMonitoringDataInner.class);
+
+ /*
+ * 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..360029265a87f 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,14 +4,14 @@
package com.azure.resourcemanager.datamigration.fluent.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
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);
@@ -19,20 +19,20 @@ public final class NameAvailabilityResponseInner {
* 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 +44,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 +64,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 +84,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..23a5ab1cb74cc
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/OperationsDefinitionInner.java
@@ -0,0 +1,118 @@
+// 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.OperationOrigin;
+import com.azure.resourcemanager.datamigration.models.OperationsDisplayDefinition;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The OperationsDefinition model. */
+@Fluent
+public final class OperationsDefinitionInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsDefinitionInner.class);
+
+ /*
+ * 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..d5da3649860fa
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectFileInner.java
@@ -0,0 +1,97 @@
+// 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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.datamigration.models.ProjectFileProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A file resource. */
+@Fluent
+public final class ProjectFileInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ProjectFileInner.class);
+
+ /*
+ * 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..41ae62247b4ec 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,9 +5,10 @@
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.management.SystemData;
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;
@@ -20,52 +21,79 @@
import java.util.Map;
/** A project resource. */
-@JsonFlatten
@Fluent
-public class ProjectInner extends Resource {
+public final class ProjectInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ProjectInner.class);
/*
- * 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 +101,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 +111,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 +149,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 +159,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 +172,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 +181,7 @@ public OffsetDateTime creationTime() {
* @return the sourceConnectionInfo value.
*/
public ConnectionInfo sourceConnectionInfo() {
- return this.sourceConnectionInfo;
+ return this.innerProperties() == null ? null : this.innerProperties().sourceConnectionInfo();
}
/**
@@ -132,7 +191,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 +204,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 +214,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 +227,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 +237,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 +250,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 +259,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..e00f29521131d
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectProperties.java
@@ -0,0 +1,245 @@
+// 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.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** Project-specific properties. */
+@Fluent
+public final class ProjectProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ProjectProperties.class);
+
+ /*
+ * 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());
+ }
+ }
+}
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..29bcd475835b9 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,6 +6,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.datamigration.models.ProjectTaskProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -28,6 +29,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 +75,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/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..7b43e7de3933b
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/RegenAuthKeysInner.java
@@ -0,0 +1,102 @@
+// 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.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An authentication key to regenerate. */
+@Fluent
+public final class RegenAuthKeysInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RegenAuthKeysInner.class);
+
+ /*
+ * 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/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..5769ed57cd78d
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/SqlMigrationServiceInner.java
@@ -0,0 +1,92 @@
+// 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.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** A SQL Migration Service. */
+@Fluent
+public final class SqlMigrationServiceInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlMigrationServiceInner.class);
+
+ /*
+ * 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..3fbc1a5d60afa
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/SqlMigrationServiceProperties.java
@@ -0,0 +1,54 @@
+// 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.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The SQL Migration Service properties. */
+@Immutable
+public final class SqlMigrationServiceProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlMigrationServiceProperties.class);
+
+ /*
+ * 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..474e55fbdbb1e 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
@@ -19,12 +19,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.
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..e06424dfd0616 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,15 @@
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.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;
@@ -43,11 +48,11 @@
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 +120,54 @@ public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
+ /** 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 +204,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 +240,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 +259,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 +274,18 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2018-04-19";
+ this.apiVersion = "2022-01-30-preview";
+ 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);
}
/**
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/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/DatabaseMigrationsSqlMisClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlMisClientImpl.java
new file mode 100644
index 0000000000000..55dc05f02dbb3
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlMisClientImpl.java
@@ -0,0 +1,1339 @@
+// 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.logging.ClientLogger;
+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 {
+ private final ClientLogger logger = new ClientLogger(DatabaseMigrationsSqlMisClientImpl.class);
+
+ /** 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 The child resources to include 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 The child resources to include 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 The child resources to include 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 The child resources to include 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 database Migration Resource for SQL Managed Instance along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @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 database Migration Resource for SQL Managed Instance along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @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 database Migration Resource for SQL Managed Instance along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @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 database Migration Resource for SQL Managed Instance along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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 Response} on successful completion of {@link Mono}.
+ */
+ @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>> mono =
+ cutoverWithResponseAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCutover(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ return beginCutoverAsync(resourceGroupName, managedInstanceName, targetDbName, parameters).getSyncPoller();
+ }
+
+ /**
+ * 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.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCutover(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ return beginCutoverAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cutoverAsync(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ return beginCutoverAsync(resourceGroupName, managedInstanceName, targetDbName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cutoverAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ return beginCutoverAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void cutover(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ cutoverAsync(resourceGroupName, managedInstanceName, targetDbName, parameters).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.
+ * @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 cutover(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ cutoverAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context).block();
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlMisImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlMisImpl.java
new file mode 100644
index 0000000000000..04502b3ec01cd
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlMisImpl.java
@@ -0,0 +1,178 @@
+// 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.DatabaseMigrationsSqlMisClient;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationSqlMiInner;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationSqlMi;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationsSqlMis;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.UUID;
+
+public final class DatabaseMigrationsSqlMisImpl implements DatabaseMigrationsSqlMis {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseMigrationsSqlMisImpl.class);
+
+ private final DatabaseMigrationsSqlMisClient innerClient;
+
+ private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
+
+ public DatabaseMigrationsSqlMisImpl(
+ DatabaseMigrationsSqlMisClient innerClient,
+ com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public DatabaseMigrationSqlMi get(String resourceGroupName, String managedInstanceName, String targetDbName) {
+ DatabaseMigrationSqlMiInner inner =
+ this.serviceClient().get(resourceGroupName, managedInstanceName, targetDbName);
+ if (inner != null) {
+ return new DatabaseMigrationSqlMiImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(
+ resourceGroupName, managedInstanceName, targetDbName, migrationOperationId, expand, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new DatabaseMigrationSqlMiImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void cancel(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ this.serviceClient().cancel(resourceGroupName, managedInstanceName, targetDbName, parameters);
+ }
+
+ public void cancel(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ this.serviceClient().cancel(resourceGroupName, managedInstanceName, targetDbName, parameters, context);
+ }
+
+ public void cutover(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ this.serviceClient().cutover(resourceGroupName, managedInstanceName, targetDbName, parameters);
+ }
+
+ public void cutover(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ this.serviceClient().cutover(resourceGroupName, managedInstanceName, targetDbName, parameters, context);
+ }
+
+ public DatabaseMigrationSqlMi 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 managedInstanceName = Utils.getValueFromIdByName(id, "managedInstances");
+ if (managedInstanceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'managedInstances'.", 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,
+ managedInstanceName,
+ 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 managedInstanceName = Utils.getValueFromIdByName(id, "managedInstances");
+ if (managedInstanceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'managedInstances'.", 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, managedInstanceName, targetDbName, migrationOperationId, expand, context);
+ }
+
+ private DatabaseMigrationsSqlMisClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.datamigration.DataMigrationManager manager() {
+ return this.serviceManager;
+ }
+
+ public DatabaseMigrationSqlMiImpl define(String name) {
+ return new DatabaseMigrationSqlMiImpl(name, this.manager());
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlVmsClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlVmsClientImpl.java
new file mode 100644
index 0000000000000..f497e06a386f5
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlVmsClientImpl.java
@@ -0,0 +1,1373 @@
+// 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.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.datamigration.fluent.DatabaseMigrationsSqlVmsClient;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationSqlVmInner;
+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 DatabaseMigrationsSqlVmsClient. */
+public final class DatabaseMigrationsSqlVmsClientImpl implements DatabaseMigrationsSqlVmsClient {
+ private final ClientLogger logger = new ClientLogger(DatabaseMigrationsSqlVmsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final DatabaseMigrationsSqlVmsService service;
+
+ /** The service client containing this operation class. */
+ private final DataMigrationManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DatabaseMigrationsSqlVmsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DatabaseMigrationsSqlVmsClientImpl(DataMigrationManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(DatabaseMigrationsSqlVmsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataMigrationManagementClientDatabaseMigrationsSqlVms to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataMigrationManagem")
+ private interface DatabaseMigrationsSqlVmsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine"
+ + "/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations"
+ + "/{targetDbName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
+ @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.SqlVirtualMachine"
+ + "/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations"
+ + "/{targetDbName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
+ @PathParam("targetDbName") String targetDbName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") DatabaseMigrationSqlVmInner 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.SqlVirtualMachine"
+ + "/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations"
+ + "/{targetDbName}/cancel")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> cancel(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
+ @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.SqlVirtualMachine"
+ + "/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations"
+ + "/{targetDbName}/cutover")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> cutover(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
+ @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 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 The child resources to include 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 Virtual Machine along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ 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 (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName 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,
+ sqlVirtualMachineName,
+ 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 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 The child resources to include 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 Virtual Machine along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ 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 (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName 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,
+ sqlVirtualMachineName,
+ targetDbName,
+ migrationOperationId,
+ expand,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * 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 The child resources to include 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 Virtual Machine on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand) {
+ return getWithResponseAsync(
+ resourceGroupName, sqlVirtualMachineName, 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 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 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String sqlVirtualMachineName, String targetDbName) {
+ final UUID migrationOperationId = null;
+ final String expand = null;
+ return getWithResponseAsync(
+ resourceGroupName, sqlVirtualMachineName, 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 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 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)
+ public DatabaseMigrationSqlVmInner get(
+ String resourceGroupName, String sqlVirtualMachineName, String targetDbName) {
+ final UUID migrationOperationId = null;
+ final String expand = null;
+ return getAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, migrationOperationId, expand).block();
+ }
+
+ /**
+ * 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 The child resources to include 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 Virtual Machine along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context) {
+ return getWithResponseAsync(
+ resourceGroupName, sqlVirtualMachineName, targetDbName, migrationOperationId, expand, context)
+ .block();
+ }
+
+ /**
+ * 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 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} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner 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 (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName 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,
+ sqlVirtualMachineName,
+ 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 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 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} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner 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 (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName 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,
+ sqlVirtualMachineName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ 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 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} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DatabaseMigrationSqlVmInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ DatabaseMigrationSqlVmInner.class,
+ DatabaseMigrationSqlVmInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * 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 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} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DatabaseMigrationSqlVmInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(
+ resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ DatabaseMigrationSqlVmInner.class,
+ DatabaseMigrationSqlVmInner.class,
+ 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 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} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DatabaseMigrationSqlVmInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 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} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DatabaseMigrationSqlVmInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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)
+ public DatabaseMigrationSqlVmInner createOrUpdate(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters).block();
+ }
+
+ /**
+ * 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 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)
+ public DatabaseMigrationSqlVmInner createOrUpdate(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context).block();
+ }
+
+ /**
+ * 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 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 sqlVirtualMachineName,
+ 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 (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName 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,
+ sqlVirtualMachineName,
+ 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 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 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 sqlVirtualMachineName,
+ 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 (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName 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,
+ sqlVirtualMachineName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ 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 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.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCancelAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters) {
+ Mono>> mono =
+ cancelWithResponseAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * 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 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.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCancelAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ cancelWithResponseAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, 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 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.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCancel(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters) {
+ return beginCancelAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters).getSyncPoller();
+ }
+
+ /**
+ * 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 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.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCancel(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ return beginCancelAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 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 sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters) {
+ return beginCancelAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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 sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ return beginCancelAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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 sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters) {
+ cancelAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters).block();
+ }
+
+ /**
+ * 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 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 sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ cancelAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context).block();
+ }
+
+ /**
+ * 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 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 sqlVirtualMachineName,
+ 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 (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName 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,
+ sqlVirtualMachineName,
+ 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 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 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 sqlVirtualMachineName,
+ 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 (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName 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,
+ sqlVirtualMachineName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ 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 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.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCutoverAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters) {
+ Mono>> mono =
+ cutoverWithResponseAsync(resourceGroupName, sqlVirtualMachineName, 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 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 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.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCutoverAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ cutoverWithResponseAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, 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 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.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCutover(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters) {
+ return beginCutoverAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters).getSyncPoller();
+ }
+
+ /**
+ * 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 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.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCutover(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ return beginCutoverAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 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 cutoverAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters) {
+ return beginCutoverAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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 cutoverAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ return beginCutoverAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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 cutover(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters) {
+ cutoverAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters).block();
+ }
+
+ /**
+ * 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 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 cutover(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ cutoverAsync(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context).block();
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlVmsImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlVmsImpl.java
new file mode 100644
index 0000000000000..184e5d3e962ba
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlVmsImpl.java
@@ -0,0 +1,184 @@
+// 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.DatabaseMigrationsSqlVmsClient;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationSqlVmInner;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationSqlVm;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationsSqlVms;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.UUID;
+
+public final class DatabaseMigrationsSqlVmsImpl implements DatabaseMigrationsSqlVms {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseMigrationsSqlVmsImpl.class);
+
+ private final DatabaseMigrationsSqlVmsClient innerClient;
+
+ private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
+
+ public DatabaseMigrationsSqlVmsImpl(
+ DatabaseMigrationsSqlVmsClient innerClient,
+ com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public DatabaseMigrationSqlVm get(String resourceGroupName, String sqlVirtualMachineName, String targetDbName) {
+ DatabaseMigrationSqlVmInner inner =
+ this.serviceClient().get(resourceGroupName, sqlVirtualMachineName, targetDbName);
+ if (inner != null) {
+ return new DatabaseMigrationSqlVmImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(
+ resourceGroupName, sqlVirtualMachineName, targetDbName, migrationOperationId, expand, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new DatabaseMigrationSqlVmImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void cancel(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters) {
+ this.serviceClient().cancel(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters);
+ }
+
+ public void cancel(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ this.serviceClient().cancel(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context);
+ }
+
+ public void cutover(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters) {
+ this.serviceClient().cutover(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters);
+ }
+
+ public void cutover(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ this.serviceClient().cutover(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context);
+ }
+
+ public DatabaseMigrationSqlVm 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 sqlVirtualMachineName = Utils.getValueFromIdByName(id, "sqlVirtualMachines");
+ if (sqlVirtualMachineName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'sqlVirtualMachines'.", 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,
+ sqlVirtualMachineName,
+ 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 sqlVirtualMachineName = Utils.getValueFromIdByName(id, "sqlVirtualMachines");
+ if (sqlVirtualMachineName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'sqlVirtualMachines'.", 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, sqlVirtualMachineName, targetDbName, migrationOperationId, expand, context);
+ }
+
+ private DatabaseMigrationsSqlVmsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.datamigration.DataMigrationManager manager() {
+ return this.serviceManager;
+ }
+
+ public DatabaseMigrationSqlVmImpl define(String name) {
+ return new DatabaseMigrationSqlVmImpl(name, this.manager());
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DeleteNodeImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DeleteNodeImpl.java
new file mode 100644
index 0000000000000..ecb21317046e4
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DeleteNodeImpl.java
@@ -0,0 +1,36 @@
+// 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.resourcemanager.datamigration.fluent.models.DeleteNodeInner;
+import com.azure.resourcemanager.datamigration.models.DeleteNode;
+
+public final class DeleteNodeImpl implements DeleteNode {
+ private DeleteNodeInner innerObject;
+
+ private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
+
+ DeleteNodeImpl(
+ DeleteNodeInner innerObject, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String nodeName() {
+ return this.innerModel().nodeName();
+ }
+
+ public String integrationRuntimeName() {
+ return this.innerModel().integrationRuntimeName();
+ }
+
+ public DeleteNodeInner 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/FileStorageInfoImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/FileStorageInfoImpl.java
new file mode 100644
index 0000000000000..302fc643f24cc
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/FileStorageInfoImpl.java
@@ -0,0 +1,43 @@
+// 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.resourcemanager.datamigration.fluent.models.FileStorageInfoInner;
+import com.azure.resourcemanager.datamigration.models.FileStorageInfo;
+import java.util.Collections;
+import java.util.Map;
+
+public final class FileStorageInfoImpl implements FileStorageInfo {
+ private FileStorageInfoInner innerObject;
+
+ private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
+
+ FileStorageInfoImpl(
+ FileStorageInfoInner innerObject, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String uri() {
+ return this.innerModel().uri();
+ }
+
+ public Map headers() {
+ Map inner = this.innerModel().headers();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public FileStorageInfoInner 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/FilesClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/FilesClientImpl.java
new file mode 100644
index 0000000000000..42be96742615e
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/FilesClientImpl.java
@@ -0,0 +1,1562 @@
+// 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.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.datamigration.fluent.FilesClient;
+import com.azure.resourcemanager.datamigration.fluent.models.FileStorageInfoInner;
+import com.azure.resourcemanager.datamigration.fluent.models.ProjectFileInner;
+import com.azure.resourcemanager.datamigration.models.FileList;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in FilesClient. */
+public final class FilesClientImpl implements FilesClient {
+ private final ClientLogger logger = new ClientLogger(FilesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final FilesService service;
+
+ /** The service client containing this operation class. */
+ private final DataMigrationManagementClientImpl client;
+
+ /**
+ * Initializes an instance of FilesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FilesClientImpl(DataMigrationManagementClientImpl client) {
+ this.service = RestProxy.create(FilesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataMigrationManagementClientFiles to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataMigrationManagem")
+ private interface FilesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services"
+ + "/{serviceName}/projects/{projectName}/files")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("groupName") String groupName,
+ @PathParam("serviceName") String serviceName,
+ @PathParam("projectName") String projectName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services"
+ + "/{serviceName}/projects/{projectName}/files/{fileName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("groupName") String groupName,
+ @PathParam("serviceName") String serviceName,
+ @PathParam("projectName") String projectName,
+ @PathParam("fileName") String fileName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services"
+ + "/{serviceName}/projects/{projectName}/files/{fileName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("groupName") String groupName,
+ @PathParam("serviceName") String serviceName,
+ @PathParam("projectName") String projectName,
+ @PathParam("fileName") String fileName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ProjectFileInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services"
+ + "/{serviceName}/projects/{projectName}/files/{fileName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("groupName") String groupName,
+ @PathParam("serviceName") String serviceName,
+ @PathParam("projectName") String projectName,
+ @PathParam("fileName") String fileName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services"
+ + "/{serviceName}/projects/{projectName}/files/{fileName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("groupName") String groupName,
+ @PathParam("serviceName") String serviceName,
+ @PathParam("projectName") String projectName,
+ @PathParam("fileName") String fileName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ProjectFileInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services"
+ + "/{serviceName}/projects/{projectName}/files/{fileName}/read")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> read(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("groupName") String groupName,
+ @PathParam("serviceName") String serviceName,
+ @PathParam("projectName") String projectName,
+ @PathParam("fileName") String fileName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services"
+ + "/{serviceName}/projects/{projectName}/files/{fileName}/readwrite")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> readWrite(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("groupName") String groupName,
+ @PathParam("serviceName") String serviceName,
+ @PathParam("projectName") String projectName,
+ @PathParam("fileName") String fileName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * 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 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 along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String groupName, String serviceName, String projectName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (groupName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null."));
+ }
+ if (serviceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ groupName,
+ serviceName,
+ projectName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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 along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String groupName, String serviceName, String projectName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (groupName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null."));
+ }
+ if (serviceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ groupName,
+ serviceName,
+ projectName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String groupName, String serviceName, String projectName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(groupName, serviceName, projectName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String groupName, String serviceName, String projectName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(groupName, serviceName, projectName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String groupName, String serviceName, String projectName) {
+ return new PagedIterable<>(listAsync(groupName, serviceName, 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String groupName, String serviceName, String projectName, Context context) {
+ return new PagedIterable<>(listAsync(groupName, serviceName, projectName, 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 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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String groupName, String serviceName, String projectName, String fileName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (groupName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null."));
+ }
+ if (serviceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (fileName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fileName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ groupName,
+ serviceName,
+ projectName,
+ fileName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String groupName, String serviceName, String projectName, String fileName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (groupName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null."));
+ }
+ if (serviceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (fileName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fileName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ groupName,
+ serviceName,
+ projectName,
+ fileName,
+ this.client.getApiVersion(),
+ accept,
+ 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 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String groupName, String serviceName, String projectName, String fileName) {
+ return getWithResponseAsync(groupName, serviceName, projectName, fileName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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 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)
+ public ProjectFileInner get(String groupName, String serviceName, String projectName, String fileName) {
+ return getAsync(groupName, serviceName, projectName, fileName).block();
+ }
+
+ /**
+ * 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 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)
+ public Response getWithResponse(
+ String groupName, String serviceName, String projectName, String fileName, Context context) {
+ return getWithResponseAsync(groupName, serviceName, projectName, fileName, context).block();
+ }
+
+ /**
+ * 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 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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono