From 63cee62f4acf237a59440cb800acb79234277940 Mon Sep 17 00:00:00 2001 From: Yaohai Zheng Date: Wed, 14 Aug 2019 21:12:17 +0800 Subject: [PATCH] Datamigration: update package 2018-07-15-preview. (#4937) --- .../v2018_07_15_preview/pom.xml | 4 +- .../AzureActiveDirectoryApp.java | 95 ++ .../v2018_07_15_preview/BackupFileInfo.java | 97 ++ .../v2018_07_15_preview/BackupFileStatus.java | 56 + .../v2018_07_15_preview/BackupSetInfo.java | 281 ++++ .../CheckOCIDriverTaskInput.java | 43 + .../CheckOCIDriverTaskOutput.java | 49 + .../CheckOCIDriverTaskProperties.java | 63 + .../ConnectToMongoDbTaskProperties.java | 2 +- .../ConnectToSourceMySqlTaskInput.java | 6 +- .../ConnectToSourceMySqlTaskProperties.java | 2 +- .../ConnectToSourceNonSqlTaskOutput.java | 2 +- .../ConnectToSourceOracleSyncTaskInput.java | 43 + .../ConnectToSourceOracleSyncTaskOutput.java | 78 ++ ...nnectToSourceOracleSyncTaskProperties.java | 63 + ...onnectToSourcePostgreSqlSyncTaskInput.java | 44 + ...nnectToSourcePostgreSqlSyncTaskOutput.java | 94 ++ ...tToSourcePostgreSqlSyncTaskProperties.java | 64 + ...ctToSourceSqlServerSyncTaskProperties.java | 2 +- .../ConnectToSourceSqlServerTaskInput.java | 53 + .../ConnectToSourceSqlServerTaskOutput.java | 2 +- ...ourceSqlServerTaskOutputAgentJobLevel.java | 2 +- ...ourceSqlServerTaskOutputDatabaseLevel.java | 2 +- ...ToSourceSqlServerTaskOutputLoginLevel.java | 2 +- ...tToSourceSqlServerTaskOutputTaskLevel.java | 2 +- ...onnectToSourceSqlServerTaskProperties.java | 2 +- ...ToTargetAzureDbForMySqlTaskProperties.java | 2 +- ...rgetAzureDbForPostgreSqlSyncTaskInput.java | 70 + ...getAzureDbForPostgreSqlSyncTaskOutput.java | 94 ++ ...zureDbForPostgreSqlSyncTaskProperties.java | 64 + ...acleAzureDbForPostgreSqlSyncTaskInput.java | 44 + ...cleAzureDbForPostgreSqlSyncTaskOutput.java | 105 ++ ...qlSyncTaskOutputDatabaseSchemaMapItem.java | 72 + ...zureDbForPostgreSqlSyncTaskProperties.java | 65 + .../ConnectToTargetSqlDbTaskProperties.java | 2 +- .../ConnectToTargetSqlMISyncTaskInput.java | 72 + .../ConnectToTargetSqlMISyncTaskOutput.java | 64 + ...onnectToTargetSqlMISyncTaskProperties.java | 64 + .../ConnectToTargetSqlMITaskInput.java | 79 ++ .../ConnectToTargetSqlMITaskProperties.java | 2 +- ...ectToTargetSqlSqlDbSyncTaskProperties.java | 2 +- .../v2018_07_15_preview/ConnectionInfo.java | 22 +- .../DatabaseMigrationState.java | 65 + .../GetTdeCertificatesSqlTaskProperties.java | 2 +- .../GetUserTablesOracleTaskInput.java | 71 + .../GetUserTablesOracleTaskOutput.java | 64 + .../GetUserTablesOracleTaskProperties.java | 64 + .../GetUserTablesPostgreSqlTaskInput.java | 71 + .../GetUserTablesPostgreSqlTaskOutput.java | 64 + ...GetUserTablesPostgreSqlTaskProperties.java | 64 + .../GetUserTablesSqlSyncTaskProperties.java | 2 +- .../GetUserTablesSqlTaskProperties.java | 2 +- .../InstallOCIDriverTaskInput.java | 43 + .../InstallOCIDriverTaskOutput.java | 33 + .../InstallOCIDriverTaskProperties.java | 63 + .../MiSqlConnectionInfo.java | 48 + .../MigrateMISyncCompleteCommandInput.java | 44 + .../MigrateMISyncCompleteCommandOutput.java | 45 + ...igrateMISyncCompleteCommandProperties.java | 64 + .../MigrateMongoDbTaskProperties.java | 2 +- ...MySqlAzureDbForMySqlSyncDatabaseInput.java | 79 ++ ...ateMySqlAzureDbForMySqlSyncTaskOutput.java | 2 +- ...DbForMySqlSyncTaskOutputDatabaseError.java | 2 +- ...DbForMySqlSyncTaskOutputDatabaseLevel.java | 2 +- ...SqlAzureDbForMySqlSyncTaskOutputError.java | 2 +- ...bForMySqlSyncTaskOutputMigrationLevel.java | 2 +- ...ureDbForMySqlSyncTaskOutputTableLevel.java | 2 +- ...ySqlAzureDbForMySqlSyncTaskProperties.java | 2 +- ...zureDbForPostgreSqlSyncTaskProperties.java | 64 + ...cleAzureDbPostgreSqlSyncDatabaseInput.java | 228 ++++ ...eOracleAzureDbPostgreSqlSyncTaskInput.java | 97 ++ ...OracleAzureDbPostgreSqlSyncTaskOutput.java | 45 + ...PostgreSqlSyncTaskOutputDatabaseError.java | 74 ++ ...PostgreSqlSyncTaskOutputDatabaseLevel.java | 250 ++++ ...eAzureDbPostgreSqlSyncTaskOutputError.java | 36 + ...ostgreSqlSyncTaskOutputMigrationLevel.java | 112 ++ ...eDbPostgreSqlSyncTaskOutputTableLevel.java | 218 ++++ ...AzureDbForPostgreSqlSyncDatabaseInput.java | 79 ++ ...SqlAzureDbForPostgreSqlSyncTaskOutput.java | 2 +- ...PostgreSqlSyncTaskOutputDatabaseError.java | 2 +- ...PostgreSqlSyncTaskOutputDatabaseLevel.java | 2 +- ...ureDbForPostgreSqlSyncTaskOutputError.java | 2 +- ...ostgreSqlSyncTaskOutputMigrationLevel.java | 2 +- ...ForPostgreSqlSyncTaskOutputTableLevel.java | 2 +- ...zureDbForPostgreSqlSyncTaskProperties.java | 2 +- ...MigrateSchemaSqlServerSqlDbTaskOutput.java | 2 +- ...SqlServerSqlDbTaskOutputDatabaseLevel.java | 2 +- ...teSchemaSqlServerSqlDbTaskOutputError.java | 2 +- ...qlServerSqlDbTaskOutputMigrationLevel.java | 2 +- ...ateSchemaSqlServerSqlDbTaskProperties.java | 2 +- .../MigrateSchemaSqlTaskOutputError.java | 2 +- .../MigrateSqlServerSqlDbSyncTaskOutput.java | 2 +- ...erverSqlDbSyncTaskOutputDatabaseError.java | 2 +- ...erverSqlDbSyncTaskOutputDatabaseLevel.java | 2 +- ...rateSqlServerSqlDbSyncTaskOutputError.java | 2 +- ...rverSqlDbSyncTaskOutputMigrationLevel.java | 2 +- ...qlServerSqlDbSyncTaskOutputTableLevel.java | 2 +- ...grateSqlServerSqlDbSyncTaskProperties.java | 2 +- .../MigrateSqlServerSqlDbTaskOutput.java | 2 +- ...SqlServerSqlDbTaskOutputDatabaseLevel.java | 2 +- .../MigrateSqlServerSqlDbTaskOutputError.java | 2 +- ...qlServerSqlDbTaskOutputMigrationLevel.java | 2 +- ...ateSqlServerSqlDbTaskOutputTableLevel.java | 2 +- .../MigrateSqlServerSqlDbTaskProperties.java | 2 +- .../MigrateSqlServerSqlMISyncTaskInput.java | 17 + .../MigrateSqlServerSqlMISyncTaskOutput.java | 43 + ...erverSqlMISyncTaskOutputDatabaseLevel.java | 193 +++ ...rateSqlServerSqlMISyncTaskOutputError.java | 36 + ...rverSqlMISyncTaskOutputMigrationLevel.java | 188 +++ ...grateSqlServerSqlMISyncTaskProperties.java | 64 + .../MigrateSqlServerSqlMITaskOutput.java | 2 +- ...SqlServerSqlMITaskOutputAgentJobLevel.java | 2 +- ...SqlServerSqlMITaskOutputDatabaseLevel.java | 2 +- .../MigrateSqlServerSqlMITaskOutputError.java | 2 +- ...ateSqlServerSqlMITaskOutputLoginLevel.java | 2 +- ...qlServerSqlMITaskOutputMigrationLevel.java | 16 +- .../MigrateSqlServerSqlMITaskProperties.java | 2 +- .../MigrateSsisTaskInput.java | 44 + .../MigrateSsisTaskOutput.java | 42 + .../MigrateSsisTaskOutputMigrationLevel.java | 176 +++ .../MigrateSsisTaskOutputProjectLevel.java | 145 +++ .../MigrateSsisTaskProperties.java | 64 + .../MigrateSyncCompleteCommandOutput.java | 26 +- .../MigrateSyncCompleteCommandProperties.java | 2 +- .../MongoDbCancelCommand.java | 2 +- .../MongoDbConnectionInfo.java | 2 +- .../MongoDbFinishCommand.java | 2 +- .../MongoDbRestartCommand.java | 2 +- .../MySqlConnectionInfo.java | 2 +- .../MySqlTargetPlatformType.java | 3 + .../OracleConnectionInfo.java | 47 + .../OracleOCIDriverInfo.java | 109 ++ .../v2018_07_15_preview/OrphanedUserInfo.java | 69 + .../PostgreSqlConnectionInfo.java | 2 +- ...sk.java => ProjectServiceProjectTask.java} | 28 +- .../ProjectTaskProperties.java | 22 +- .../ServerLevelPermissionsGroup.java | 54 +- .../v2018_07_15_preview/ServerProperties.java | 2 +- .../ServiceProjectTask.java | 146 +++ .../v2018_07_15_preview/ServiceTasks.java | 68 + .../SqlConnectionInfo.java | 2 +- .../SqlServerSqlMISyncTaskInput.java | 177 +++ .../SsisMigrationInfo.java | 98 ++ .../SsisMigrationOverwriteOption.java | 41 + .../SsisMigrationStage.java | 47 + .../v2018_07_15_preview/SsisStoreType.java | 38 + .../v2018_07_15_preview/Tasks.java | 8 +- .../UploadOCIDriverTaskInput.java | 43 + .../UploadOCIDriverTaskOutput.java | 48 + .../UploadOCIDriverTaskProperties.java | 63 + ...InputSqlServerSqlDbSyncTaskProperties.java | 2 +- ...ationInputSqlServerSqlMISyncTaskInput.java | 17 + ...tionInputSqlServerSqlMISyncTaskOutput.java | 64 + ...InputSqlServerSqlMISyncTaskProperties.java | 64 + ...tionInputSqlServerSqlMITaskProperties.java | 2 +- .../ValidateMongoDbTaskProperties.java | 2 +- ...zureDbForPostgreSqlSyncTaskProperties.java | 64 + ...OracleAzureDbPostgreSqlSyncTaskOutput.java | 34 + .../CommandPropertiesInner.java | 54 +- .../implementation/DataMigrationManager.java | 12 + .../DataMigrationServiceClientImpl.java | 14 + .../implementation/FilesImpl.java | 10 +- ...ava => ProjectServiceProjectTaskImpl.java} | 18 +- .../implementation/ProjectsImpl.java | 10 +- .../ServiceProjectTaskImpl.java | 117 ++ .../implementation/ServiceTasksImpl.java | 98 ++ .../implementation/ServiceTasksInner.java | 1158 +++++++++++++++++ .../implementation/TasksImpl.java | 38 +- 168 files changed, 7906 insertions(+), 200 deletions(-) create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/AzureActiveDirectoryApp.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupFileInfo.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupFileStatus.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupSetInfo.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/DatabaseMigrationState.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MiSqlConnectionInfo.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncDatabaseInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputError.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputMigrationLevel.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputProjectLevel.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleConnectionInfo.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleOCIDriverInfo.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OrphanedUserInfo.java rename datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/{ProjectTask.java => ProjectServiceProjectTask.java} (72%) create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServiceProjectTask.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServiceTasks.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlServerSqlMISyncTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationInfo.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationOverwriteOption.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationStage.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisStoreType.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskInput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskOutput.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbPostgreSqlSyncTaskOutput.java rename datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/{ProjectTaskImpl.java => ProjectServiceProjectTaskImpl.java} (78%) create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceProjectTaskImpl.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceTasksImpl.java create mode 100644 datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceTasksInner.java diff --git a/datamigration/resource-manager/v2018_07_15_preview/pom.xml b/datamigration/resource-manager/v2018_07_15_preview/pom.xml index f8e10a9824e57..8b29ac9b9adbf 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/pom.xml +++ b/datamigration/resource-manager/v2018_07_15_preview/pom.xml @@ -15,7 +15,7 @@ ../../../pom.management.xml azure-mgmt-datamigration - 1.0.0-beta + 1.0.0-beta-1 jar Microsoft Azure SDK for DataMigration Management This package contains Microsoft DataMigration Management SDK. @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/AzureActiveDirectoryApp.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/AzureActiveDirectoryApp.java new file mode 100644 index 0000000000000..527828e1d61e7 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/AzureActiveDirectoryApp.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Active Directory Application. + */ +public class AzureActiveDirectoryApp { + /** + * Application ID of the Azure Active Directory Application. + */ + @JsonProperty(value = "applicationId", required = true) + private String applicationId; + + /** + * Key used to authenticate to the Azure Active Directory Application. + */ + @JsonProperty(value = "appKey", required = true) + private String appKey; + + /** + * Tenant id of the customer. + */ + @JsonProperty(value = "tenantId", required = true) + private String tenantId; + + /** + * Get application ID of the Azure Active Directory Application. + * + * @return the applicationId value + */ + public String applicationId() { + return this.applicationId; + } + + /** + * Set application ID of the Azure Active Directory Application. + * + * @param applicationId the applicationId value to set + * @return the AzureActiveDirectoryApp object itself. + */ + public AzureActiveDirectoryApp withApplicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Get key used to authenticate to the Azure Active Directory Application. + * + * @return the appKey value + */ + public String appKey() { + return this.appKey; + } + + /** + * Set key used to authenticate to the Azure Active Directory Application. + * + * @param appKey the appKey value to set + * @return the AzureActiveDirectoryApp object itself. + */ + public AzureActiveDirectoryApp withAppKey(String appKey) { + this.appKey = appKey; + return this; + } + + /** + * Get tenant id of the customer. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set tenant id of the customer. + * + * @param tenantId the tenantId value to set + * @return the AzureActiveDirectoryApp object itself. + */ + public AzureActiveDirectoryApp withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupFileInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupFileInfo.java new file mode 100644 index 0000000000000..63d46f93bcbbe --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupFileInfo.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information of the backup file. + */ +public class BackupFileInfo { + /** + * Location of the backup file in shared folder. + */ + @JsonProperty(value = "fileLocation") + private String fileLocation; + + /** + * Sequence number of the backup file in the backup set. + */ + @JsonProperty(value = "familySequenceNumber") + private Integer familySequenceNumber; + + /** + * Status of the backup file during migration. Possible values include: + * 'Arrived', 'Queued', 'Uploading', 'Uploaded', 'Restoring', 'Restored', + * 'Cancelled'. + */ + @JsonProperty(value = "status") + private BackupFileStatus status; + + /** + * Get location of the backup file in shared folder. + * + * @return the fileLocation value + */ + public String fileLocation() { + return this.fileLocation; + } + + /** + * Set location of the backup file in shared folder. + * + * @param fileLocation the fileLocation value to set + * @return the BackupFileInfo object itself. + */ + public BackupFileInfo withFileLocation(String fileLocation) { + this.fileLocation = fileLocation; + return this; + } + + /** + * Get sequence number of the backup file in the backup set. + * + * @return the familySequenceNumber value + */ + public Integer familySequenceNumber() { + return this.familySequenceNumber; + } + + /** + * Set sequence number of the backup file in the backup set. + * + * @param familySequenceNumber the familySequenceNumber value to set + * @return the BackupFileInfo object itself. + */ + public BackupFileInfo withFamilySequenceNumber(Integer familySequenceNumber) { + this.familySequenceNumber = familySequenceNumber; + return this; + } + + /** + * Get status of the backup file during migration. Possible values include: 'Arrived', 'Queued', 'Uploading', 'Uploaded', 'Restoring', 'Restored', 'Cancelled'. + * + * @return the status value + */ + public BackupFileStatus status() { + return this.status; + } + + /** + * Set status of the backup file during migration. Possible values include: 'Arrived', 'Queued', 'Uploading', 'Uploaded', 'Restoring', 'Restored', 'Cancelled'. + * + * @param status the status value to set + * @return the BackupFileInfo object itself. + */ + public BackupFileInfo withStatus(BackupFileStatus status) { + this.status = status; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupFileStatus.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupFileStatus.java new file mode 100644 index 0000000000000..cd52ce0efd5e1 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupFileStatus.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for BackupFileStatus. + */ +public final class BackupFileStatus extends ExpandableStringEnum { + /** Static value Arrived for BackupFileStatus. */ + public static final BackupFileStatus ARRIVED = fromString("Arrived"); + + /** Static value Queued for BackupFileStatus. */ + public static final BackupFileStatus QUEUED = fromString("Queued"); + + /** Static value Uploading for BackupFileStatus. */ + public static final BackupFileStatus UPLOADING = fromString("Uploading"); + + /** Static value Uploaded for BackupFileStatus. */ + public static final BackupFileStatus UPLOADED = fromString("Uploaded"); + + /** Static value Restoring for BackupFileStatus. */ + public static final BackupFileStatus RESTORING = fromString("Restoring"); + + /** Static value Restored for BackupFileStatus. */ + public static final BackupFileStatus RESTORED = fromString("Restored"); + + /** Static value Cancelled for BackupFileStatus. */ + public static final BackupFileStatus CANCELLED = fromString("Cancelled"); + + /** + * Creates or finds a BackupFileStatus from its string representation. + * @param name a name to look for + * @return the corresponding BackupFileStatus + */ + @JsonCreator + public static BackupFileStatus fromString(String name) { + return fromString(name, BackupFileStatus.class); + } + + /** + * @return known BackupFileStatus values + */ + public static Collection values() { + return values(BackupFileStatus.class); + } +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupSetInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupSetInfo.java new file mode 100644 index 0000000000000..58fe02be7d2c2 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/BackupSetInfo.java @@ -0,0 +1,281 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information of backup set. + */ +public class BackupSetInfo { + /** + * Id for the set of backup files. + */ + @JsonProperty(value = "backupSetId") + private String backupSetId; + + /** + * First log sequence number of the backup file. + */ + @JsonProperty(value = "firstLsn") + private String firstLsn; + + /** + * Last log sequence number of the backup file. + */ + @JsonProperty(value = "lastLsn") + private String lastLsn; + + /** + * Last modified time of the backup file in share location. + */ + @JsonProperty(value = "lastModifiedTime") + private DateTime lastModifiedTime; + + /** + * Enum of the different backup types. Possible values include: 'Database', + * 'TransactionLog', 'File', 'DifferentialDatabase', 'DifferentialFile', + * 'Partial', 'DifferentialPartial'. + */ + @JsonProperty(value = "backupType") + private BackupType backupType; + + /** + * List of files in the backup set. + */ + @JsonProperty(value = "listOfBackupFiles") + private List listOfBackupFiles; + + /** + * Name of the database to which the backup set belongs. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * Date and time that the backup operation began. + */ + @JsonProperty(value = "backupStartDate") + private DateTime backupStartDate; + + /** + * Date and time that the backup operation finished. + */ + @JsonProperty(value = "backupFinishedDate") + private DateTime backupFinishedDate; + + /** + * Whether the backup set is restored or not. + */ + @JsonProperty(value = "isBackupRestored") + private Boolean isBackupRestored; + + /** + * Get id for the set of backup files. + * + * @return the backupSetId value + */ + public String backupSetId() { + return this.backupSetId; + } + + /** + * Set id for the set of backup files. + * + * @param backupSetId the backupSetId value to set + * @return the BackupSetInfo object itself. + */ + public BackupSetInfo withBackupSetId(String backupSetId) { + this.backupSetId = backupSetId; + return this; + } + + /** + * Get first log sequence number of the backup file. + * + * @return the firstLsn value + */ + public String firstLsn() { + return this.firstLsn; + } + + /** + * Set first log sequence number of the backup file. + * + * @param firstLsn the firstLsn value to set + * @return the BackupSetInfo object itself. + */ + public BackupSetInfo withFirstLsn(String firstLsn) { + this.firstLsn = firstLsn; + return this; + } + + /** + * Get last log sequence number of the backup file. + * + * @return the lastLsn value + */ + public String lastLsn() { + return this.lastLsn; + } + + /** + * Set last log sequence number of the backup file. + * + * @param lastLsn the lastLsn value to set + * @return the BackupSetInfo object itself. + */ + public BackupSetInfo withLastLsn(String lastLsn) { + this.lastLsn = lastLsn; + return this; + } + + /** + * Get last modified time of the backup file in share location. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Set last modified time of the backup file in share location. + * + * @param lastModifiedTime the lastModifiedTime value to set + * @return the BackupSetInfo object itself. + */ + public BackupSetInfo withLastModifiedTime(DateTime lastModifiedTime) { + this.lastModifiedTime = lastModifiedTime; + return this; + } + + /** + * Get enum of the different backup types. Possible values include: 'Database', 'TransactionLog', 'File', 'DifferentialDatabase', 'DifferentialFile', 'Partial', 'DifferentialPartial'. + * + * @return the backupType value + */ + public BackupType backupType() { + return this.backupType; + } + + /** + * Set enum of the different backup types. Possible values include: 'Database', 'TransactionLog', 'File', 'DifferentialDatabase', 'DifferentialFile', 'Partial', 'DifferentialPartial'. + * + * @param backupType the backupType value to set + * @return the BackupSetInfo object itself. + */ + public BackupSetInfo withBackupType(BackupType backupType) { + this.backupType = backupType; + return this; + } + + /** + * Get list of files in the backup set. + * + * @return the listOfBackupFiles value + */ + public List listOfBackupFiles() { + return this.listOfBackupFiles; + } + + /** + * Set list of files in the backup set. + * + * @param listOfBackupFiles the listOfBackupFiles value to set + * @return the BackupSetInfo object itself. + */ + public BackupSetInfo withListOfBackupFiles(List listOfBackupFiles) { + this.listOfBackupFiles = listOfBackupFiles; + return this; + } + + /** + * Get name of the database to which the backup set belongs. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set name of the database to which the backup set belongs. + * + * @param databaseName the databaseName value to set + * @return the BackupSetInfo object itself. + */ + public BackupSetInfo withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get date and time that the backup operation began. + * + * @return the backupStartDate value + */ + public DateTime backupStartDate() { + return this.backupStartDate; + } + + /** + * Set date and time that the backup operation began. + * + * @param backupStartDate the backupStartDate value to set + * @return the BackupSetInfo object itself. + */ + public BackupSetInfo withBackupStartDate(DateTime backupStartDate) { + this.backupStartDate = backupStartDate; + return this; + } + + /** + * Get date and time that the backup operation finished. + * + * @return the backupFinishedDate value + */ + public DateTime backupFinishedDate() { + return this.backupFinishedDate; + } + + /** + * Set date and time that the backup operation finished. + * + * @param backupFinishedDate the backupFinishedDate value to set + * @return the BackupSetInfo object itself. + */ + public BackupSetInfo withBackupFinishedDate(DateTime backupFinishedDate) { + this.backupFinishedDate = backupFinishedDate; + return this; + } + + /** + * Get whether the backup set is restored or not. + * + * @return the isBackupRestored value + */ + public Boolean isBackupRestored() { + return this.isBackupRestored; + } + + /** + * Set whether the backup set is restored or not. + * + * @param isBackupRestored the isBackupRestored value to set + * @return the BackupSetInfo object itself. + */ + public BackupSetInfo withIsBackupRestored(Boolean isBackupRestored) { + this.isBackupRestored = isBackupRestored; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskInput.java new file mode 100644 index 0000000000000..d74b6fcb610f0 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskInput.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the service task to check for OCI drivers. + */ +public class CheckOCIDriverTaskInput { + /** + * Version of the source server to check against. Optional. + */ + @JsonProperty(value = "serverVersion") + private String serverVersion; + + /** + * Get version of the source server to check against. Optional. + * + * @return the serverVersion value + */ + public String serverVersion() { + return this.serverVersion; + } + + /** + * Set version of the source server to check against. Optional. + * + * @param serverVersion the serverVersion value to set + * @return the CheckOCIDriverTaskInput object itself. + */ + public CheckOCIDriverTaskInput withServerVersion(String serverVersion) { + this.serverVersion = serverVersion; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskOutput.java new file mode 100644 index 0000000000000..79581c783cda8 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskOutput.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the service task to check for OCI drivers. + */ +public class CheckOCIDriverTaskOutput { + /** + * Information about the installed driver if found and valid. + */ + @JsonProperty(value = "installedDriver", access = JsonProperty.Access.WRITE_ONLY) + private Map> installedDriver; + + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get information about the installed driver if found and valid. + * + * @return the installedDriver value + */ + public Map> installedDriver() { + return this.installedDriver; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskProperties.java new file mode 100644 index 0000000000000..8eb79918ac8cf --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/CheckOCIDriverTaskProperties.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that checks for OCI drivers. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = CheckOCIDriverTaskProperties.class) +@JsonTypeName("Service.Check.OCI") +public class CheckOCIDriverTaskProperties extends ProjectTaskProperties { + /** + * The input property. + */ + @JsonProperty(value = "input") + private CheckOCIDriverTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get the input value. + * + * @return the input value + */ + public CheckOCIDriverTaskInput input() { + return this.input; + } + + /** + * Set the input value. + * + * @param input the input value to set + * @return the CheckOCIDriverTaskProperties object itself. + */ + public CheckOCIDriverTaskProperties withInput(CheckOCIDriverTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java index 0d5f978e4b7ce..9477624b0c36a 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates the connection to and provides * information about a MongoDB server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToMongoDbTaskProperties.class) @JsonTypeName("Connect.MongoDb") public class ConnectToMongoDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskInput.java index 3f2239d3fcd59..11c543452b338 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskInput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskInput.java @@ -21,7 +21,7 @@ public class ConnectToSourceMySqlTaskInput { private MySqlConnectionInfo sourceConnectionInfo; /** - * Target Platform for the migration. Possible values include: + * Target Platform for the migration. Possible values include: 'SqlServer', * 'AzureDbForMySQL'. */ @JsonProperty(value = "targetPlatform") @@ -56,7 +56,7 @@ public ConnectToSourceMySqlTaskInput withSourceConnectionInfo(MySqlConnectionInf } /** - * Get target Platform for the migration. Possible values include: 'AzureDbForMySQL'. + * Get target Platform for the migration. Possible values include: 'SqlServer', 'AzureDbForMySQL'. * * @return the targetPlatform value */ @@ -65,7 +65,7 @@ public MySqlTargetPlatformType targetPlatform() { } /** - * Set target Platform for the migration. Possible values include: 'AzureDbForMySQL'. + * Set target Platform for the migration. Possible values include: 'SqlServer', 'AzureDbForMySQL'. * * @param targetPlatform the targetPlatform value to set * @return the ConnectToSourceMySqlTaskInput object itself. diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java index f8719ccfacc59..1c0bb1755b48b 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java @@ -16,7 +16,7 @@ /** * Properties for the task that validates MySQL database connection. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourceMySqlTaskProperties.class) @JsonTypeName("ConnectToSource.MySql") public class ConnectToSourceMySqlTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceNonSqlTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceNonSqlTaskOutput.java index 37e89141a1c7b..c86a04fd92894 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceNonSqlTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceNonSqlTaskOutput.java @@ -12,7 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Output for connect to Oracle, MySQL type source. + * Output for connect to MySQL type source. */ public class ConnectToSourceNonSqlTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskInput.java new file mode 100644 index 0000000000000..e9bcecfc23439 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskInput.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates Oracle database connection. + */ +public class ConnectToSourceOracleSyncTaskInput { + /** + * Information for connecting to Oracle source. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private OracleConnectionInfo sourceConnectionInfo; + + /** + * Get information for connecting to Oracle source. + * + * @return the sourceConnectionInfo value + */ + public OracleConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set information for connecting to Oracle source. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the ConnectToSourceOracleSyncTaskInput object itself. + */ + public ConnectToSourceOracleSyncTaskInput withSourceConnectionInfo(OracleConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskOutput.java new file mode 100644 index 0000000000000..a3e777fd70fbc --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskOutput.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the task that validates Oracle database connection. + */ +public class ConnectToSourceOracleSyncTaskOutput { + /** + * Version of the source server. + */ + @JsonProperty(value = "sourceServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerVersion; + + /** + * List of schemas on source server. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private List databases; + + /** + * Source server brand version. + */ + @JsonProperty(value = "sourceServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerBrandVersion; + + /** + * Validation errors associated with the task. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get version of the source server. + * + * @return the sourceServerVersion value + */ + public String sourceServerVersion() { + return this.sourceServerVersion; + } + + /** + * Get list of schemas on source server. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Get source server brand version. + * + * @return the sourceServerBrandVersion value + */ + public String sourceServerBrandVersion() { + return this.sourceServerBrandVersion; + } + + /** + * Get validation errors associated with the task. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskProperties.java new file mode 100644 index 0000000000000..a76f8051037fd --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceOracleSyncTaskProperties.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that validates Oracle database connection. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourceOracleSyncTaskProperties.class) +@JsonTypeName("ConnectToSource.Oracle.Sync") +public class ConnectToSourceOracleSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToSourceOracleSyncTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public ConnectToSourceOracleSyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToSourceOracleSyncTaskProperties object itself. + */ + public ConnectToSourceOracleSyncTaskProperties withInput(ConnectToSourceOracleSyncTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskInput.java new file mode 100644 index 0000000000000..ed637ac50eecd --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskInput.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to PostgreSQL and source server + * requirements. + */ +public class ConnectToSourcePostgreSqlSyncTaskInput { + /** + * Connection information for source PostgreSQL server. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private PostgreSqlConnectionInfo sourceConnectionInfo; + + /** + * Get connection information for source PostgreSQL server. + * + * @return the sourceConnectionInfo value + */ + public PostgreSqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set connection information for source PostgreSQL server. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the ConnectToSourcePostgreSqlSyncTaskInput object itself. + */ + public ConnectToSourcePostgreSqlSyncTaskInput withSourceConnectionInfo(PostgreSqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskOutput.java new file mode 100644 index 0000000000000..b1aad780a5758 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskOutput.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the task that validates connection to PostgreSQL and source + * server requirements. + */ +public class ConnectToSourcePostgreSqlSyncTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Version of the source server. + */ + @JsonProperty(value = "sourceServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerVersion; + + /** + * List of databases on source server. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private List databases; + + /** + * Source server brand version. + */ + @JsonProperty(value = "sourceServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerBrandVersion; + + /** + * Validation errors associated with the task. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get version of the source server. + * + * @return the sourceServerVersion value + */ + public String sourceServerVersion() { + return this.sourceServerVersion; + } + + /** + * Get list of databases on source server. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Get source server brand version. + * + * @return the sourceServerBrandVersion value + */ + public String sourceServerBrandVersion() { + return this.sourceServerBrandVersion; + } + + /** + * Get validation errors associated with the task. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskProperties.java new file mode 100644 index 0000000000000..7baf6ccc01531 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourcePostgreSqlSyncTaskProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that validates connection to PostgreSQL server and + * source server requirements for online migration. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourcePostgreSqlSyncTaskProperties.class) +@JsonTypeName("ConnectToSource.PostgreSql.Sync") +public class ConnectToSourcePostgreSqlSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToSourcePostgreSqlSyncTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public ConnectToSourcePostgreSqlSyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToSourcePostgreSqlSyncTaskProperties object itself. + */ + public ConnectToSourcePostgreSqlSyncTaskProperties withInput(ConnectToSourcePostgreSqlSyncTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java index f3a6974a86adc..1dee0528673e2 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to SQL Server and source * server requirements for online migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourceSqlServerSyncTaskProperties.class) @JsonTypeName("ConnectToSource.SqlServer.Sync") public class ConnectToSourceSqlServerSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskInput.java index c20b8dbc670ab..94c6d9855136e 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskInput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskInput.java @@ -29,6 +29,12 @@ public class ConnectToSourceSqlServerTaskInput { @JsonProperty(value = "checkPermissionsGroup") private ServerLevelPermissionsGroup checkPermissionsGroup; + /** + * Flag for whether to collect databases from source server. + */ + @JsonProperty(value = "collectDatabases") + private Boolean collectDatabases; + /** * Flag for whether to collect logins from source server. */ @@ -47,6 +53,13 @@ public class ConnectToSourceSqlServerTaskInput { @JsonProperty(value = "collectTdeCertificateInfo") private Boolean collectTdeCertificateInfo; + /** + * Flag for whether to validate SSIS catalog is reachable on the source + * server. + */ + @JsonProperty(value = "validateSsisCatalogOnly") + private Boolean validateSsisCatalogOnly; + /** * Get connection information for Source SQL Server. * @@ -87,6 +100,26 @@ public ConnectToSourceSqlServerTaskInput withCheckPermissionsGroup(ServerLevelPe return this; } + /** + * Get flag for whether to collect databases from source server. + * + * @return the collectDatabases value + */ + public Boolean collectDatabases() { + return this.collectDatabases; + } + + /** + * Set flag for whether to collect databases from source server. + * + * @param collectDatabases the collectDatabases value to set + * @return the ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withCollectDatabases(Boolean collectDatabases) { + this.collectDatabases = collectDatabases; + return this; + } + /** * Get flag for whether to collect logins from source server. * @@ -147,4 +180,24 @@ public ConnectToSourceSqlServerTaskInput withCollectTdeCertificateInfo(Boolean c return this; } + /** + * Get flag for whether to validate SSIS catalog is reachable on the source server. + * + * @return the validateSsisCatalogOnly value + */ + public Boolean validateSsisCatalogOnly() { + return this.validateSsisCatalogOnly; + } + + /** + * Set flag for whether to validate SSIS catalog is reachable on the source server. + * + * @param validateSsisCatalogOnly the validateSsisCatalogOnly value to set + * @return the ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withValidateSsisCatalogOnly(Boolean validateSsisCatalogOnly) { + this.validateSsisCatalogOnly = validateSsisCatalogOnly; + return this; + } + } diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java index c21fd48456065..b1dea666688aa 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that validates connection to SQL Server and also * validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutput.class) @JsonTypeName("ConnectToSourceSqlServerTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "AgentJobLevelOutput", value = ConnectToSourceSqlServerTaskOutputAgentJobLevel.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java index 6fad4be12de26..ce3fa6d859a41 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java @@ -18,7 +18,7 @@ * Agent Job level output for the task that validates connection to SQL Server * and also validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutputAgentJobLevel.class) @JsonTypeName("AgentJobLevelOutput") public class ConnectToSourceSqlServerTaskOutputAgentJobLevel extends ConnectToSourceSqlServerTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java index 25f294d2a841c..0fb4f60f4dc74 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java @@ -17,7 +17,7 @@ * Database level output for the task that validates connection to SQL Server * and also validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutputDatabaseLevel.class) @JsonTypeName("DatabaseLevelOutput") public class ConnectToSourceSqlServerTaskOutputDatabaseLevel extends ConnectToSourceSqlServerTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java index f4cbbae769c59..83e4ca0b704cb 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java @@ -16,7 +16,7 @@ * Login level output for the task that validates connection to SQL Server and * also validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutputLoginLevel.class) @JsonTypeName("LoginLevelOutput") public class ConnectToSourceSqlServerTaskOutputLoginLevel extends ConnectToSourceSqlServerTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java index e1b1870bda075..403532deab096 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java @@ -18,7 +18,7 @@ * Task level output for the task that validates connection to SQL Server and * also validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = ConnectToSourceSqlServerTaskOutputTaskLevel.class) @JsonTypeName("TaskLevelOutput") public class ConnectToSourceSqlServerTaskOutputTaskLevel extends ConnectToSourceSqlServerTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java index 50c0c18713d00..1cd0abb274cb9 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to SQL Server and also * validates source server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToSourceSqlServerTaskProperties.class) @JsonTypeName("ConnectToSource.SqlServer") public class ConnectToSourceSqlServerTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java index 0ba4955a28097..79fa93730ad51 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to Azure Database for * MySQL and target server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetAzureDbForMySqlTaskProperties.class) @JsonTypeName("ConnectToTarget.AzureDbForMySql") public class ConnectToTargetAzureDbForMySqlTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskInput.java new file mode 100644 index 0000000000000..bff9b0d999300 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskInput.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to Azure Database for + * PostgreSQL and target server requirements. + */ +public class ConnectToTargetAzureDbForPostgreSqlSyncTaskInput { + /** + * Connection information for source PostgreSQL server. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private PostgreSqlConnectionInfo sourceConnectionInfo; + + /** + * Connection information for target Azure Database for PostgreSQL server. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private PostgreSqlConnectionInfo targetConnectionInfo; + + /** + * Get connection information for source PostgreSQL server. + * + * @return the sourceConnectionInfo value + */ + public PostgreSqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set connection information for source PostgreSQL server. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the ConnectToTargetAzureDbForPostgreSqlSyncTaskInput object itself. + */ + public ConnectToTargetAzureDbForPostgreSqlSyncTaskInput withSourceConnectionInfo(PostgreSqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get connection information for target Azure Database for PostgreSQL server. + * + * @return the targetConnectionInfo value + */ + public PostgreSqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target Azure Database for PostgreSQL server. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ConnectToTargetAzureDbForPostgreSqlSyncTaskInput object itself. + */ + public ConnectToTargetAzureDbForPostgreSqlSyncTaskInput withTargetConnectionInfo(PostgreSqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput.java new file mode 100644 index 0000000000000..9cb10b4ba160a --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the task that validates connection to Azure Database for + * PostgreSQL and target server requirements. + */ +public class ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Version of the target server. + */ + @JsonProperty(value = "targetServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerVersion; + + /** + * List of databases on target server. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private List databases; + + /** + * Target server brand version. + */ + @JsonProperty(value = "targetServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerBrandVersion; + + /** + * Validation errors associated with the task. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get version of the target server. + * + * @return the targetServerVersion value + */ + public String targetServerVersion() { + return this.targetServerVersion; + } + + /** + * Get list of databases on target server. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Get target server brand version. + * + * @return the targetServerBrandVersion value + */ + public String targetServerBrandVersion() { + return this.targetServerBrandVersion; + } + + /** + * Get validation errors associated with the task. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java new file mode 100644 index 0000000000000..5634c372d5fe2 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that validates connection to Azure Database For + * PostgreSQL server and target server requirements for online migration. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.class) +@JsonTypeName("ConnectToTarget.AzureDbForPostgreSql.Sync") +public class ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToTargetAzureDbForPostgreSqlSyncTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public ConnectToTargetAzureDbForPostgreSqlSyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties object itself. + */ + public ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties withInput(ConnectToTargetAzureDbForPostgreSqlSyncTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput.java new file mode 100644 index 0000000000000..f682bd71f8c24 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to Azure Database for + * PostgreSQL and target server requirements for Oracle source. + */ +public class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput { + /** + * Connection information for target Azure Database for PostgreSQL server. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private PostgreSqlConnectionInfo targetConnectionInfo; + + /** + * Get connection information for target Azure Database for PostgreSQL server. + * + * @return the targetConnectionInfo value + */ + public PostgreSqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target Azure Database for PostgreSQL server. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput object itself. + */ + public ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput withTargetConnectionInfo(PostgreSqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput.java new file mode 100644 index 0000000000000..775112b5ae41a --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the task that validates connection to Azure Database for + * PostgreSQL and target server requirements for Oracle source. + */ +public class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput { + /** + * Version of the target server. + */ + @JsonProperty(value = "targetServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerVersion; + + /** + * List of databases on target server. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private List databases; + + /** + * Target server brand version. + */ + @JsonProperty(value = "targetServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerBrandVersion; + + /** + * Validation errors associated with the task. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Mapping of schemas per database. + */ + @JsonProperty(value = "databaseSchemaMap") + private List databaseSchemaMap; + + /** + * Get version of the target server. + * + * @return the targetServerVersion value + */ + public String targetServerVersion() { + return this.targetServerVersion; + } + + /** + * Get list of databases on target server. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Get target server brand version. + * + * @return the targetServerBrandVersion value + */ + public String targetServerBrandVersion() { + return this.targetServerBrandVersion; + } + + /** + * Get validation errors associated with the task. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + + /** + * Get mapping of schemas per database. + * + * @return the databaseSchemaMap value + */ + public List databaseSchemaMap() { + return this.databaseSchemaMap; + } + + /** + * Set mapping of schemas per database. + * + * @param databaseSchemaMap the databaseSchemaMap value to set + * @return the ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput object itself. + */ + public ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput withDatabaseSchemaMap(List databaseSchemaMap) { + this.databaseSchemaMap = databaseSchemaMap; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem.java new file mode 100644 index 0000000000000..2d43d5a735ba1 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The + * ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem + * model. + */ +public class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem { + /** + * The database property. + */ + @JsonProperty(value = "database") + private String database; + + /** + * The schemas property. + */ + @JsonProperty(value = "schemas") + private List schemas; + + /** + * Get the database value. + * + * @return the database value + */ + public String database() { + return this.database; + } + + /** + * Set the database value. + * + * @param database the database value to set + * @return the ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem object itself. + */ + public ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem withDatabase(String database) { + this.database = database; + return this; + } + + /** + * Get the schemas value. + * + * @return the schemas value + */ + public List schemas() { + return this.schemas; + } + + /** + * Set the schemas value. + * + * @param schemas the schemas value to set + * @return the ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem object itself. + */ + public ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem withSchemas(List schemas) { + this.schemas = schemas; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.java new file mode 100644 index 0000000000000..871ab0a66616a --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that validates connection to Azure Database For + * PostgreSQL server and target server requirements for online migration for + * Oracle source. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.class) +@JsonTypeName("ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync") +public class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties object itself. + */ + public ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties withInput(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java index 41bf8703326ea..f1e95979af9ab 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to SQL DB and target * server requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetSqlDbTaskProperties.class) @JsonTypeName("ConnectToTarget.SqlDb") public class ConnectToTargetSqlDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskInput.java new file mode 100644 index 0000000000000..ca40c9b0f2434 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskInput.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to Azure SQL Database Managed + * Instance online scenario. + */ +public class ConnectToTargetSqlMISyncTaskInput { + /** + * Connection information for Azure SQL Database Managed Instance. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private MiSqlConnectionInfo targetConnectionInfo; + + /** + * Azure Active Directory Application the DMS instance will use to connect + * to the target instance of Azure SQL Database Managed Instance and the + * Azure Storage Account. + */ + @JsonProperty(value = "azureApp", required = true) + private AzureActiveDirectoryApp azureApp; + + /** + * Get connection information for Azure SQL Database Managed Instance. + * + * @return the targetConnectionInfo value + */ + public MiSqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for Azure SQL Database Managed Instance. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ConnectToTargetSqlMISyncTaskInput object itself. + */ + public ConnectToTargetSqlMISyncTaskInput withTargetConnectionInfo(MiSqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * Get azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account. + * + * @return the azureApp value + */ + public AzureActiveDirectoryApp azureApp() { + return this.azureApp; + } + + /** + * Set azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account. + * + * @param azureApp the azureApp value to set + * @return the ConnectToTargetSqlMISyncTaskInput object itself. + */ + public ConnectToTargetSqlMISyncTaskInput withAzureApp(AzureActiveDirectoryApp azureApp) { + this.azureApp = azureApp; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskOutput.java new file mode 100644 index 0000000000000..76fed29c64ca6 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskOutput.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the task that validates connection to Azure SQL Database Managed + * Instance. + */ +public class ConnectToTargetSqlMISyncTaskOutput { + /** + * Target server version. + */ + @JsonProperty(value = "targetServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerVersion; + + /** + * Target server brand version. + */ + @JsonProperty(value = "targetServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerBrandVersion; + + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get target server version. + * + * @return the targetServerVersion value + */ + public String targetServerVersion() { + return this.targetServerVersion; + } + + /** + * Get target server brand version. + * + * @return the targetServerBrandVersion value + */ + public String targetServerBrandVersion() { + return this.targetServerBrandVersion; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskProperties.java new file mode 100644 index 0000000000000..e519cb6fc76a0 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMISyncTaskProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that validates connection to Azure SQL Database + * Managed Instance. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetSqlMISyncTaskProperties.class) +@JsonTypeName("ConnectToTarget.AzureSqlDbMI.Sync.LRS") +public class ConnectToTargetSqlMISyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToTargetSqlMISyncTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public ConnectToTargetSqlMISyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToTargetSqlMISyncTaskProperties object itself. + */ + public ConnectToTargetSqlMISyncTaskProperties withInput(ConnectToTargetSqlMISyncTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskInput.java index c272b707524fa..725c16c1cfad0 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskInput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskInput.java @@ -21,6 +21,25 @@ public class ConnectToTargetSqlMITaskInput { @JsonProperty(value = "targetConnectionInfo", required = true) private SqlConnectionInfo targetConnectionInfo; + /** + * Flag for whether to collect logins from target SQL MI server. + */ + @JsonProperty(value = "collectLogins") + private Boolean collectLogins; + + /** + * Flag for whether to collect agent jobs from target SQL MI server. + */ + @JsonProperty(value = "collectAgentJobs") + private Boolean collectAgentJobs; + + /** + * Flag for whether to validate SSIS catalog is reachable on the target SQL + * MI server. + */ + @JsonProperty(value = "validateSsisCatalogOnly") + private Boolean validateSsisCatalogOnly; + /** * Get connection information for target SQL Server. * @@ -41,4 +60,64 @@ public ConnectToTargetSqlMITaskInput withTargetConnectionInfo(SqlConnectionInfo return this; } + /** + * Get flag for whether to collect logins from target SQL MI server. + * + * @return the collectLogins value + */ + public Boolean collectLogins() { + return this.collectLogins; + } + + /** + * Set flag for whether to collect logins from target SQL MI server. + * + * @param collectLogins the collectLogins value to set + * @return the ConnectToTargetSqlMITaskInput object itself. + */ + public ConnectToTargetSqlMITaskInput withCollectLogins(Boolean collectLogins) { + this.collectLogins = collectLogins; + return this; + } + + /** + * Get flag for whether to collect agent jobs from target SQL MI server. + * + * @return the collectAgentJobs value + */ + public Boolean collectAgentJobs() { + return this.collectAgentJobs; + } + + /** + * Set flag for whether to collect agent jobs from target SQL MI server. + * + * @param collectAgentJobs the collectAgentJobs value to set + * @return the ConnectToTargetSqlMITaskInput object itself. + */ + public ConnectToTargetSqlMITaskInput withCollectAgentJobs(Boolean collectAgentJobs) { + this.collectAgentJobs = collectAgentJobs; + return this; + } + + /** + * Get flag for whether to validate SSIS catalog is reachable on the target SQL MI server. + * + * @return the validateSsisCatalogOnly value + */ + public Boolean validateSsisCatalogOnly() { + return this.validateSsisCatalogOnly; + } + + /** + * Set flag for whether to validate SSIS catalog is reachable on the target SQL MI server. + * + * @param validateSsisCatalogOnly the validateSsisCatalogOnly value to set + * @return the ConnectToTargetSqlMITaskInput object itself. + */ + public ConnectToTargetSqlMITaskInput withValidateSsisCatalogOnly(Boolean validateSsisCatalogOnly) { + this.validateSsisCatalogOnly = validateSsisCatalogOnly; + return this; + } + } diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java index faea27badcd55..2e607944fb82b 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to Azure SQL Database * Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetSqlMITaskProperties.class) @JsonTypeName("ConnectToTarget.AzureSqlDbMI") public class ConnectToTargetSqlMITaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java index a9f1f370bc61c..b888fe78181c0 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates connection to SQL DB and target * server requirements for online migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ConnectToTargetSqlSqlDbSyncTaskProperties.class) @JsonTypeName("ConnectToTarget.SqlDb.Sync") public class ConnectToTargetSqlSqlDbSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectionInfo.java index 66a77d7439ffd..79d4024da87f1 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ConnectionInfo.java @@ -16,30 +16,45 @@ /** * Defines the connection properties of a server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = ConnectionInfo.class) @JsonTypeName("Unknown") @JsonSubTypes({ + @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureDbSqlMi.Complete", value = MigrateMISyncCompleteCommandProperties.class), @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class), + @JsonSubTypes.Type(name = "MiSqlConnectionInfo", value = MiSqlConnectionInfo.class), @JsonSubTypes.Type(name = "PostgreSqlConnectionInfo", value = PostgreSqlConnectionInfo.class), + @JsonSubTypes.Type(name = "OracleConnectionInfo", value = OracleConnectionInfo.class), @JsonSubTypes.Type(name = "MySqlConnectionInfo", value = MySqlConnectionInfo.class), @JsonSubTypes.Type(name = "MongoDbConnectionInfo", value = MongoDbConnectionInfo.class), @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), + @JsonSubTypes.Type(name = "Migrate.Ssis", value = MigrateSsisTaskProperties.class), @JsonSubTypes.Type(name = "GetTDECertificates.Sql", value = GetTdeCertificatesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "Validate.Oracle.AzureDbPostgreSql.Sync", value = ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Validate.MongoDb", value = ValidateMongoDbTaskProperties.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", value = ValidateMigrationInputSqlServerSqlMISyncTaskProperties.class), @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.SqlDb.Sync", value = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.Oracle.AzureDbForPostgreSql.Sync", value = MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.PostgreSql.AzureDbForPostgreSql.Sync", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.MySql.AzureDbForMySql.Sync", value = MigrateMySqlAzureDbForMySqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDb.Sync", value = MigrateSqlServerSqlDbSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", value = MigrateSqlServerSqlMISyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI", value = MigrateSqlServerSqlMITaskProperties.class), @JsonSubTypes.Type(name = "Migrate.MongoDb", value = MigrateMongoDbTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForMySql", value = ConnectToTargetAzureDbForMySqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI.Sync.LRS", value = ConnectToTargetSqlMISyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTablesPostgreSql", value = GetUserTablesPostgreSqlTaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTablesOracle", value = GetUserTablesOracleTaskProperties.class), @JsonSubTypes.Type(name = "GetUserTables.AzureSqlDb.Sync", value = GetUserTablesSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", value = ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForPostgreSql.Sync", value = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb.Sync", value = ConnectToTargetSqlSqlDbSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToSource.Oracle.Sync", value = ConnectToSourceOracleSyncTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToSource.PostgreSql.Sync", value = ConnectToSourcePostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToSource.SqlServer.Sync", value = ConnectToSourceSqlServerSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class), @JsonSubTypes.Type(name = "Connect.MongoDb", value = ConnectToMongoDbTaskProperties.class), @@ -47,7 +62,10 @@ @JsonSubTypes.Type(name = "MigrateSchemaSqlServerSqlDb", value = MigrateSchemaSqlServerSqlDbTaskProperties.class), @JsonSubTypes.Type(name = "cancel", value = MongoDbCancelCommand.class), @JsonSubTypes.Type(name = "finish", value = MongoDbFinishCommand.class), - @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class) + @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class), + @JsonSubTypes.Type(name = "Service.Check.OCI", value = CheckOCIDriverTaskProperties.class), + @JsonSubTypes.Type(name = "Service.Upload.OCI", value = UploadOCIDriverTaskProperties.class), + @JsonSubTypes.Type(name = "Service.Install.OCI", value = InstallOCIDriverTaskProperties.class) }) public class ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/DatabaseMigrationState.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/DatabaseMigrationState.java new file mode 100644 index 0000000000000..62fd134648aca --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/DatabaseMigrationState.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabaseMigrationState. + */ +public final class DatabaseMigrationState extends ExpandableStringEnum { + /** Static value UNDEFINED for DatabaseMigrationState. */ + public static final DatabaseMigrationState UNDEFINED = fromString("UNDEFINED"); + + /** Static value INITIAL for DatabaseMigrationState. */ + public static final DatabaseMigrationState INITIAL = fromString("INITIAL"); + + /** Static value FULL_BACKUP_UPLOAD_START for DatabaseMigrationState. */ + public static final DatabaseMigrationState FULL_BACKUP_UPLOAD_START = fromString("FULL_BACKUP_UPLOAD_START"); + + /** Static value LOG_SHIPPING_START for DatabaseMigrationState. */ + public static final DatabaseMigrationState LOG_SHIPPING_START = fromString("LOG_SHIPPING_START"); + + /** Static value UPLOAD_LOG_FILES_START for DatabaseMigrationState. */ + public static final DatabaseMigrationState UPLOAD_LOG_FILES_START = fromString("UPLOAD_LOG_FILES_START"); + + /** Static value CUTOVER_START for DatabaseMigrationState. */ + public static final DatabaseMigrationState CUTOVER_START = fromString("CUTOVER_START"); + + /** Static value POST_CUTOVER_COMPLETE for DatabaseMigrationState. */ + public static final DatabaseMigrationState POST_CUTOVER_COMPLETE = fromString("POST_CUTOVER_COMPLETE"); + + /** Static value COMPLETED for DatabaseMigrationState. */ + public static final DatabaseMigrationState COMPLETED = fromString("COMPLETED"); + + /** Static value CANCELLED for DatabaseMigrationState. */ + public static final DatabaseMigrationState CANCELLED = fromString("CANCELLED"); + + /** Static value FAILED for DatabaseMigrationState. */ + public static final DatabaseMigrationState FAILED = fromString("FAILED"); + + /** + * Creates or finds a DatabaseMigrationState from its string representation. + * @param name a name to look for + * @return the corresponding DatabaseMigrationState + */ + @JsonCreator + public static DatabaseMigrationState fromString(String name) { + return fromString(name, DatabaseMigrationState.class); + } + + /** + * @return known DatabaseMigrationState values + */ + public static Collection values() { + return values(DatabaseMigrationState.class); + } +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java index 859c4d2e44e72..0c8521e017be0 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java @@ -16,7 +16,7 @@ /** * Properties for the task that gets TDE certificates in Base64 encoded format. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetTdeCertificatesSqlTaskProperties.class) @JsonTypeName("GetTDECertificates.Sql") public class GetTdeCertificatesSqlTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskInput.java new file mode 100644 index 0000000000000..9272e4a781a42 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskInput.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that gets the list of tables contained within a provided + * list of Oracle schemas. + */ +public class GetUserTablesOracleTaskInput { + /** + * Information for connecting to Oracle source. + */ + @JsonProperty(value = "connectionInfo", required = true) + private OracleConnectionInfo connectionInfo; + + /** + * List of Oracle schemas for which to collect tables. + */ + @JsonProperty(value = "selectedSchemas", required = true) + private List selectedSchemas; + + /** + * Get information for connecting to Oracle source. + * + * @return the connectionInfo value + */ + public OracleConnectionInfo connectionInfo() { + return this.connectionInfo; + } + + /** + * Set information for connecting to Oracle source. + * + * @param connectionInfo the connectionInfo value to set + * @return the GetUserTablesOracleTaskInput object itself. + */ + public GetUserTablesOracleTaskInput withConnectionInfo(OracleConnectionInfo connectionInfo) { + this.connectionInfo = connectionInfo; + return this; + } + + /** + * Get list of Oracle schemas for which to collect tables. + * + * @return the selectedSchemas value + */ + public List selectedSchemas() { + return this.selectedSchemas; + } + + /** + * Set list of Oracle schemas for which to collect tables. + * + * @param selectedSchemas the selectedSchemas value to set + * @return the GetUserTablesOracleTaskInput object itself. + */ + public GetUserTablesOracleTaskInput withSelectedSchemas(List selectedSchemas) { + this.selectedSchemas = selectedSchemas; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskOutput.java new file mode 100644 index 0000000000000..969b4e2e4d07b --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskOutput.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the task that gets the list of tables contained within a provided + * list of Oracle schemas. + */ +public class GetUserTablesOracleTaskOutput { + /** + * The schema this result is for. + */ + @JsonProperty(value = "schemaName", access = JsonProperty.Access.WRITE_ONLY) + private String schemaName; + + /** + * List of valid tables found for this schema. + */ + @JsonProperty(value = "tables", access = JsonProperty.Access.WRITE_ONLY) + private List tables; + + /** + * Validation errors associated with the task. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get the schema this result is for. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Get list of valid tables found for this schema. + * + * @return the tables value + */ + public List tables() { + return this.tables; + } + + /** + * Get validation errors associated with the task. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskProperties.java new file mode 100644 index 0000000000000..f4cf0aae0b762 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesOracleTaskProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that collects user tables for the given list of + * Oracle schemas. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetUserTablesOracleTaskProperties.class) +@JsonTypeName("GetUserTablesOracle") +public class GetUserTablesOracleTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private GetUserTablesOracleTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public GetUserTablesOracleTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the GetUserTablesOracleTaskProperties object itself. + */ + public GetUserTablesOracleTaskProperties withInput(GetUserTablesOracleTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskInput.java new file mode 100644 index 0000000000000..9732d6b6ad081 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskInput.java @@ -0,0 +1,71 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that gets the list of tables for a provided list of + * PostgreSQL databases. + */ +public class GetUserTablesPostgreSqlTaskInput { + /** + * Information for connecting to PostgreSQL source. + */ + @JsonProperty(value = "connectionInfo", required = true) + private PostgreSqlConnectionInfo connectionInfo; + + /** + * List of PostgreSQL databases for which to collect tables. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Get information for connecting to PostgreSQL source. + * + * @return the connectionInfo value + */ + public PostgreSqlConnectionInfo connectionInfo() { + return this.connectionInfo; + } + + /** + * Set information for connecting to PostgreSQL source. + * + * @param connectionInfo the connectionInfo value to set + * @return the GetUserTablesPostgreSqlTaskInput object itself. + */ + public GetUserTablesPostgreSqlTaskInput withConnectionInfo(PostgreSqlConnectionInfo connectionInfo) { + this.connectionInfo = connectionInfo; + return this; + } + + /** + * Get list of PostgreSQL databases for which to collect tables. + * + * @return the selectedDatabases value + */ + public List selectedDatabases() { + return this.selectedDatabases; + } + + /** + * Set list of PostgreSQL databases for which to collect tables. + * + * @param selectedDatabases the selectedDatabases value to set + * @return the GetUserTablesPostgreSqlTaskInput object itself. + */ + public GetUserTablesPostgreSqlTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskOutput.java new file mode 100644 index 0000000000000..e191a82a61624 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskOutput.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the task that gets the list of tables for a provided list of + * PostgreSQL databases. + */ +public class GetUserTablesPostgreSqlTaskOutput { + /** + * The database this result is for. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * List of valid tables found for this database. + */ + @JsonProperty(value = "tables", access = JsonProperty.Access.WRITE_ONLY) + private List tables; + + /** + * Validation errors associated with the task. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get the database this result is for. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Get list of valid tables found for this database. + * + * @return the tables value + */ + public List tables() { + return this.tables; + } + + /** + * Get validation errors associated with the task. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskProperties.java new file mode 100644 index 0000000000000..e96ec1e909036 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesPostgreSqlTaskProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that collects user tables for the given list of + * databases. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetUserTablesPostgreSqlTaskProperties.class) +@JsonTypeName("GetUserTablesPostgreSql") +public class GetUserTablesPostgreSqlTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private GetUserTablesPostgreSqlTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public GetUserTablesPostgreSqlTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the GetUserTablesPostgreSqlTaskProperties object itself. + */ + public GetUserTablesPostgreSqlTaskProperties withInput(GetUserTablesPostgreSqlTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java index 6fc255df11d17..c5403146628a3 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that collects user tables for the given list of * databases. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetUserTablesSqlSyncTaskProperties.class) @JsonTypeName("GetUserTables.AzureSqlDb.Sync") public class GetUserTablesSqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java index d3e975fd41b5c..21e987b48f37d 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that collects user tables for the given list of * databases. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = GetUserTablesSqlTaskProperties.class) @JsonTypeName("GetUserTables.Sql") public class GetUserTablesSqlTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskInput.java new file mode 100644 index 0000000000000..39e15dc302242 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskInput.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the service task to install an OCI driver. + */ +public class InstallOCIDriverTaskInput { + /** + * Name of the uploaded driver package to install. + */ + @JsonProperty(value = "driverPackageName") + private String driverPackageName; + + /** + * Get name of the uploaded driver package to install. + * + * @return the driverPackageName value + */ + public String driverPackageName() { + return this.driverPackageName; + } + + /** + * Set name of the uploaded driver package to install. + * + * @param driverPackageName the driverPackageName value to set + * @return the InstallOCIDriverTaskInput object itself. + */ + public InstallOCIDriverTaskInput withDriverPackageName(String driverPackageName) { + this.driverPackageName = driverPackageName; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskOutput.java new file mode 100644 index 0000000000000..8fee73903a3ee --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskOutput.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the service task to install an OCI driver. + */ +public class InstallOCIDriverTaskOutput { + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskProperties.java new file mode 100644 index 0000000000000..86443cf438658 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/InstallOCIDriverTaskProperties.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that installs an OCI driver. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = InstallOCIDriverTaskProperties.class) +@JsonTypeName("Service.Install.OCI") +public class InstallOCIDriverTaskProperties extends ProjectTaskProperties { + /** + * The input property. + */ + @JsonProperty(value = "input") + private InstallOCIDriverTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get the input value. + * + * @return the input value + */ + public InstallOCIDriverTaskInput input() { + return this.input; + } + + /** + * Set the input value. + * + * @param input the input value to set + * @return the InstallOCIDriverTaskProperties object itself. + */ + public InstallOCIDriverTaskProperties withInput(InstallOCIDriverTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MiSqlConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MiSqlConnectionInfo.java new file mode 100644 index 0000000000000..0c68a37e473b3 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MiSqlConnectionInfo.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties required to create a connection to Azure SQL database Managed + * instance. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = MiSqlConnectionInfo.class) +@JsonTypeName("MiSqlConnectionInfo") +public class MiSqlConnectionInfo extends ConnectionInfo { + /** + * Resource id for Azure SQL database Managed instance. + */ + @JsonProperty(value = "managedInstanceResourceId", required = true) + private String managedInstanceResourceId; + + /** + * Get resource id for Azure SQL database Managed instance. + * + * @return the managedInstanceResourceId value + */ + public String managedInstanceResourceId() { + return this.managedInstanceResourceId; + } + + /** + * Set resource id for Azure SQL database Managed instance. + * + * @param managedInstanceResourceId the managedInstanceResourceId value to set + * @return the MiSqlConnectionInfo object itself. + */ + public MiSqlConnectionInfo withManagedInstanceResourceId(String managedInstanceResourceId) { + this.managedInstanceResourceId = managedInstanceResourceId; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandInput.java new file mode 100644 index 0000000000000..6086851bc8368 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandInput.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for command that completes online migration for an Azure SQL Database + * Managed Instance. + */ +public class MigrateMISyncCompleteCommandInput { + /** + * Name of managed instance database. + */ + @JsonProperty(value = "sourceDatabaseName", required = true) + private String sourceDatabaseName; + + /** + * Get name of managed instance database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Set name of managed instance database. + * + * @param sourceDatabaseName the sourceDatabaseName value to set + * @return the MigrateMISyncCompleteCommandInput object itself. + */ + public MigrateMISyncCompleteCommandInput withSourceDatabaseName(String sourceDatabaseName) { + this.sourceDatabaseName = sourceDatabaseName; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandOutput.java new file mode 100644 index 0000000000000..b41de92b48916 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandOutput.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for command that completes online migration for an Azure SQL Database + * Managed Instance. + */ +public class MigrateMISyncCompleteCommandOutput { + /** + * List of errors that happened during the command execution. + */ + @JsonProperty(value = "errors") + private List errors; + + /** + * Get list of errors that happened during the command execution. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + + /** + * Set list of errors that happened during the command execution. + * + * @param errors the errors value to set + * @return the MigrateMISyncCompleteCommandOutput object itself. + */ + public MigrateMISyncCompleteCommandOutput withErrors(List errors) { + this.errors = errors; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandProperties.java new file mode 100644 index 0000000000000..b694c2c81168b --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMISyncCompleteCommandProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.implementation.CommandPropertiesInner; + +/** + * Properties for the command that completes online migration for an Azure SQL + * Database Managed Instance. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = MigrateMISyncCompleteCommandProperties.class) +@JsonTypeName("Migrate.SqlServer.AzureDbSqlMi.Complete") +public class MigrateMISyncCompleteCommandProperties extends CommandPropertiesInner { + /** + * Command input. + */ + @JsonProperty(value = "input") + private MigrateMISyncCompleteCommandInput input; + + /** + * Command output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private MigrateMISyncCompleteCommandOutput output; + + /** + * Get command input. + * + * @return the input value + */ + public MigrateMISyncCompleteCommandInput input() { + return this.input; + } + + /** + * Set command input. + * + * @param input the input value to set + * @return the MigrateMISyncCompleteCommandProperties object itself. + */ + public MigrateMISyncCompleteCommandProperties withInput(MigrateMISyncCompleteCommandInput input) { + this.input = input; + return this; + } + + /** + * Get command output. This is ignored if submitted. + * + * @return the output value + */ + public MigrateMISyncCompleteCommandOutput output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMongoDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMongoDbTaskProperties.java index 3783388278f6e..0a05721e7f535 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMongoDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMongoDbTaskProperties.java @@ -16,7 +16,7 @@ /** * Properties for the task that migrates data between MongoDB data sources. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateMongoDbTaskProperties.class) @JsonTypeName("Migrate.MongoDb") public class MigrateMongoDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java index 9c6511a2ddb25..afb4df9497964 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.datamigration.v2018_07_15_preview; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -28,6 +29,24 @@ public class MigrateMySqlAzureDbForMySqlSyncDatabaseInput { @JsonProperty(value = "targetDatabaseName") private String targetDatabaseName; + /** + * Migration settings which tune the migration behavior. + */ + @JsonProperty(value = "migrationSetting") + private Map migrationSetting; + + /** + * Source settings to tune source endpoint migration behavior. + */ + @JsonProperty(value = "sourceSetting") + private Map sourceSetting; + + /** + * Target settings to tune target endpoint migration behavior. + */ + @JsonProperty(value = "targetSetting") + private Map targetSetting; + /** * Get name of the database. * @@ -68,4 +87,64 @@ public MigrateMySqlAzureDbForMySqlSyncDatabaseInput withTargetDatabaseName(Strin return this; } + /** + * Get migration settings which tune the migration behavior. + * + * @return the migrationSetting value + */ + public Map migrationSetting() { + return this.migrationSetting; + } + + /** + * Set migration settings which tune the migration behavior. + * + * @param migrationSetting the migrationSetting value to set + * @return the MigrateMySqlAzureDbForMySqlSyncDatabaseInput object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncDatabaseInput withMigrationSetting(Map migrationSetting) { + this.migrationSetting = migrationSetting; + return this; + } + + /** + * Get source settings to tune source endpoint migration behavior. + * + * @return the sourceSetting value + */ + public Map sourceSetting() { + return this.sourceSetting; + } + + /** + * Set source settings to tune source endpoint migration behavior. + * + * @param sourceSetting the sourceSetting value to set + * @return the MigrateMySqlAzureDbForMySqlSyncDatabaseInput object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncDatabaseInput withSourceSetting(Map sourceSetting) { + this.sourceSetting = sourceSetting; + return this; + } + + /** + * Get target settings to tune target endpoint migration behavior. + * + * @return the targetSetting value + */ + public Map targetSetting() { + return this.targetSetting; + } + + /** + * Set target settings to tune target endpoint migration behavior. + * + * @param targetSetting the targetSetting value to set + * @return the MigrateMySqlAzureDbForMySqlSyncDatabaseInput object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncDatabaseInput withTargetSetting(Map targetSetting) { + this.targetSetting = targetSetting; + return this; + } + } diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java index 65519021593f9..adab82444daad 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates MySQL databases to Azure Database for * MySQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutput.class) @JsonTypeName("MigrateMySqlAzureDbForMySqlSyncTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java index 75a8a0837b7bf..49cbcc1b03f79 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java @@ -16,7 +16,7 @@ /** * The MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.class) @JsonTypeName("DatabaseLevelErrorOutput") public class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java index 54e7ede733d73..5e9ef0029d430 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java @@ -16,7 +16,7 @@ /** * The MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.class) @JsonTypeName("DatabaseLevelOutput") public class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java index c6f586d45a32e..9633409eb9ee7 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateMySqlAzureDbForMySqlSyncTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutputError.class) @JsonTypeName("ErrorOutput") public class MigrateMySqlAzureDbForMySqlSyncTaskOutputError extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java index f905f16855a41..fd30236afc588 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java @@ -16,7 +16,7 @@ /** * The MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.class) @JsonTypeName("MigrationLevelOutput") public class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java index 10a44aea98736..9b714b311904a 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java @@ -16,7 +16,7 @@ /** * The MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.class) @JsonTypeName("TableLevelOutput") public class MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java index eb6da201f3af7..c2110fb52f59f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that migrates MySQL databases to Azure Database for * MySQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskProperties.class) @JsonTypeName("Migrate.MySql.AzureDbForMySql.Sync") public class MigrateMySqlAzureDbForMySqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.java new file mode 100644 index 0000000000000..08fa5d22ac409 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that migrates Oracle to Azure Database for + * PostgreSQL for online migrations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.class) +@JsonTypeName("Migrate.Oracle.AzureDbForPostgreSql.Sync") +public class MigrateOracleAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateOracleAzureDbPostgreSqlSyncTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public MigrateOracleAzureDbPostgreSqlSyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateOracleAzureDbForPostgreSqlSyncTaskProperties object itself. + */ + public MigrateOracleAzureDbForPostgreSqlSyncTaskProperties withInput(MigrateOracleAzureDbPostgreSqlSyncTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncDatabaseInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncDatabaseInput.java new file mode 100644 index 0000000000000..5fddb98cb0f77 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncDatabaseInput.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for Oracle to Azure Database for PostgreSQL + * migration task inputs. + */ +public class MigrateOracleAzureDbPostgreSqlSyncDatabaseInput { + /** + * How to handle object name casing: either Preserve or ToLower. + */ + @JsonProperty(value = "caseManipulation") + private String caseManipulation; + + /** + * Name of the migration pipeline. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Name of the source schema. + */ + @JsonProperty(value = "schemaName") + private String schemaName; + + /** + * Mapping of source to target tables. + */ + @JsonProperty(value = "tableMap") + private Map tableMap; + + /** + * Name of target database. Note: Target database will be truncated before + * starting migration. + */ + @JsonProperty(value = "targetDatabaseName") + private String targetDatabaseName; + + /** + * Migration settings which tune the migration behavior. + */ + @JsonProperty(value = "migrationSetting") + private Map migrationSetting; + + /** + * Source settings to tune source endpoint migration behavior. + */ + @JsonProperty(value = "sourceSetting") + private Map sourceSetting; + + /** + * Target settings to tune target endpoint migration behavior. + */ + @JsonProperty(value = "targetSetting") + private Map targetSetting; + + /** + * Get how to handle object name casing: either Preserve or ToLower. + * + * @return the caseManipulation value + */ + public String caseManipulation() { + return this.caseManipulation; + } + + /** + * Set how to handle object name casing: either Preserve or ToLower. + * + * @param caseManipulation the caseManipulation value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncDatabaseInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncDatabaseInput withCaseManipulation(String caseManipulation) { + this.caseManipulation = caseManipulation; + return this; + } + + /** + * Get name of the migration pipeline. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the migration pipeline. + * + * @param name the name value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncDatabaseInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncDatabaseInput withName(String name) { + this.name = name; + return this; + } + + /** + * Get name of the source schema. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set name of the source schema. + * + * @param schemaName the schemaName value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncDatabaseInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncDatabaseInput withSchemaName(String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Get mapping of source to target tables. + * + * @return the tableMap value + */ + public Map tableMap() { + return this.tableMap; + } + + /** + * Set mapping of source to target tables. + * + * @param tableMap the tableMap value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncDatabaseInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncDatabaseInput withTableMap(Map tableMap) { + this.tableMap = tableMap; + return this; + } + + /** + * Get name of target database. Note: Target database will be truncated before starting migration. + * + * @return the targetDatabaseName value + */ + public String targetDatabaseName() { + return this.targetDatabaseName; + } + + /** + * Set name of target database. Note: Target database will be truncated before starting migration. + * + * @param targetDatabaseName the targetDatabaseName value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncDatabaseInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncDatabaseInput withTargetDatabaseName(String targetDatabaseName) { + this.targetDatabaseName = targetDatabaseName; + return this; + } + + /** + * Get migration settings which tune the migration behavior. + * + * @return the migrationSetting value + */ + public Map migrationSetting() { + return this.migrationSetting; + } + + /** + * Set migration settings which tune the migration behavior. + * + * @param migrationSetting the migrationSetting value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncDatabaseInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncDatabaseInput withMigrationSetting(Map migrationSetting) { + this.migrationSetting = migrationSetting; + return this; + } + + /** + * Get source settings to tune source endpoint migration behavior. + * + * @return the sourceSetting value + */ + public Map sourceSetting() { + return this.sourceSetting; + } + + /** + * Set source settings to tune source endpoint migration behavior. + * + * @param sourceSetting the sourceSetting value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncDatabaseInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncDatabaseInput withSourceSetting(Map sourceSetting) { + this.sourceSetting = sourceSetting; + return this; + } + + /** + * Get target settings to tune target endpoint migration behavior. + * + * @return the targetSetting value + */ + public Map targetSetting() { + return this.targetSetting; + } + + /** + * Set target settings to tune target endpoint migration behavior. + * + * @param targetSetting the targetSetting value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncDatabaseInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncDatabaseInput withTargetSetting(Map targetSetting) { + this.targetSetting = targetSetting; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskInput.java new file mode 100644 index 0000000000000..e71a9f74af8c8 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskInput.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that migrates Oracle databases to Azure Database for + * PostgreSQL for online migrations. + */ +public class MigrateOracleAzureDbPostgreSqlSyncTaskInput { + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Connection information for target Azure Database for PostgreSQL. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private PostgreSqlConnectionInfo targetConnectionInfo; + + /** + * Connection information for source Oracle. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private OracleConnectionInfo sourceConnectionInfo; + + /** + * Get databases to migrate. + * + * @return the selectedDatabases value + */ + public List selectedDatabases() { + return this.selectedDatabases; + } + + /** + * Set databases to migrate. + * + * @param selectedDatabases the selectedDatabases value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncTaskInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + + /** + * Get connection information for target Azure Database for PostgreSQL. + * + * @return the targetConnectionInfo value + */ + public PostgreSqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target Azure Database for PostgreSQL. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncTaskInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncTaskInput withTargetConnectionInfo(PostgreSqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * Get connection information for source Oracle. + * + * @return the sourceConnectionInfo value + */ + public OracleConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set connection information for source Oracle. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncTaskInput object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncTaskInput withSourceConnectionInfo(OracleConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutput.java new file mode 100644 index 0000000000000..042c9e737263d --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutput.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Output for the task that migrates Oracle databases to Azure Database for + * PostgreSQL for online migrations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutput.class) +@JsonTypeName("MigrateOracleAzureDbPostgreSqlSyncTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.class), + @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.class), + @JsonSubTypes.Type(name = "TableLevelOutput", value = MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.class) +}) +public class MigrateOracleAzureDbPostgreSqlSyncTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.java new file mode 100644 index 0000000000000..3cf00268fbc6c --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError.class) +@JsonTypeName("DatabaseLevelErrorOutput") +public class MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError extends MigrateOracleAzureDbPostgreSqlSyncTaskOutput { + /** + * Error message. + */ + @JsonProperty(value = "errorMessage") + private String errorMessage; + + /** + * List of error events. + */ + @JsonProperty(value = "events") + private List events; + + /** + * Get error message. + * + * @return the errorMessage value + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Set error message. + * + * @param errorMessage the errorMessage value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError withErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Get list of error events. + * + * @return the events value + */ + public List events() { + return this.events; + } + + /** + * Set list of error events. + * + * @param events the events value to set + * @return the MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError object itself. + */ + public MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError withEvents(List events) { + this.events = events; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.java new file mode 100644 index 0000000000000..e95d9e5c96c47 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.java @@ -0,0 +1,250 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel.class) +@JsonTypeName("DatabaseLevelOutput") +public class MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel extends MigrateOracleAzureDbPostgreSqlSyncTaskOutput { + /** + * Name of the database. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * Migration start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Migration end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Migration state that this database is in. Possible values include: + * 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', 'RUNNING', + * 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', + * 'CANCELLED', 'FAILED'. + */ + @JsonProperty(value = "migrationState", access = JsonProperty.Access.WRITE_ONLY) + private SyncDatabaseMigrationReportingState migrationState; + + /** + * Number of incoming changes. + */ + @JsonProperty(value = "incomingChanges", access = JsonProperty.Access.WRITE_ONLY) + private Long incomingChanges; + + /** + * Number of applied changes. + */ + @JsonProperty(value = "appliedChanges", access = JsonProperty.Access.WRITE_ONLY) + private Long appliedChanges; + + /** + * Number of cdc inserts. + */ + @JsonProperty(value = "cdcInsertCounter", access = JsonProperty.Access.WRITE_ONLY) + private Long cdcInsertCounter; + + /** + * Number of cdc deletes. + */ + @JsonProperty(value = "cdcDeleteCounter", access = JsonProperty.Access.WRITE_ONLY) + private Long cdcDeleteCounter; + + /** + * Number of cdc updates. + */ + @JsonProperty(value = "cdcUpdateCounter", access = JsonProperty.Access.WRITE_ONLY) + private Long cdcUpdateCounter; + + /** + * Number of tables completed in full load. + */ + @JsonProperty(value = "fullLoadCompletedTables", access = JsonProperty.Access.WRITE_ONLY) + private Long fullLoadCompletedTables; + + /** + * Number of tables loading in full load. + */ + @JsonProperty(value = "fullLoadLoadingTables", access = JsonProperty.Access.WRITE_ONLY) + private Long fullLoadLoadingTables; + + /** + * Number of tables queued in full load. + */ + @JsonProperty(value = "fullLoadQueuedTables", access = JsonProperty.Access.WRITE_ONLY) + private Long fullLoadQueuedTables; + + /** + * Number of tables errored in full load. + */ + @JsonProperty(value = "fullLoadErroredTables", access = JsonProperty.Access.WRITE_ONLY) + private Long fullLoadErroredTables; + + /** + * Indicates if initial load (full load) has been completed. + */ + @JsonProperty(value = "initializationCompleted", access = JsonProperty.Access.WRITE_ONLY) + private Boolean initializationCompleted; + + /** + * CDC apply latency. + */ + @JsonProperty(value = "latency", access = JsonProperty.Access.WRITE_ONLY) + private Long latency; + + /** + * Get name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Get migration start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get migration end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get migration state that this database is in. Possible values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', 'RUNNING', 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', 'CANCELLED', 'FAILED'. + * + * @return the migrationState value + */ + public SyncDatabaseMigrationReportingState migrationState() { + return this.migrationState; + } + + /** + * Get number of incoming changes. + * + * @return the incomingChanges value + */ + public Long incomingChanges() { + return this.incomingChanges; + } + + /** + * Get number of applied changes. + * + * @return the appliedChanges value + */ + public Long appliedChanges() { + return this.appliedChanges; + } + + /** + * Get number of cdc inserts. + * + * @return the cdcInsertCounter value + */ + public Long cdcInsertCounter() { + return this.cdcInsertCounter; + } + + /** + * Get number of cdc deletes. + * + * @return the cdcDeleteCounter value + */ + public Long cdcDeleteCounter() { + return this.cdcDeleteCounter; + } + + /** + * Get number of cdc updates. + * + * @return the cdcUpdateCounter value + */ + public Long cdcUpdateCounter() { + return this.cdcUpdateCounter; + } + + /** + * Get number of tables completed in full load. + * + * @return the fullLoadCompletedTables value + */ + public Long fullLoadCompletedTables() { + return this.fullLoadCompletedTables; + } + + /** + * Get number of tables loading in full load. + * + * @return the fullLoadLoadingTables value + */ + public Long fullLoadLoadingTables() { + return this.fullLoadLoadingTables; + } + + /** + * Get number of tables queued in full load. + * + * @return the fullLoadQueuedTables value + */ + public Long fullLoadQueuedTables() { + return this.fullLoadQueuedTables; + } + + /** + * Get number of tables errored in full load. + * + * @return the fullLoadErroredTables value + */ + public Long fullLoadErroredTables() { + return this.fullLoadErroredTables; + } + + /** + * Get indicates if initial load (full load) has been completed. + * + * @return the initializationCompleted value + */ + public Boolean initializationCompleted() { + return this.initializationCompleted; + } + + /** + * Get cDC apply latency. + * + * @return the latency value + */ + public Long latency() { + return this.latency; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.java new file mode 100644 index 0000000000000..5465992358b78 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateOracleAzureDbPostgreSqlSyncTaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutputError.class) +@JsonTypeName("ErrorOutput") +public class MigrateOracleAzureDbPostgreSqlSyncTaskOutputError extends MigrateOracleAzureDbPostgreSqlSyncTaskOutput { + /** + * Migration error. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private ReportableException error; + + /** + * Get migration error. + * + * @return the error value + */ + public ReportableException error() { + return this.error; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.java new file mode 100644 index 0000000000000..d68477fbb43c6 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel.class) +@JsonTypeName("MigrationLevelOutput") +public class MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel extends MigrateOracleAzureDbPostgreSqlSyncTaskOutput { + /** + * Migration start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Migration end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Source server version. + */ + @JsonProperty(value = "sourceServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerVersion; + + /** + * Source server name. + */ + @JsonProperty(value = "sourceServer", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServer; + + /** + * Target server version. + */ + @JsonProperty(value = "targetServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerVersion; + + /** + * Target server name. + */ + @JsonProperty(value = "targetServer", access = JsonProperty.Access.WRITE_ONLY) + private String targetServer; + + /** + * Get migration start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get migration end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get source server version. + * + * @return the sourceServerVersion value + */ + public String sourceServerVersion() { + return this.sourceServerVersion; + } + + /** + * Get source server name. + * + * @return the sourceServer value + */ + public String sourceServer() { + return this.sourceServer; + } + + /** + * Get target server version. + * + * @return the targetServerVersion value + */ + public String targetServerVersion() { + return this.targetServerVersion; + } + + /** + * Get target server name. + * + * @return the targetServer value + */ + public String targetServer() { + return this.targetServer; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.java new file mode 100644 index 0000000000000..c862f841e3426 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel.class) +@JsonTypeName("TableLevelOutput") +public class MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel extends MigrateOracleAzureDbPostgreSqlSyncTaskOutput { + /** + * Name of the table. + */ + @JsonProperty(value = "tableName", access = JsonProperty.Access.WRITE_ONLY) + private String tableName; + + /** + * Name of the database. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * Number of applied inserts. + */ + @JsonProperty(value = "cdcInsertCounter", access = JsonProperty.Access.WRITE_ONLY) + private Long cdcInsertCounter; + + /** + * Number of applied updates. + */ + @JsonProperty(value = "cdcUpdateCounter", access = JsonProperty.Access.WRITE_ONLY) + private Long cdcUpdateCounter; + + /** + * Number of applied deletes. + */ + @JsonProperty(value = "cdcDeleteCounter", access = JsonProperty.Access.WRITE_ONLY) + private Long cdcDeleteCounter; + + /** + * Estimate to finish full load. + */ + @JsonProperty(value = "fullLoadEstFinishTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime fullLoadEstFinishTime; + + /** + * Full load start time. + */ + @JsonProperty(value = "fullLoadStartedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime fullLoadStartedOn; + + /** + * Full load end time. + */ + @JsonProperty(value = "fullLoadEndedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime fullLoadEndedOn; + + /** + * Number of rows applied in full load. + */ + @JsonProperty(value = "fullLoadTotalRows", access = JsonProperty.Access.WRITE_ONLY) + private Long fullLoadTotalRows; + + /** + * Current state of the table migration. Possible values include: + * 'BEFORE_LOAD', 'FULL_LOAD', 'COMPLETED', 'CANCELED', 'ERROR', 'FAILED'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private SyncTableMigrationState state; + + /** + * Total number of applied changes. + */ + @JsonProperty(value = "totalChangesApplied", access = JsonProperty.Access.WRITE_ONLY) + private Long totalChangesApplied; + + /** + * Number of data errors occurred. + */ + @JsonProperty(value = "dataErrorsCounter", access = JsonProperty.Access.WRITE_ONLY) + private Long dataErrorsCounter; + + /** + * Last modified time on target. + */ + @JsonProperty(value = "lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModifiedTime; + + /** + * Get name of the table. + * + * @return the tableName value + */ + public String tableName() { + return this.tableName; + } + + /** + * Get name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Get number of applied inserts. + * + * @return the cdcInsertCounter value + */ + public Long cdcInsertCounter() { + return this.cdcInsertCounter; + } + + /** + * Get number of applied updates. + * + * @return the cdcUpdateCounter value + */ + public Long cdcUpdateCounter() { + return this.cdcUpdateCounter; + } + + /** + * Get number of applied deletes. + * + * @return the cdcDeleteCounter value + */ + public Long cdcDeleteCounter() { + return this.cdcDeleteCounter; + } + + /** + * Get estimate to finish full load. + * + * @return the fullLoadEstFinishTime value + */ + public DateTime fullLoadEstFinishTime() { + return this.fullLoadEstFinishTime; + } + + /** + * Get full load start time. + * + * @return the fullLoadStartedOn value + */ + public DateTime fullLoadStartedOn() { + return this.fullLoadStartedOn; + } + + /** + * Get full load end time. + * + * @return the fullLoadEndedOn value + */ + public DateTime fullLoadEndedOn() { + return this.fullLoadEndedOn; + } + + /** + * Get number of rows applied in full load. + * + * @return the fullLoadTotalRows value + */ + public Long fullLoadTotalRows() { + return this.fullLoadTotalRows; + } + + /** + * Get current state of the table migration. Possible values include: 'BEFORE_LOAD', 'FULL_LOAD', 'COMPLETED', 'CANCELED', 'ERROR', 'FAILED'. + * + * @return the state value + */ + public SyncTableMigrationState state() { + return this.state; + } + + /** + * Get total number of applied changes. + * + * @return the totalChangesApplied value + */ + public Long totalChangesApplied() { + return this.totalChangesApplied; + } + + /** + * Get number of data errors occurred. + * + * @return the dataErrorsCounter value + */ + public Long dataErrorsCounter() { + return this.dataErrorsCounter; + } + + /** + * Get last modified time on target. + * + * @return the lastModifiedTime value + */ + public DateTime lastModifiedTime() { + return this.lastModifiedTime; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java index 6a94a76c5c05b..e827d7f09eb0b 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.datamigration.v2018_07_15_preview; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -28,6 +29,24 @@ public class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput { @JsonProperty(value = "targetDatabaseName") private String targetDatabaseName; + /** + * Migration settings which tune the migration behavior. + */ + @JsonProperty(value = "migrationSetting") + private Map migrationSetting; + + /** + * Source settings to tune source endpoint migration behavior. + */ + @JsonProperty(value = "sourceSetting") + private Map sourceSetting; + + /** + * Target settings to tune target endpoint migration behavior. + */ + @JsonProperty(value = "targetSetting") + private Map targetSetting; + /** * Get name of the database. * @@ -68,4 +87,64 @@ public MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput withTargetDatabase return this; } + /** + * Get migration settings which tune the migration behavior. + * + * @return the migrationSetting value + */ + public Map migrationSetting() { + return this.migrationSetting; + } + + /** + * Set migration settings which tune the migration behavior. + * + * @param migrationSetting the migrationSetting value to set + * @return the MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput withMigrationSetting(Map migrationSetting) { + this.migrationSetting = migrationSetting; + return this; + } + + /** + * Get source settings to tune source endpoint migration behavior. + * + * @return the sourceSetting value + */ + public Map sourceSetting() { + return this.sourceSetting; + } + + /** + * Set source settings to tune source endpoint migration behavior. + * + * @param sourceSetting the sourceSetting value to set + * @return the MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput withSourceSetting(Map sourceSetting) { + this.sourceSetting = sourceSetting; + return this; + } + + /** + * Get target settings to tune target endpoint migration behavior. + * + * @return the targetSetting value + */ + public Map targetSetting() { + return this.targetSetting; + } + + /** + * Set target settings to tune target endpoint migration behavior. + * + * @param targetSetting the targetSetting value to set + * @return the MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput withTargetSetting(Map targetSetting) { + this.targetSetting = targetSetting; + return this; + } + } diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java index b2caf288b8bdd..84715f9f89f84 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates PostgreSQL databases to Azure Database for * PostgreSQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.class) @JsonTypeName("MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java index fde8231b698dd..26ec9b044bf36 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java @@ -16,7 +16,7 @@ /** * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.class) @JsonTypeName("DatabaseLevelErrorOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java index a759838cb5654..44467bca1be30 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java @@ -16,7 +16,7 @@ /** * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.class) @JsonTypeName("DatabaseLevelOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java index 599359a2a16b6..1884024a209e0 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.class) @JsonTypeName("ErrorOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java index 98b491f20e27e..034fd6b91f0f3 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java @@ -16,7 +16,7 @@ /** * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.class) @JsonTypeName("MigrationLevelOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java index b6110c68117c1..9755fe4ab717f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java @@ -16,7 +16,7 @@ /** * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.class) @JsonTypeName("TableLevelOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java index 7dc6e5a45e711..6ab70240201f2 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that migrates PostgreSQL databases to Azure Database * for PostgreSQL for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.class) @JsonTypeName("Migrate.PostgreSql.AzureDbForPostgreSql.Sync") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java index 459900dadd05c..c4d5d10fc6ac7 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates Schema for SQL Server databases to Azure * SQL databases. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSchemaSqlServerSqlDbTaskOutput.class) @JsonTypeName("MigrateSchemaSqlServerSqlDbTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java index 35925e75b8e44..59bd26ec0a1f9 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.class) @JsonTypeName("DatabaseLevelOutput") public class MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel extends MigrateSchemaSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java index 3a9a777ec6001..fe927a0aae773 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSchemaSqlServerSqlDbTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSchemaSqlServerSqlDbTaskOutputError.class) @JsonTypeName("SchemaErrorOutput") public class MigrateSchemaSqlServerSqlDbTaskOutputError extends MigrateSchemaSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java index 7700414a53eb9..d5f547f9f36c0 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.class) @JsonTypeName("MigrationLevelOutput") public class MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel extends MigrateSchemaSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java index 7b23c0e96a5fc..ffb3f23d77013 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that migrates Schema for SQL Server databases to Azure * SQL databases. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSchemaSqlServerSqlDbTaskProperties.class) @JsonTypeName("MigrateSchemaSqlServerSqlDb") public class MigrateSchemaSqlServerSqlDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java index c70710d8f8782..6b5d66a508842 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSchemaSqlTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSchemaSqlTaskOutputError.class) @JsonTypeName("ErrorOutput") public class MigrateSchemaSqlTaskOutputError extends MigrateSchemaSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java index 0540eb2da927d..7d4d6a44da611 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates on-prem SQL Server databases to Azure SQL * Database for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutput.class) @JsonTypeName("MigrateSqlServerSqlDbSyncTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java index 6f2263e3677ff..0e51b1f9084cb 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlDbSyncTaskOutputDatabaseError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.class) @JsonTypeName("DatabaseLevelErrorOutput") public class MigrateSqlServerSqlDbSyncTaskOutputDatabaseError extends MigrateSqlServerSqlDbSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java index 72d0467ed9e5b..dd3c3f3f087a2 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.class) @JsonTypeName("DatabaseLevelOutput") public class MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java index 69873a8038fb9..d993c717eacbc 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSqlServerSqlDbSyncTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutputError.class) @JsonTypeName("ErrorOutput") public class MigrateSqlServerSqlDbSyncTaskOutputError extends MigrateSqlServerSqlDbSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java index d3c2489ed59b8..9bc1cbb87afb8 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.class) @JsonTypeName("MigrationLevelOutput") public class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel extends MigrateSqlServerSqlDbSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java index 216322c39b9c1..1532d40afaf8e 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlDbSyncTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbSyncTaskOutputTableLevel.class) @JsonTypeName("TableLevelOutput") public class MigrateSqlServerSqlDbSyncTaskOutputTableLevel extends MigrateSqlServerSqlDbSyncTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java index 2e1b90f09cf81..b2966e47e6dc5 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that migrates on-prem SQL Server databases to Azure * SQL Database for online migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSqlServerSqlDbSyncTaskProperties.class) @JsonTypeName("Migrate.SqlServer.AzureSqlDb.Sync") public class MigrateSqlServerSqlDbSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java index 6f41e1d6530ce..5d5b6deab73f0 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java @@ -17,7 +17,7 @@ * Output for the task that migrates on-prem SQL Server databases to Azure SQL * Database. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutput.class) @JsonTypeName("MigrateSqlServerSqlDbTaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlDbTaskOutputError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java index 37cf51a7a2fdd..879ffc6692c98 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java @@ -18,7 +18,7 @@ /** * The MigrateSqlServerSqlDbTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputDatabaseLevel.class) @JsonTypeName("DatabaseLevelOutput") public class MigrateSqlServerSqlDbTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java index 3266b090a3669..acd9bd8cd695b 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSqlServerSqlDbTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputError.class) @JsonTypeName("ErrorOutput") public class MigrateSqlServerSqlDbTaskOutputError extends MigrateSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java index a4051b9b94852..ed4d1924ccd0e 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java @@ -18,7 +18,7 @@ /** * The MigrateSqlServerSqlDbTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputMigrationLevel.class) @JsonTypeName("MigrationLevelOutput") public class MigrateSqlServerSqlDbTaskOutputMigrationLevel extends MigrateSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java index 357c527dacb0c..dce11ea0f477a 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java @@ -16,7 +16,7 @@ /** * The MigrateSqlServerSqlDbTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlDbTaskOutputTableLevel.class) @JsonTypeName("TableLevelOutput") public class MigrateSqlServerSqlDbTaskOutputTableLevel extends MigrateSqlServerSqlDbTaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java index 3a13b549153c8..bff3b16bcb96f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that migrates on-prem SQL Server databases to Azure * SQL Database. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSqlServerSqlDbTaskProperties.class) @JsonTypeName("Migrate.SqlServer.SqlDb") public class MigrateSqlServerSqlDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskInput.java new file mode 100644 index 0000000000000..e7f371f75f806 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskInput.java @@ -0,0 +1,17 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + + +/** + * Input for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance online scenario. + */ +public class MigrateSqlServerSqlMISyncTaskInput extends SqlServerSqlMISyncTaskInput { +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutput.java new file mode 100644 index 0000000000000..b17e835650cea --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutput.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Output for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance using Log Replay Service. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMISyncTaskOutput.class) +@JsonTypeName("MigrateSqlServerSqlMISyncTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlMISyncTaskOutputError.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.class) +}) +public class MigrateSqlServerSqlMISyncTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java new file mode 100644 index 0000000000000..523eb08dd3b81 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java @@ -0,0 +1,193 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.class) +@JsonTypeName("DatabaseLevelOutput") +public class MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel extends MigrateSqlServerSqlMISyncTaskOutput { + /** + * Name of the database. + */ + @JsonProperty(value = "sourceDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceDatabaseName; + + /** + * Current state of database. Possible values include: 'UNDEFINED', + * 'INITIAL', 'FULL_BACKUP_UPLOAD_START', 'LOG_SHIPPING_START', + * 'UPLOAD_LOG_FILES_START', 'CUTOVER_START', 'POST_CUTOVER_COMPLETE', + * 'COMPLETED', 'CANCELLED', 'FAILED'. + */ + @JsonProperty(value = "migrationState", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseMigrationState migrationState; + + /** + * Database migration start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Database migration end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Details of full backup set. + */ + @JsonProperty(value = "fullBackupSetInfo", access = JsonProperty.Access.WRITE_ONLY) + private BackupSetInfo fullBackupSetInfo; + + /** + * Last applied backup set information. + */ + @JsonProperty(value = "lastRestoredBackupSetInfo", access = JsonProperty.Access.WRITE_ONLY) + private BackupSetInfo lastRestoredBackupSetInfo; + + /** + * Backup sets that are currently active (Either being uploaded or getting + * restored). + */ + @JsonProperty(value = "activeBackupSets", access = JsonProperty.Access.WRITE_ONLY) + private List activeBackupSets; + + /** + * Name of container created in the Azure Storage account where backups are + * copied to. + */ + @JsonProperty(value = "containerName", access = JsonProperty.Access.WRITE_ONLY) + private String containerName; + + /** + * prefix string to use for querying errors for this database. + */ + @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String errorPrefix; + + /** + * Whether full backup has been applied to the target database or not. + */ + @JsonProperty(value = "isFullBackupRestored", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isFullBackupRestored; + + /** + * Migration exceptions and warnings. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Get name of the database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Get current state of database. Possible values include: 'UNDEFINED', 'INITIAL', 'FULL_BACKUP_UPLOAD_START', 'LOG_SHIPPING_START', 'UPLOAD_LOG_FILES_START', 'CUTOVER_START', 'POST_CUTOVER_COMPLETE', 'COMPLETED', 'CANCELLED', 'FAILED'. + * + * @return the migrationState value + */ + public DatabaseMigrationState migrationState() { + return this.migrationState; + } + + /** + * Get database migration start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get database migration end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get details of full backup set. + * + * @return the fullBackupSetInfo value + */ + public BackupSetInfo fullBackupSetInfo() { + return this.fullBackupSetInfo; + } + + /** + * Get last applied backup set information. + * + * @return the lastRestoredBackupSetInfo value + */ + public BackupSetInfo lastRestoredBackupSetInfo() { + return this.lastRestoredBackupSetInfo; + } + + /** + * Get backup sets that are currently active (Either being uploaded or getting restored). + * + * @return the activeBackupSets value + */ + public List activeBackupSets() { + return this.activeBackupSets; + } + + /** + * Get name of container created in the Azure Storage account where backups are copied to. + * + * @return the containerName value + */ + public String containerName() { + return this.containerName; + } + + /** + * Get prefix string to use for querying errors for this database. + * + * @return the errorPrefix value + */ + public String errorPrefix() { + return this.errorPrefix; + } + + /** + * Get whether full backup has been applied to the target database or not. + * + * @return the isFullBackupRestored value + */ + public Boolean isFullBackupRestored() { + return this.isFullBackupRestored; + } + + /** + * Get migration exceptions and warnings. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputError.java new file mode 100644 index 0000000000000..7fa0947997aa2 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputError.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlMISyncTaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMISyncTaskOutputError.class) +@JsonTypeName("ErrorOutput") +public class MigrateSqlServerSqlMISyncTaskOutputError extends MigrateSqlServerSqlMISyncTaskOutput { + /** + * Migration error. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private ReportableException error; + + /** + * Get migration error. + * + * @return the error value + */ + public ReportableException error() { + return this.error; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java new file mode 100644 index 0000000000000..4da76ed9e0b27 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlMISyncTaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.class) +@JsonTypeName("MigrationLevelOutput") +public class MigrateSqlServerSqlMISyncTaskOutputMigrationLevel extends MigrateSqlServerSqlMISyncTaskOutput { + /** + * Count of databases. + */ + @JsonProperty(value = "databaseCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer databaseCount; + + /** + * Current state of migration. Possible values include: 'None', + * 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Migration start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Migration end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Source server name. + */ + @JsonProperty(value = "sourceServerName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerName; + + /** + * Source server version. + */ + @JsonProperty(value = "sourceServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerVersion; + + /** + * Source server brand version. + */ + @JsonProperty(value = "sourceServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerBrandVersion; + + /** + * Target server name. + */ + @JsonProperty(value = "targetServerName", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerName; + + /** + * Target server version. + */ + @JsonProperty(value = "targetServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerVersion; + + /** + * Target server brand version. + */ + @JsonProperty(value = "targetServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerBrandVersion; + + /** + * Number of database level errors. + */ + @JsonProperty(value = "databaseErrorCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer databaseErrorCount; + + /** + * Get count of databases. + * + * @return the databaseCount value + */ + public Integer databaseCount() { + return this.databaseCount; + } + + /** + * Get current state of migration. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get migration start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get migration end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get source server name. + * + * @return the sourceServerName value + */ + public String sourceServerName() { + return this.sourceServerName; + } + + /** + * Get source server version. + * + * @return the sourceServerVersion value + */ + public String sourceServerVersion() { + return this.sourceServerVersion; + } + + /** + * Get source server brand version. + * + * @return the sourceServerBrandVersion value + */ + public String sourceServerBrandVersion() { + return this.sourceServerBrandVersion; + } + + /** + * Get target server name. + * + * @return the targetServerName value + */ + public String targetServerName() { + return this.targetServerName; + } + + /** + * Get target server version. + * + * @return the targetServerVersion value + */ + public String targetServerVersion() { + return this.targetServerVersion; + } + + /** + * Get target server brand version. + * + * @return the targetServerBrandVersion value + */ + public String targetServerBrandVersion() { + return this.targetServerBrandVersion; + } + + /** + * Get number of database level errors. + * + * @return the databaseErrorCount value + */ + public Integer databaseErrorCount() { + return this.databaseErrorCount; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskProperties.java new file mode 100644 index 0000000000000..57e3596835a75 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMISyncTaskProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance sync scenario. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSqlServerSqlMISyncTaskProperties.class) +@JsonTypeName("Migrate.SqlServer.AzureSqlDbMI.Sync.LRS") +public class MigrateSqlServerSqlMISyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateSqlServerSqlMISyncTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public MigrateSqlServerSqlMISyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateSqlServerSqlMISyncTaskProperties object itself. + */ + public MigrateSqlServerSqlMISyncTaskProperties withInput(MigrateSqlServerSqlMISyncTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java index 17cabcea61406..0c91b24ef7abd 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java @@ -17,7 +17,7 @@ * Output for task that migrates SQL Server databases to Azure SQL Database * Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutput.class) @JsonTypeName("MigrateSqlServerSqlMITaskOutput") @JsonSubTypes({ @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlMITaskOutputError.class), diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java index aa303584f6744..2f7a37f1d71cd 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java @@ -17,7 +17,7 @@ /** * The MigrateSqlServerSqlMITaskOutputAgentJobLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutputAgentJobLevel.class) @JsonTypeName("AgentJobLevelOutput") public class MigrateSqlServerSqlMITaskOutputAgentJobLevel extends MigrateSqlServerSqlMITaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java index 02bff80a6848b..db2188ff62e1b 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java @@ -17,7 +17,7 @@ /** * The MigrateSqlServerSqlMITaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutputDatabaseLevel.class) @JsonTypeName("DatabaseLevelOutput") public class MigrateSqlServerSqlMITaskOutputDatabaseLevel extends MigrateSqlServerSqlMITaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java index 7277a2e49d7ae..fb6df32dcf2d9 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java @@ -15,7 +15,7 @@ /** * The MigrateSqlServerSqlMITaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutputError.class) @JsonTypeName("ErrorOutput") public class MigrateSqlServerSqlMITaskOutputError extends MigrateSqlServerSqlMITaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java index 71154cab8c11b..496c6e11d8c49 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java @@ -17,7 +17,7 @@ /** * The MigrateSqlServerSqlMITaskOutputLoginLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutputLoginLevel.class) @JsonTypeName("LoginLevelOutput") public class MigrateSqlServerSqlMITaskOutputLoginLevel extends MigrateSqlServerSqlMITaskOutput { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java index 8986b440acd1a..008fc3150ce73 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java @@ -18,7 +18,7 @@ /** * The MigrateSqlServerSqlMITaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSqlServerSqlMITaskOutputMigrationLevel.class) @JsonTypeName("MigrationLevelOutput") public class MigrateSqlServerSqlMITaskOutputMigrationLevel extends MigrateSqlServerSqlMITaskOutput { /** @@ -73,10 +73,10 @@ public class MigrateSqlServerSqlMITaskOutputMigrationLevel extends MigrateSqlSer private Map serverRoleResults; /** - * Map of users to database name of orphaned users. + * List of orphaned users. */ - @JsonProperty(value = "orphanedUsers", access = JsonProperty.Access.WRITE_ONLY) - private Map orphanedUsers; + @JsonProperty(value = "orphanedUsersInfo", access = JsonProperty.Access.WRITE_ONLY) + private List orphanedUsersInfo; /** * Selected databases as a map from database name to database id. @@ -187,12 +187,12 @@ public Map serverRoleResults() { } /** - * Get map of users to database name of orphaned users. + * Get list of orphaned users. * - * @return the orphanedUsers value + * @return the orphanedUsersInfo value */ - public Map orphanedUsers() { - return this.orphanedUsers; + public List orphanedUsersInfo() { + return this.orphanedUsersInfo; } /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java index 094797a6c57c5..9631cfd12f85e 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that migrates SQL Server databases to Azure SQL Database * Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSqlServerSqlMITaskProperties.class) @JsonTypeName("Migrate.SqlServer.AzureSqlDbMI") public class MigrateSqlServerSqlMITaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskInput.java new file mode 100644 index 0000000000000..1452b178145a6 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskInput.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for task that migrates SSIS packages from SQL Server to Azure SQL + * Database Managed Instance. + */ +public class MigrateSsisTaskInput extends SqlMigrationTaskInput { + /** + * SSIS package migration information. + */ + @JsonProperty(value = "ssisMigrationInfo", required = true) + private SsisMigrationInfo ssisMigrationInfo; + + /** + * Get sSIS package migration information. + * + * @return the ssisMigrationInfo value + */ + public SsisMigrationInfo ssisMigrationInfo() { + return this.ssisMigrationInfo; + } + + /** + * Set sSIS package migration information. + * + * @param ssisMigrationInfo the ssisMigrationInfo value to set + * @return the MigrateSsisTaskInput object itself. + */ + public MigrateSsisTaskInput withSsisMigrationInfo(SsisMigrationInfo ssisMigrationInfo) { + this.ssisMigrationInfo = ssisMigrationInfo; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutput.java new file mode 100644 index 0000000000000..0cb303340fbde --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutput.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Output for task that migrates SSIS packages from SQL Server to Azure SQL + * Database Managed Instance. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSsisTaskOutput.class) +@JsonTypeName("MigrateSsisTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SsisProjectLevelOutput", value = MigrateSsisTaskOutputProjectLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSsisTaskOutputMigrationLevel.class) +}) +public class MigrateSsisTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputMigrationLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputMigrationLevel.java new file mode 100644 index 0000000000000..c24425c843743 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputMigrationLevel.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSsisTaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSsisTaskOutputMigrationLevel.class) +@JsonTypeName("MigrationLevelOutput") +public class MigrateSsisTaskOutputMigrationLevel extends MigrateSsisTaskOutput { + /** + * Migration start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Migration end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Current status of migration. Possible values include: 'Default', + * 'Connecting', 'SourceAndTargetSelected', 'SelectLogins', 'Configured', + * 'Running', 'Error', 'Stopped', 'Completed', 'CompletedWithWarnings'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private MigrationStatus status; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Source server version. + */ + @JsonProperty(value = "sourceServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerVersion; + + /** + * Source server brand version. + */ + @JsonProperty(value = "sourceServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerBrandVersion; + + /** + * Target server version. + */ + @JsonProperty(value = "targetServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerVersion; + + /** + * Target server brand version. + */ + @JsonProperty(value = "targetServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerBrandVersion; + + /** + * Migration exceptions and warnings. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Stage of SSIS migration. Possible values include: 'None', 'Initialize', + * 'InProgress', 'Completed'. + */ + @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) + private SsisMigrationStage stage; + + /** + * Get migration start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get migration end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get current status of migration. Possible values include: 'Default', 'Connecting', 'SourceAndTargetSelected', 'SelectLogins', 'Configured', 'Running', 'Error', 'Stopped', 'Completed', 'CompletedWithWarnings'. + * + * @return the status value + */ + public MigrationStatus status() { + return this.status; + } + + /** + * Get migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get source server version. + * + * @return the sourceServerVersion value + */ + public String sourceServerVersion() { + return this.sourceServerVersion; + } + + /** + * Get source server brand version. + * + * @return the sourceServerBrandVersion value + */ + public String sourceServerBrandVersion() { + return this.sourceServerBrandVersion; + } + + /** + * Get target server version. + * + * @return the targetServerVersion value + */ + public String targetServerVersion() { + return this.targetServerVersion; + } + + /** + * Get target server brand version. + * + * @return the targetServerBrandVersion value + */ + public String targetServerBrandVersion() { + return this.targetServerBrandVersion; + } + + /** + * Get migration exceptions and warnings. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + + /** + * Get stage of SSIS migration. Possible values include: 'None', 'Initialize', 'InProgress', 'Completed'. + * + * @return the stage value + */ + public SsisMigrationStage stage() { + return this.stage; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputProjectLevel.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputProjectLevel.java new file mode 100644 index 0000000000000..d43c19c35b379 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskOutputProjectLevel.java @@ -0,0 +1,145 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSsisTaskOutputProjectLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType", defaultImpl = MigrateSsisTaskOutputProjectLevel.class) +@JsonTypeName("SsisProjectLevelOutput") +public class MigrateSsisTaskOutputProjectLevel extends MigrateSsisTaskOutput { + /** + * Name of the folder. + */ + @JsonProperty(value = "folderName", access = JsonProperty.Access.WRITE_ONLY) + private String folderName; + + /** + * Name of the project. + */ + @JsonProperty(value = "projectName", access = JsonProperty.Access.WRITE_ONLY) + private String projectName; + + /** + * Current state of migration. Possible values include: 'None', + * 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Stage of SSIS migration. Possible values include: 'None', 'Initialize', + * 'InProgress', 'Completed'. + */ + @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) + private SsisMigrationStage stage; + + /** + * Migration start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Migration end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Migration exceptions and warnings. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Get name of the folder. + * + * @return the folderName value + */ + public String folderName() { + return this.folderName; + } + + /** + * Get name of the project. + * + * @return the projectName value + */ + public String projectName() { + return this.projectName; + } + + /** + * Get current state of migration. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get stage of SSIS migration. Possible values include: 'None', 'Initialize', 'InProgress', 'Completed'. + * + * @return the stage value + */ + public SsisMigrationStage stage() { + return this.stage; + } + + /** + * Get migration start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get migration end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get migration exceptions and warnings. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskProperties.java new file mode 100644 index 0000000000000..eed248aef8405 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSsisTaskProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for task that migrates SSIS packages from SQL Server databases to + * Azure SQL Database Managed Instance. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = MigrateSsisTaskProperties.class) +@JsonTypeName("Migrate.Ssis") +public class MigrateSsisTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateSsisTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public MigrateSsisTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateSsisTaskProperties object itself. + */ + public MigrateSsisTaskProperties withInput(MigrateSsisTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandOutput.java index 0dfbf528803bc..6579e80906a95 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandOutput.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandOutput.java @@ -15,30 +15,34 @@ * Output for command that completes sync migration for a database. */ public class MigrateSyncCompleteCommandOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + /** * List of errors that happened during the command execution. */ - @JsonProperty(value = "errors") + @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private List errors; /** - * Get list of errors that happened during the command execution. + * Get result identifier. * - * @return the errors value + * @return the id value */ - public List errors() { - return this.errors; + public String id() { + return this.id; } /** - * Set list of errors that happened during the command execution. + * Get list of errors that happened during the command execution. * - * @param errors the errors value to set - * @return the MigrateSyncCompleteCommandOutput object itself. + * @return the errors value */ - public MigrateSyncCompleteCommandOutput withErrors(List errors) { - this.errors = errors; - return this; + public List errors() { + return this.errors; } } diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java index 477e139c4f4bb..90280d568391f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java @@ -16,7 +16,7 @@ /** * Properties for the command that completes sync migration for a database. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = MigrateSyncCompleteCommandProperties.class) @JsonTypeName("Migrate.Sync.Complete.Database") public class MigrateSyncCompleteCommandProperties extends CommandPropertiesInner { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbCancelCommand.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbCancelCommand.java index 776625685df2b..c65398e3e76aa 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbCancelCommand.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbCancelCommand.java @@ -16,7 +16,7 @@ /** * Properties for the command that cancels a migration in whole or in part. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = MongoDbCancelCommand.class) @JsonTypeName("cancel") public class MongoDbCancelCommand extends CommandPropertiesInner { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbConnectionInfo.java index 3a1b6d17e99e3..f41986750ef31 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbConnectionInfo.java @@ -15,7 +15,7 @@ /** * Describes a connection to a MongoDB data source. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = MongoDbConnectionInfo.class) @JsonTypeName("MongoDbConnectionInfo") public class MongoDbConnectionInfo extends ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbFinishCommand.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbFinishCommand.java index a22b8632007ab..85f5b0e18af03 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbFinishCommand.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbFinishCommand.java @@ -16,7 +16,7 @@ /** * Properties for the command that finishes a migration in whole or in part. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = MongoDbFinishCommand.class) @JsonTypeName("finish") public class MongoDbFinishCommand extends CommandPropertiesInner { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbRestartCommand.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbRestartCommand.java index e453e76a90e49..f47c4cccdfd21 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbRestartCommand.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MongoDbRestartCommand.java @@ -16,7 +16,7 @@ /** * Properties for the command that restarts a migration in whole or in part. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = MongoDbRestartCommand.class) @JsonTypeName("restart") public class MongoDbRestartCommand extends CommandPropertiesInner { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlConnectionInfo.java index b3af8d084b3d5..d75e4980374d8 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlConnectionInfo.java @@ -15,7 +15,7 @@ /** * Information for connecting to MySQL server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = MySqlConnectionInfo.class) @JsonTypeName("MySqlConnectionInfo") public class MySqlConnectionInfo extends ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlTargetPlatformType.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlTargetPlatformType.java index b0c121f4cfb5e..5be2e5b98bf34 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlTargetPlatformType.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/MySqlTargetPlatformType.java @@ -16,6 +16,9 @@ * Defines values for MySqlTargetPlatformType. */ public final class MySqlTargetPlatformType extends ExpandableStringEnum { + /** Static value SqlServer for MySqlTargetPlatformType. */ + public static final MySqlTargetPlatformType SQL_SERVER = fromString("SqlServer"); + /** Static value AzureDbForMySQL for MySqlTargetPlatformType. */ public static final MySqlTargetPlatformType AZURE_DB_FOR_MY_SQL = fromString("AzureDbForMySQL"); diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleConnectionInfo.java new file mode 100644 index 0000000000000..0027f1ada3567 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleConnectionInfo.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Information for connecting to Oracle server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = OracleConnectionInfo.class) +@JsonTypeName("OracleConnectionInfo") +public class OracleConnectionInfo extends ConnectionInfo { + /** + * EZConnect or TNSName connection string. + */ + @JsonProperty(value = "dataSource", required = true) + private String dataSource; + + /** + * Get eZConnect or TNSName connection string. + * + * @return the dataSource value + */ + public String dataSource() { + return this.dataSource; + } + + /** + * Set eZConnect or TNSName connection string. + * + * @param dataSource the dataSource value to set + * @return the OracleConnectionInfo object itself. + */ + public OracleConnectionInfo withDataSource(String dataSource) { + this.dataSource = dataSource; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleOCIDriverInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleOCIDriverInfo.java new file mode 100644 index 0000000000000..9bcb82a5e74d4 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OracleOCIDriverInfo.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about an Oracle OCI driver. + */ +public class OracleOCIDriverInfo { + /** + * The name of the driver package. + */ + @JsonProperty(value = "driverName", access = JsonProperty.Access.WRITE_ONLY) + private String driverName; + + /** + * The size in bytes of the driver package. + */ + @JsonProperty(value = "driverSize", access = JsonProperty.Access.WRITE_ONLY) + private String driverSize; + + /** + * The MD5 Base64 encoded checksum for the driver package. + */ + @JsonProperty(value = "archiveChecksum", access = JsonProperty.Access.WRITE_ONLY) + private String archiveChecksum; + + /** + * The checksum for the driver package provided by Oracle. + */ + @JsonProperty(value = "oracleChecksum", access = JsonProperty.Access.WRITE_ONLY) + private String oracleChecksum; + + /** + * Version listed in the OCI assembly 'oci.dll'. + */ + @JsonProperty(value = "assemblyVersion", access = JsonProperty.Access.WRITE_ONLY) + private String assemblyVersion; + + /** + * List of Oracle database versions supported by this driver. Only major + * minor of the version is listed. + */ + @JsonProperty(value = "supportedOracleVersions", access = JsonProperty.Access.WRITE_ONLY) + private List supportedOracleVersions; + + /** + * Get the name of the driver package. + * + * @return the driverName value + */ + public String driverName() { + return this.driverName; + } + + /** + * Get the size in bytes of the driver package. + * + * @return the driverSize value + */ + public String driverSize() { + return this.driverSize; + } + + /** + * Get the MD5 Base64 encoded checksum for the driver package. + * + * @return the archiveChecksum value + */ + public String archiveChecksum() { + return this.archiveChecksum; + } + + /** + * Get the checksum for the driver package provided by Oracle. + * + * @return the oracleChecksum value + */ + public String oracleChecksum() { + return this.oracleChecksum; + } + + /** + * Get version listed in the OCI assembly 'oci.dll'. + * + * @return the assemblyVersion value + */ + public String assemblyVersion() { + return this.assemblyVersion; + } + + /** + * Get list of Oracle database versions supported by this driver. Only major minor of the version is listed. + * + * @return the supportedOracleVersions value + */ + public List supportedOracleVersions() { + return this.supportedOracleVersions; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OrphanedUserInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OrphanedUserInfo.java new file mode 100644 index 0000000000000..91da19be880d2 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/OrphanedUserInfo.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information of orphaned users on the SQL server database. + */ +public class OrphanedUserInfo { + /** + * Name of the orphaned user. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Parent database of the user. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * Get name of the orphaned user. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the orphaned user. + * + * @param name the name value to set + * @return the OrphanedUserInfo object itself. + */ + public OrphanedUserInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get parent database of the user. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set parent database of the user. + * + * @param databaseName the databaseName value to set + * @return the OrphanedUserInfo object itself. + */ + public OrphanedUserInfo withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/PostgreSqlConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/PostgreSqlConnectionInfo.java index aa24456510875..5781c09c37b68 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/PostgreSqlConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/PostgreSqlConnectionInfo.java @@ -15,7 +15,7 @@ /** * Information for connecting to PostgreSQL server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = PostgreSqlConnectionInfo.class) @JsonTypeName("PostgreSqlConnectionInfo") public class PostgreSqlConnectionInfo extends ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTask.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectServiceProjectTask.java similarity index 72% rename from datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTask.java rename to datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectServiceProjectTask.java index 72f10fe0c1e3f..83c596c98161f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTask.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectServiceProjectTask.java @@ -19,9 +19,9 @@ import com.microsoft.azure.management.datamigration.v2018_07_15_preview.implementation.DataMigrationManager; /** - * Type representing ProjectTask. + * Type representing ProjectServiceProjectTask. */ -public interface ProjectTask extends HasInner, Indexable, Refreshable, Updatable, HasManager { +public interface ProjectServiceProjectTask extends HasInner, Indexable, Refreshable, Updatable, HasManager { /** * @return the etag value. */ @@ -48,23 +48,23 @@ public interface ProjectTask extends HasInner, Indexable, Refr String type(); /** - * The entirety of the ProjectTask definition. + * The entirety of the ProjectServiceProjectTask definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProject, DefinitionStages.WithCreate { } /** - * Grouping of ProjectTask definition stages. + * Grouping of ProjectServiceProjectTask definition stages. */ interface DefinitionStages { /** - * The first stage of a ProjectTask definition. + * The first stage of a ProjectServiceProjectTask definition. */ interface Blank extends WithProject { } /** - * The stage of the projecttask definition allowing to specify Project. + * The stage of the projectserviceprojecttask definition allowing to specify Project. */ interface WithProject { /** @@ -78,7 +78,7 @@ interface WithProject { } /** - * The stage of the projecttask definition allowing to specify Etag. + * The stage of the projectserviceprojecttask definition allowing to specify Etag. */ interface WithEtag { /** @@ -90,7 +90,7 @@ interface WithEtag { } /** - * The stage of the projecttask definition allowing to specify Properties. + * The stage of the projectserviceprojecttask definition allowing to specify Properties. */ interface WithProperties { /** @@ -106,21 +106,21 @@ interface WithProperties { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithEtag, DefinitionStages.WithProperties { + interface WithCreate extends Creatable, DefinitionStages.WithEtag, DefinitionStages.WithProperties { } } /** - * The template for a ProjectTask update operation, containing all the settings that can be modified. + * The template for a ProjectServiceProjectTask update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithEtag, UpdateStages.WithProperties { + interface Update extends Appliable, UpdateStages.WithEtag, UpdateStages.WithProperties { } /** - * Grouping of ProjectTask update stages. + * Grouping of ProjectServiceProjectTask update stages. */ interface UpdateStages { /** - * The stage of the projecttask update allowing to specify Etag. + * The stage of the projectserviceprojecttask update allowing to specify Etag. */ interface WithEtag { /** @@ -132,7 +132,7 @@ interface WithEtag { } /** - * The stage of the projecttask update allowing to specify Properties. + * The stage of the projectserviceprojecttask update allowing to specify Properties. */ interface WithProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTaskProperties.java index 1f3acd12a433a..6d7aec823e688 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ProjectTaskProperties.java @@ -20,30 +20,45 @@ * Base class for all types of DMS task properties. If task is not supported by * current client, this object is returned. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ProjectTaskProperties.class) @JsonTypeName("Unknown") @JsonSubTypes({ + @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureDbSqlMi.Complete", value = MigrateMISyncCompleteCommandProperties.class), @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class), + @JsonSubTypes.Type(name = "MiSqlConnectionInfo", value = MiSqlConnectionInfo.class), @JsonSubTypes.Type(name = "PostgreSqlConnectionInfo", value = PostgreSqlConnectionInfo.class), + @JsonSubTypes.Type(name = "OracleConnectionInfo", value = OracleConnectionInfo.class), @JsonSubTypes.Type(name = "MySqlConnectionInfo", value = MySqlConnectionInfo.class), @JsonSubTypes.Type(name = "MongoDbConnectionInfo", value = MongoDbConnectionInfo.class), @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), + @JsonSubTypes.Type(name = "Migrate.Ssis", value = MigrateSsisTaskProperties.class), @JsonSubTypes.Type(name = "GetTDECertificates.Sql", value = GetTdeCertificatesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "Validate.Oracle.AzureDbPostgreSql.Sync", value = ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Validate.MongoDb", value = ValidateMongoDbTaskProperties.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", value = ValidateMigrationInputSqlServerSqlMISyncTaskProperties.class), @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.SqlDb.Sync", value = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.Oracle.AzureDbForPostgreSql.Sync", value = MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.PostgreSql.AzureDbForPostgreSql.Sync", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.MySql.AzureDbForMySql.Sync", value = MigrateMySqlAzureDbForMySqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDb.Sync", value = MigrateSqlServerSqlDbSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", value = MigrateSqlServerSqlMISyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI", value = MigrateSqlServerSqlMITaskProperties.class), @JsonSubTypes.Type(name = "Migrate.MongoDb", value = MigrateMongoDbTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForMySql", value = ConnectToTargetAzureDbForMySqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI.Sync.LRS", value = ConnectToTargetSqlMISyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTablesPostgreSql", value = GetUserTablesPostgreSqlTaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTablesOracle", value = GetUserTablesOracleTaskProperties.class), @JsonSubTypes.Type(name = "GetUserTables.AzureSqlDb.Sync", value = GetUserTablesSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", value = ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForPostgreSql.Sync", value = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb.Sync", value = ConnectToTargetSqlSqlDbSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToSource.Oracle.Sync", value = ConnectToSourceOracleSyncTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToSource.PostgreSql.Sync", value = ConnectToSourcePostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToSource.SqlServer.Sync", value = ConnectToSourceSqlServerSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class), @JsonSubTypes.Type(name = "Connect.MongoDb", value = ConnectToMongoDbTaskProperties.class), @@ -51,7 +66,10 @@ @JsonSubTypes.Type(name = "MigrateSchemaSqlServerSqlDb", value = MigrateSchemaSqlServerSqlDbTaskProperties.class), @JsonSubTypes.Type(name = "cancel", value = MongoDbCancelCommand.class), @JsonSubTypes.Type(name = "finish", value = MongoDbFinishCommand.class), - @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class) + @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class), + @JsonSubTypes.Type(name = "Service.Check.OCI", value = CheckOCIDriverTaskProperties.class), + @JsonSubTypes.Type(name = "Service.Upload.OCI", value = UploadOCIDriverTaskProperties.class), + @JsonSubTypes.Type(name = "Service.Install.OCI", value = InstallOCIDriverTaskProperties.class) }) public class ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServerLevelPermissionsGroup.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServerLevelPermissionsGroup.java index e86211dc366ad..a1b0508b4c23f 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServerLevelPermissionsGroup.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServerLevelPermissionsGroup.java @@ -8,40 +8,52 @@ package com.microsoft.azure.management.datamigration.v2018_07_15_preview; -import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ServerLevelPermissionsGroup. */ -public final class ServerLevelPermissionsGroup extends ExpandableStringEnum { - /** Static value Default for ServerLevelPermissionsGroup. */ - public static final ServerLevelPermissionsGroup DEFAULT = fromString("Default"); +public enum ServerLevelPermissionsGroup { + /** Enum value Default. */ + DEFAULT("Default"), - /** Static value MigrationFromSqlServerToAzureDB for ServerLevelPermissionsGroup. */ - public static final ServerLevelPermissionsGroup MIGRATION_FROM_SQL_SERVER_TO_AZURE_DB = fromString("MigrationFromSqlServerToAzureDB"); + /** Enum value MigrationFromSqlServerToAzureDB. */ + MIGRATION_FROM_SQL_SERVER_TO_AZURE_DB("MigrationFromSqlServerToAzureDB"), - /** Static value MigrationFromSqlServerToAzureMI for ServerLevelPermissionsGroup. */ - public static final ServerLevelPermissionsGroup MIGRATION_FROM_SQL_SERVER_TO_AZURE_MI = fromString("MigrationFromSqlServerToAzureMI"); + /** Enum value MigrationFromSqlServerToAzureMI. */ + MIGRATION_FROM_SQL_SERVER_TO_AZURE_MI("MigrationFromSqlServerToAzureMI"), - /** Static value MigrationFromMySQLToAzureDBForMySQL for ServerLevelPermissionsGroup. */ - public static final ServerLevelPermissionsGroup MIGRATION_FROM_MY_SQLTO_AZURE_DBFOR_MY_SQL = fromString("MigrationFromMySQLToAzureDBForMySQL"); + /** Enum value MigrationFromMySQLToAzureDBForMySQL. */ + MIGRATION_FROM_MY_SQLTO_AZURE_DBFOR_MY_SQL("MigrationFromMySQLToAzureDBForMySQL"); + + /** The actual serialized value for a ServerLevelPermissionsGroup instance. */ + private String value; + + ServerLevelPermissionsGroup(String value) { + this.value = value; + } /** - * Creates or finds a ServerLevelPermissionsGroup from its string representation. - * @param name a name to look for - * @return the corresponding ServerLevelPermissionsGroup + * Parses a serialized value to a ServerLevelPermissionsGroup instance. + * + * @param value the serialized value to parse. + * @return the parsed ServerLevelPermissionsGroup object, or null if unable to parse. */ @JsonCreator - public static ServerLevelPermissionsGroup fromString(String name) { - return fromString(name, ServerLevelPermissionsGroup.class); + public static ServerLevelPermissionsGroup fromString(String value) { + ServerLevelPermissionsGroup[] items = ServerLevelPermissionsGroup.values(); + for (ServerLevelPermissionsGroup item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; } - /** - * @return known ServerLevelPermissionsGroup values - */ - public static Collection values() { - return values(ServerLevelPermissionsGroup.class); + @JsonValue + @Override + public String toString() { + return this.value; } } diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServerProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServerProperties.java index 03c792ab79f19..82000259828a6 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServerProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServerProperties.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Server properties for Oracle, MySQL type source. + * Server properties for MySQL type source. */ public class ServerProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServiceProjectTask.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServiceProjectTask.java new file mode 100644 index 0000000000000..2617c70912762 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServiceProjectTask.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.implementation.ProjectTaskInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.implementation.DataMigrationManager; + +/** + * Type representing ServiceProjectTask. + */ +public interface ServiceProjectTask extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + ProjectTaskProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ServiceProjectTask definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithService, DefinitionStages.WithCreate { + } + + /** + * Grouping of ServiceProjectTask definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ServiceProjectTask definition. + */ + interface Blank extends WithService { + } + + /** + * The stage of the serviceprojecttask definition allowing to specify Service. + */ + interface WithService { + /** + * Specifies groupName, serviceName. + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @return the next definition stage + */ + WithCreate withExistingService(String groupName, String serviceName); + } + + /** + * The stage of the serviceprojecttask definition allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag HTTP strong entity tag value. This is ignored if submitted + * @return the next definition stage + */ + WithCreate withEtag(String etag); + } + + /** + * The stage of the serviceprojecttask definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Custom task properties + * @return the next definition stage + */ + WithCreate withProperties(ProjectTaskProperties properties); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithEtag, DefinitionStages.WithProperties { + } + } + /** + * The template for a ServiceProjectTask update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithEtag, UpdateStages.WithProperties { + } + + /** + * Grouping of ServiceProjectTask update stages. + */ + interface UpdateStages { + /** + * The stage of the serviceprojecttask update allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag HTTP strong entity tag value. This is ignored if submitted + * @return the next update stage + */ + Update withEtag(String etag); + } + + /** + * The stage of the serviceprojecttask update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Custom task properties + * @return the next update stage + */ + Update withProperties(ProjectTaskProperties properties); + } + + } +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServiceTasks.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServiceTasks.java new file mode 100644 index 0000000000000..4a9677b47c494 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ServiceTasks.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.implementation.ServiceTasksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ServiceTasks. + */ +public interface ServiceTasks extends SupportsCreating, HasInner { + /** + * Cancel a service task. + * 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 + * @return the observable for the request + */ + Observable cancelAsync(String groupName, String serviceName, String taskName); + + /** + * Get service task information. + * 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 + * @return the observable for the request + */ + Observable getAsync(String groupName, String serviceName, String taskName); + + /** + * Get service level tasks for a service. + * 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 + * @return the observable for the request + */ + Observable listAsync(final String groupName, final String serviceName); + + /** + * Delete service task. + * 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 + * @return the observable for the request + */ + Completable deleteAsync(String groupName, String serviceName, String taskName); + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlConnectionInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlConnectionInfo.java index 716cd62a97ebd..232f4842ded4e 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlConnectionInfo.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlConnectionInfo.java @@ -15,7 +15,7 @@ /** * Information for connecting to SQL database server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = SqlConnectionInfo.class) @JsonTypeName("SqlConnectionInfo") public class SqlConnectionInfo extends ConnectionInfo { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlServerSqlMISyncTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlServerSqlMISyncTaskInput.java new file mode 100644 index 0000000000000..1cec5ed75dd26 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SqlServerSqlMISyncTaskInput.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance online scenario. + */ +public class SqlServerSqlMISyncTaskInput { + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Backup file share information for all selected databases. + */ + @JsonProperty(value = "backupFileShare") + private FileShare backupFileShare; + + /** + * Fully qualified resourceId of storage. + */ + @JsonProperty(value = "storageResourceId", required = true) + private String storageResourceId; + + /** + * Connection information for source SQL Server. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Connection information for Azure SQL Database Managed Instance. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private MiSqlConnectionInfo targetConnectionInfo; + + /** + * Azure Active Directory Application the DMS instance will use to connect + * to the target instance of Azure SQL Database Managed Instance and the + * Azure Storage Account. + */ + @JsonProperty(value = "azureApp", required = true) + private AzureActiveDirectoryApp azureApp; + + /** + * Get databases to migrate. + * + * @return the selectedDatabases value + */ + public List selectedDatabases() { + return this.selectedDatabases; + } + + /** + * Set databases to migrate. + * + * @param selectedDatabases the selectedDatabases value to set + * @return the SqlServerSqlMISyncTaskInput object itself. + */ + public SqlServerSqlMISyncTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + + /** + * Get backup file share information for all selected databases. + * + * @return the backupFileShare value + */ + public FileShare backupFileShare() { + return this.backupFileShare; + } + + /** + * Set backup file share information for all selected databases. + * + * @param backupFileShare the backupFileShare value to set + * @return the SqlServerSqlMISyncTaskInput object itself. + */ + public SqlServerSqlMISyncTaskInput withBackupFileShare(FileShare backupFileShare) { + this.backupFileShare = backupFileShare; + return this; + } + + /** + * Get fully qualified resourceId of storage. + * + * @return the storageResourceId value + */ + public String storageResourceId() { + return this.storageResourceId; + } + + /** + * Set fully qualified resourceId of storage. + * + * @param storageResourceId the storageResourceId value to set + * @return the SqlServerSqlMISyncTaskInput object itself. + */ + public SqlServerSqlMISyncTaskInput withStorageResourceId(String storageResourceId) { + this.storageResourceId = storageResourceId; + return this; + } + + /** + * Get connection information for source SQL Server. + * + * @return the sourceConnectionInfo value + */ + public SqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set connection information for source SQL Server. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the SqlServerSqlMISyncTaskInput object itself. + */ + public SqlServerSqlMISyncTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get connection information for Azure SQL Database Managed Instance. + * + * @return the targetConnectionInfo value + */ + public MiSqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for Azure SQL Database Managed Instance. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the SqlServerSqlMISyncTaskInput object itself. + */ + public SqlServerSqlMISyncTaskInput withTargetConnectionInfo(MiSqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * Get azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account. + * + * @return the azureApp value + */ + public AzureActiveDirectoryApp azureApp() { + return this.azureApp; + } + + /** + * Set azure Active Directory Application the DMS instance will use to connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage Account. + * + * @param azureApp the azureApp value to set + * @return the SqlServerSqlMISyncTaskInput object itself. + */ + public SqlServerSqlMISyncTaskInput withAzureApp(AzureActiveDirectoryApp azureApp) { + this.azureApp = azureApp; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationInfo.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationInfo.java new file mode 100644 index 0000000000000..66cc73677cab9 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationInfo.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SSIS migration info with SSIS store type, overwrite policy. + */ +public class SsisMigrationInfo { + /** + * The SSIS store type of source, only SSIS catalog is supported now in + * DMS. Possible values include: 'SsisCatalog'. + */ + @JsonProperty(value = "ssisStoreType") + private SsisStoreType ssisStoreType; + + /** + * The overwrite option for the SSIS project migration. Possible values + * include: 'Ignore', 'Overwrite'. + */ + @JsonProperty(value = "projectOverwriteOption") + private SsisMigrationOverwriteOption projectOverwriteOption; + + /** + * The overwrite option for the SSIS environment migration. Possible values + * include: 'Ignore', 'Overwrite'. + */ + @JsonProperty(value = "environmentOverwriteOption") + private SsisMigrationOverwriteOption environmentOverwriteOption; + + /** + * Get the SSIS store type of source, only SSIS catalog is supported now in DMS. Possible values include: 'SsisCatalog'. + * + * @return the ssisStoreType value + */ + public SsisStoreType ssisStoreType() { + return this.ssisStoreType; + } + + /** + * Set the SSIS store type of source, only SSIS catalog is supported now in DMS. Possible values include: 'SsisCatalog'. + * + * @param ssisStoreType the ssisStoreType value to set + * @return the SsisMigrationInfo object itself. + */ + public SsisMigrationInfo withSsisStoreType(SsisStoreType ssisStoreType) { + this.ssisStoreType = ssisStoreType; + return this; + } + + /** + * Get the overwrite option for the SSIS project migration. Possible values include: 'Ignore', 'Overwrite'. + * + * @return the projectOverwriteOption value + */ + public SsisMigrationOverwriteOption projectOverwriteOption() { + return this.projectOverwriteOption; + } + + /** + * Set the overwrite option for the SSIS project migration. Possible values include: 'Ignore', 'Overwrite'. + * + * @param projectOverwriteOption the projectOverwriteOption value to set + * @return the SsisMigrationInfo object itself. + */ + public SsisMigrationInfo withProjectOverwriteOption(SsisMigrationOverwriteOption projectOverwriteOption) { + this.projectOverwriteOption = projectOverwriteOption; + return this; + } + + /** + * Get the overwrite option for the SSIS environment migration. Possible values include: 'Ignore', 'Overwrite'. + * + * @return the environmentOverwriteOption value + */ + public SsisMigrationOverwriteOption environmentOverwriteOption() { + return this.environmentOverwriteOption; + } + + /** + * Set the overwrite option for the SSIS environment migration. Possible values include: 'Ignore', 'Overwrite'. + * + * @param environmentOverwriteOption the environmentOverwriteOption value to set + * @return the SsisMigrationInfo object itself. + */ + public SsisMigrationInfo withEnvironmentOverwriteOption(SsisMigrationOverwriteOption environmentOverwriteOption) { + this.environmentOverwriteOption = environmentOverwriteOption; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationOverwriteOption.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationOverwriteOption.java new file mode 100644 index 0000000000000..ba0140aca9f3d --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationOverwriteOption.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SsisMigrationOverwriteOption. + */ +public final class SsisMigrationOverwriteOption extends ExpandableStringEnum { + /** Static value Ignore for SsisMigrationOverwriteOption. */ + public static final SsisMigrationOverwriteOption IGNORE = fromString("Ignore"); + + /** Static value Overwrite for SsisMigrationOverwriteOption. */ + public static final SsisMigrationOverwriteOption OVERWRITE = fromString("Overwrite"); + + /** + * Creates or finds a SsisMigrationOverwriteOption from its string representation. + * @param name a name to look for + * @return the corresponding SsisMigrationOverwriteOption + */ + @JsonCreator + public static SsisMigrationOverwriteOption fromString(String name) { + return fromString(name, SsisMigrationOverwriteOption.class); + } + + /** + * @return known SsisMigrationOverwriteOption values + */ + public static Collection values() { + return values(SsisMigrationOverwriteOption.class); + } +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationStage.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationStage.java new file mode 100644 index 0000000000000..fb489f433a2af --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisMigrationStage.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SsisMigrationStage. + */ +public final class SsisMigrationStage extends ExpandableStringEnum { + /** Static value None for SsisMigrationStage. */ + public static final SsisMigrationStage NONE = fromString("None"); + + /** Static value Initialize for SsisMigrationStage. */ + public static final SsisMigrationStage INITIALIZE = fromString("Initialize"); + + /** Static value InProgress for SsisMigrationStage. */ + public static final SsisMigrationStage IN_PROGRESS = fromString("InProgress"); + + /** Static value Completed for SsisMigrationStage. */ + public static final SsisMigrationStage COMPLETED = fromString("Completed"); + + /** + * Creates or finds a SsisMigrationStage from its string representation. + * @param name a name to look for + * @return the corresponding SsisMigrationStage + */ + @JsonCreator + public static SsisMigrationStage fromString(String name) { + return fromString(name, SsisMigrationStage.class); + } + + /** + * @return known SsisMigrationStage values + */ + public static Collection values() { + return values(SsisMigrationStage.class); + } +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisStoreType.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisStoreType.java new file mode 100644 index 0000000000000..ca5db2bac8e48 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/SsisStoreType.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SsisStoreType. + */ +public final class SsisStoreType extends ExpandableStringEnum { + /** Static value SsisCatalog for SsisStoreType. */ + public static final SsisStoreType SSIS_CATALOG = fromString("SsisCatalog"); + + /** + * Creates or finds a SsisStoreType from its string representation. + * @param name a name to look for + * @return the corresponding SsisStoreType + */ + @JsonCreator + public static SsisStoreType fromString(String name) { + return fromString(name, SsisStoreType.class); + } + + /** + * @return known SsisStoreType values + */ + public static Collection values() { + return values(SsisStoreType.class); + } +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/Tasks.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/Tasks.java index 42a4beec4b10e..c406b9bbab537 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/Tasks.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/Tasks.java @@ -18,7 +18,7 @@ /** * Type representing Tasks. */ -public interface Tasks extends SupportsCreating, HasInner { +public interface Tasks extends SupportsCreating, HasInner { /** * Cancel a task. * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. This method cancels a task if it's currently queued or running. @@ -30,7 +30,7 @@ public interface Tasks extends SupportsCreating cancelAsync(String groupName, String serviceName, String projectName, String taskName); + Observable cancelAsync(String groupName, String serviceName, String projectName, String taskName); /** * Execute a command on a task. @@ -57,7 +57,7 @@ public interface Tasks extends SupportsCreating getAsync(String groupName, String serviceName, String projectName, String taskName); + Observable getAsync(String groupName, String serviceName, String projectName, String taskName); /** * Get tasks in a service. @@ -69,7 +69,7 @@ public interface Tasks extends SupportsCreating listAsync(final String groupName, final String serviceName, final String projectName); + Observable listAsync(final String groupName, final String serviceName, final String projectName); /** * Delete task. diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskInput.java new file mode 100644 index 0000000000000..8cef7aad85ab9 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskInput.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the service task to upload an OCI driver. + */ +public class UploadOCIDriverTaskInput { + /** + * File share information for the OCI driver archive. + */ + @JsonProperty(value = "driverShare") + private FileShare driverShare; + + /** + * Get file share information for the OCI driver archive. + * + * @return the driverShare value + */ + public FileShare driverShare() { + return this.driverShare; + } + + /** + * Set file share information for the OCI driver archive. + * + * @param driverShare the driverShare value to set + * @return the UploadOCIDriverTaskInput object itself. + */ + public UploadOCIDriverTaskInput withDriverShare(FileShare driverShare) { + this.driverShare = driverShare; + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskOutput.java new file mode 100644 index 0000000000000..10ae49aa4f258 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskOutput.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the service task to upload an OCI driver. + */ +public class UploadOCIDriverTaskOutput { + /** + * The name of the driver package that was validated and uploaded. + */ + @JsonProperty(value = "driverPackageName", access = JsonProperty.Access.WRITE_ONLY) + private String driverPackageName; + + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get the name of the driver package that was validated and uploaded. + * + * @return the driverPackageName value + */ + public String driverPackageName() { + return this.driverPackageName; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskProperties.java new file mode 100644 index 0000000000000..c58ac0af9119c --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/UploadOCIDriverTaskProperties.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that uploads an OCI driver. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = UploadOCIDriverTaskProperties.class) +@JsonTypeName("Service.Upload.OCI") +public class UploadOCIDriverTaskProperties extends ProjectTaskProperties { + /** + * The input property. + */ + @JsonProperty(value = "input") + private UploadOCIDriverTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get the input value. + * + * @return the input value + */ + public UploadOCIDriverTaskInput input() { + return this.input; + } + + /** + * Set the input value. + * + * @param input the input value to set + * @return the UploadOCIDriverTaskProperties object itself. + */ + public UploadOCIDriverTaskProperties withInput(UploadOCIDriverTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java index c6c0bc30c57fa..e7a68ebed9b0d 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that validates migration input for SQL to Azure SQL DB * sync migrations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.class) @JsonTypeName("ValidateMigrationInput.SqlServer.SqlDb.Sync") public class ValidateMigrationInputSqlServerSqlDbSyncTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskInput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskInput.java new file mode 100644 index 0000000000000..121bb510172d6 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskInput.java @@ -0,0 +1,17 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + + +/** + * Input for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance online scenario. + */ +public class ValidateMigrationInputSqlServerSqlMISyncTaskInput extends SqlServerSqlMISyncTaskInput { +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskOutput.java new file mode 100644 index 0000000000000..b18135b4428ae --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskOutput.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for task that validates migration input for Azure SQL Database + * Managed Instance online migration. + */ +public class ValidateMigrationInputSqlServerSqlMISyncTaskOutput { + /** + * Database identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Name of database. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Errors associated with a selected database object. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get database identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get name of database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get errors associated with a selected database object. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java new file mode 100644 index 0000000000000..f778e5b56314d --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for task that validates migration input for SQL to Azure SQL + * Database Managed Instance sync scenario. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ValidateMigrationInputSqlServerSqlMISyncTaskProperties.class) +@JsonTypeName("ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS") +public class ValidateMigrationInputSqlServerSqlMISyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ValidateMigrationInputSqlServerSqlMISyncTaskInput input; + + /** + * Task output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get task input. + * + * @return the input value + */ + public ValidateMigrationInputSqlServerSqlMISyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ValidateMigrationInputSqlServerSqlMISyncTaskProperties object itself. + */ + public ValidateMigrationInputSqlServerSqlMISyncTaskProperties withInput(ValidateMigrationInputSqlServerSqlMISyncTaskInput input) { + this.input = input; + return this; + } + + /** + * Get task output. This is ignored if submitted. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java index 9afa2fec22ca1..8ae6d958e6422 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java @@ -17,7 +17,7 @@ * Properties for task that validates migration input for SQL to Azure SQL * Database Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ValidateMigrationInputSqlServerSqlMITaskProperties.class) @JsonTypeName("ValidateMigrationInput.SqlServer.AzureSqlDbMI") public class ValidateMigrationInputSqlServerSqlMITaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMongoDbTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMongoDbTaskProperties.java index e73d686b05ae7..c96f8bb9eed3c 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMongoDbTaskProperties.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateMongoDbTaskProperties.java @@ -17,7 +17,7 @@ * Properties for the task that validates a migration between MongoDB data * sources. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ValidateMongoDbTaskProperties.class) @JsonTypeName("Validate.MongoDb") public class ValidateMongoDbTaskProperties extends ProjectTaskProperties { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.java new file mode 100644 index 0000000000000..e6c54967a24ac --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties for the task that validates a migration for Oracle to Azure + * Database for PostgreSQL for online migrations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType", defaultImpl = ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.class) +@JsonTypeName("Validate.Oracle.AzureDbPostgreSql.Sync") +public class ValidateOracleAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { + /** + * The input property. + */ + @JsonProperty(value = "input") + private MigrateOracleAzureDbPostgreSqlSyncTaskInput input; + + /** + * An array containing a single validation error response object. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get the input value. + * + * @return the input value + */ + public MigrateOracleAzureDbPostgreSqlSyncTaskInput input() { + return this.input; + } + + /** + * Set the input value. + * + * @param input the input value to set + * @return the ValidateOracleAzureDbForPostgreSqlSyncTaskProperties object itself. + */ + public ValidateOracleAzureDbForPostgreSqlSyncTaskProperties withInput(MigrateOracleAzureDbPostgreSqlSyncTaskInput input) { + this.input = input; + return this; + } + + /** + * Get an array containing a single validation error response object. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbPostgreSqlSyncTaskOutput.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbPostgreSqlSyncTaskOutput.java new file mode 100644 index 0000000000000..7128e36b15cda --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/ValidateOracleAzureDbPostgreSqlSyncTaskOutput.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for task that validates migration input for Oracle to Azure Database + * for PostgreSQL for online migrations. + */ +public class ValidateOracleAzureDbPostgreSqlSyncTaskOutput { + /** + * Errors associated with a selected database object. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get errors associated with a selected database object. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/CommandPropertiesInner.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/CommandPropertiesInner.java index 71ab2f86e7bd7..b39916cba8170 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/CommandPropertiesInner.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/CommandPropertiesInner.java @@ -10,70 +10,55 @@ import java.util.List; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ConnectToMongoDbTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ConnectToSourceMySqlTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ConnectToSourceSqlServerSyncTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ConnectToSourceSqlServerTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ConnectToTargetAzureDbForMySqlTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ConnectToTargetSqlDbTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ConnectToTargetSqlMITaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ConnectToTargetSqlSqlDbSyncTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.GetTdeCertificatesSqlTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.GetUserTablesSqlSyncTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.GetUserTablesSqlTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MigrateMongoDbTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MigrateMySqlAzureDbForMySqlSyncTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MigrateSchemaSqlServerSqlDbTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MigrateSqlServerSqlDbSyncTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MigrateSqlServerSqlDbTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MigrateSqlServerSqlMITaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MigrateSyncCompleteCommandProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MongoDbCancelCommand; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MongoDbConnectionInfo; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MongoDbFinishCommand; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MongoDbRestartCommand; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.MySqlConnectionInfo; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ODataError; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.CommandState; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.*; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.PostgreSqlConnectionInfo; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.SqlConnectionInfo; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ValidateMigrationInputSqlServerSqlDbSyncTaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ValidateMigrationInputSqlServerSqlMITaskProperties; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ValidateMongoDbTaskProperties; /** * 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") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType", defaultImpl = CommandPropertiesInner.class) @JsonTypeName("Unknown") @JsonSubTypes({ + @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureDbSqlMi.Complete", value = MigrateMISyncCompleteCommandProperties.class), @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class), + @JsonSubTypes.Type(name = "MiSqlConnectionInfo", value = MiSqlConnectionInfo.class), @JsonSubTypes.Type(name = "PostgreSqlConnectionInfo", value = PostgreSqlConnectionInfo.class), + @JsonSubTypes.Type(name = "OracleConnectionInfo", value = OracleConnectionInfo.class), @JsonSubTypes.Type(name = "MySqlConnectionInfo", value = MySqlConnectionInfo.class), @JsonSubTypes.Type(name = "MongoDbConnectionInfo", value = MongoDbConnectionInfo.class), @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), + @JsonSubTypes.Type(name = "Migrate.Ssis", value = MigrateSsisTaskProperties.class), @JsonSubTypes.Type(name = "GetTDECertificates.Sql", value = GetTdeCertificatesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "Validate.Oracle.AzureDbPostgreSql.Sync", value = ValidateOracleAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Validate.MongoDb", value = ValidateMongoDbTaskProperties.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", value = ValidateMigrationInputSqlServerSqlMISyncTaskProperties.class), @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.SqlDb.Sync", value = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.Oracle.AzureDbForPostgreSql.Sync", value = MigrateOracleAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.PostgreSql.AzureDbForPostgreSql.Sync", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.MySql.AzureDbForMySql.Sync", value = MigrateMySqlAzureDbForMySqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDb.Sync", value = MigrateSqlServerSqlDbSyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", value = MigrateSqlServerSqlMISyncTaskProperties.class), @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI", value = MigrateSqlServerSqlMITaskProperties.class), @JsonSubTypes.Type(name = "Migrate.MongoDb", value = MigrateMongoDbTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForMySql", value = ConnectToTargetAzureDbForMySqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI.Sync.LRS", value = ConnectToTargetSqlMISyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTablesPostgreSql", value = GetUserTablesPostgreSqlTaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTablesOracle", value = GetUserTablesOracleTaskProperties.class), @JsonSubTypes.Type(name = "GetUserTables.AzureSqlDb.Sync", value = GetUserTablesSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", value = ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForPostgreSql.Sync", value = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb.Sync", value = ConnectToTargetSqlSqlDbSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToSource.Oracle.Sync", value = ConnectToSourceOracleSyncTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToSource.PostgreSql.Sync", value = ConnectToSourcePostgreSqlSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToSource.SqlServer.Sync", value = ConnectToSourceSqlServerSyncTaskProperties.class), @JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class), @JsonSubTypes.Type(name = "Connect.MongoDb", value = ConnectToMongoDbTaskProperties.class), @@ -81,7 +66,10 @@ @JsonSubTypes.Type(name = "MigrateSchemaSqlServerSqlDb", value = MigrateSchemaSqlServerSqlDbTaskProperties.class), @JsonSubTypes.Type(name = "cancel", value = MongoDbCancelCommand.class), @JsonSubTypes.Type(name = "finish", value = MongoDbFinishCommand.class), - @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class) + @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class), + @JsonSubTypes.Type(name = "Service.Check.OCI", value = CheckOCIDriverTaskProperties.class), + @JsonSubTypes.Type(name = "Service.Upload.OCI", value = UploadOCIDriverTaskProperties.class), + @JsonSubTypes.Type(name = "Service.Install.OCI", value = InstallOCIDriverTaskProperties.class) }) public class CommandPropertiesInner { /** diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/DataMigrationManager.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/DataMigrationManager.java index c1e423b37cfda..8c02f0d616561 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/DataMigrationManager.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/DataMigrationManager.java @@ -19,6 +19,7 @@ import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ResourceSkus; import com.microsoft.azure.management.datamigration.v2018_07_15_preview.Services; import com.microsoft.azure.management.datamigration.v2018_07_15_preview.Tasks; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceTasks; import com.microsoft.azure.management.datamigration.v2018_07_15_preview.Projects; import com.microsoft.azure.management.datamigration.v2018_07_15_preview.Usages; import com.microsoft.azure.management.datamigration.v2018_07_15_preview.Operations; @@ -33,6 +34,7 @@ public final class DataMigrationManager extends ManagerCore getAsync(String groupName, String serviceName, String projectName, String fileName) { FilesInner client = this.inner(); return client.getAsync(groupName, serviceName, projectName, fileName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ProjectFile call(ProjectFileInner inner) { - return wrapModel(inner); + public Observable call(ProjectFileInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ProjectFile)wrapModel(inner)); + } } }); } diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ProjectTaskImpl.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ProjectServiceProjectTaskImpl.java similarity index 78% rename from datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ProjectTaskImpl.java rename to datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ProjectServiceProjectTaskImpl.java index 0d278f2581948..d624642e5298b 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ProjectTaskImpl.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ProjectServiceProjectTaskImpl.java @@ -8,19 +8,19 @@ package com.microsoft.azure.management.datamigration.v2018_07_15_preview.implementation; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ProjectTask; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ProjectServiceProjectTask; import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; import rx.Observable; import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ProjectTaskProperties; -class ProjectTaskImpl extends CreatableUpdatableImpl implements ProjectTask, ProjectTask.Definition, ProjectTask.Update { +class ProjectServiceProjectTaskImpl extends CreatableUpdatableImpl implements ProjectServiceProjectTask, ProjectServiceProjectTask.Definition, ProjectServiceProjectTask.Update { private final DataMigrationManager manager; private String groupName; private String serviceName; private String projectName; private String taskName; - ProjectTaskImpl(String name, DataMigrationManager manager) { + ProjectServiceProjectTaskImpl(String name, DataMigrationManager manager) { super(name, new ProjectTaskInner()); this.manager = manager; // Set resource name @@ -28,7 +28,7 @@ class ProjectTaskImpl extends CreatableUpdatableImpl createResourceAsync() { + public Observable createResourceAsync() { TasksInner client = this.manager().inner().tasks(); return client.createOrUpdateAsync(this.groupName, this.serviceName, this.projectName, this.taskName, this.inner()) .map(innerToFluentMap(this)); } @Override - public Observable updateResourceAsync() { + public Observable updateResourceAsync() { TasksInner client = this.manager().inner().tasks(); return client.updateAsync(this.groupName, this.serviceName, this.projectName, this.taskName, this.inner()) .map(innerToFluentMap(this)); @@ -98,7 +98,7 @@ public String type() { } @Override - public ProjectTaskImpl withExistingProject(String groupName, String serviceName, String projectName) { + public ProjectServiceProjectTaskImpl withExistingProject(String groupName, String serviceName, String projectName) { this.groupName = groupName; this.serviceName = serviceName; this.projectName = projectName; @@ -106,13 +106,13 @@ public ProjectTaskImpl withExistingProject(String groupName, String serviceName, } @Override - public ProjectTaskImpl withEtag(String etag) { + public ProjectServiceProjectTaskImpl withEtag(String etag) { this.inner().withEtag(etag); return this; } @Override - public ProjectTaskImpl withProperties(ProjectTaskProperties properties) { + public ProjectServiceProjectTaskImpl withProperties(ProjectTaskProperties properties) { this.inner().withProperties(properties); return this; } diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ProjectsImpl.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ProjectsImpl.java index 8be299863e035..e9325ce2ec2af 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ProjectsImpl.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ProjectsImpl.java @@ -64,10 +64,14 @@ public Project call(ProjectInner inner) { public Observable getAsync(String groupName, String serviceName, String projectName) { ProjectsInner client = this.inner(); return client.getAsync(groupName, serviceName, projectName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Project call(ProjectInner inner) { - return wrapModel(inner); + public Observable call(ProjectInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Project)wrapModel(inner)); + } } }); } diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceProjectTaskImpl.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceProjectTaskImpl.java new file mode 100644 index 0000000000000..2f5a6fa7a4823 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceProjectTaskImpl.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceProjectTask; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ProjectTaskProperties; + +class ServiceProjectTaskImpl extends CreatableUpdatableImpl implements ServiceProjectTask, ServiceProjectTask.Definition, ServiceProjectTask.Update { + private final DataMigrationManager manager; + private String groupName; + private String serviceName; + private String taskName; + + ServiceProjectTaskImpl(String name, DataMigrationManager manager) { + super(name, new ProjectTaskInner()); + this.manager = manager; + // Set resource name + this.taskName = name; + // + } + + ServiceProjectTaskImpl(ProjectTaskInner inner, DataMigrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.taskName = inner.name(); + // set resource ancestor and positional variables + this.groupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "services"); + this.taskName = IdParsingUtils.getValueFromIdByName(inner.id(), "serviceTasks"); + // + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ServiceTasksInner client = this.manager().inner().serviceTasks(); + return client.createOrUpdateAsync(this.groupName, this.serviceName, this.taskName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ServiceTasksInner client = this.manager().inner().serviceTasks(); + return client.updateAsync(this.groupName, this.serviceName, this.taskName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ServiceTasksInner client = this.manager().inner().serviceTasks(); + return client.getAsync(this.groupName, this.serviceName, this.taskName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProjectTaskProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ServiceProjectTaskImpl withExistingService(String groupName, String serviceName) { + this.groupName = groupName; + this.serviceName = serviceName; + return this; + } + + @Override + public ServiceProjectTaskImpl withEtag(String etag) { + this.inner().withEtag(etag); + return this; + } + + @Override + public ServiceProjectTaskImpl withProperties(ProjectTaskProperties properties) { + this.inner().withProperties(properties); + return this; + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceTasksImpl.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceTasksImpl.java new file mode 100644 index 0000000000000..f0d889408fa88 --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceTasksImpl.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceTasks; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ProjectServiceProjectTask; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceProjectTask; + +class ServiceTasksImpl extends WrapperImpl implements ServiceTasks { + private final DataMigrationManager manager; + + ServiceTasksImpl(DataMigrationManager manager) { + super(manager.inner().serviceTasks()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ServiceProjectTaskImpl define(String name) { + return wrapModel(name); + } + + private ServiceProjectTaskImpl wrapModel(ProjectTaskInner inner) { + return new ServiceProjectTaskImpl(inner, manager()); + } + + private ServiceProjectTaskImpl wrapModel(String name) { + return new ServiceProjectTaskImpl(name, this.manager()); + } + + @Override + public Observable cancelAsync(String groupName, String serviceName, String taskName) { + ServiceTasksInner client = this.inner(); + return client.cancelAsync(groupName, serviceName, taskName) + .map(new Func1() { + @Override + public ProjectServiceProjectTask call(ProjectTaskInner inner) { + return new ProjectServiceProjectTaskImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync(final String groupName, final String serviceName) { + ServiceTasksInner client = this.inner(); + return client.listAsync(groupName, serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceProjectTask call(ProjectTaskInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String groupName, String serviceName, String taskName) { + ServiceTasksInner client = this.inner(); + return client.getAsync(groupName, serviceName, taskName) + .flatMap(new Func1>() { + @Override + public Observable call(ProjectTaskInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServiceProjectTask)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String groupName, String serviceName, String taskName) { + ServiceTasksInner client = this.inner(); + return client.deleteAsync(groupName, serviceName, taskName).toCompletable(); + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceTasksInner.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceTasksInner.java new file mode 100644 index 0000000000000..d9f66f1792a8b --- /dev/null +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServiceTasksInner.java @@ -0,0 +1,1158 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.datamigration.v2018_07_15_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ServiceTasks. + */ +public class ServiceTasksInner { + /** The Retrofit service to perform REST calls. */ + private ServiceTasksService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of ServiceTasksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServiceTasksInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(ServiceTasksService.class); + this.client = client; + } + + /** + * The interface defining all the services for ServiceTasks to be + * used by Retrofit to perform actually REST calls. + */ + interface ServiceTasksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceTasks list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Query("taskType") String taskType, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceTasks createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("taskName") String taskName, @Body ProjectTaskInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceTasks get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("taskName") String taskName, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceTasks delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("taskName") String taskName, @Query("deleteRunningTasks") Boolean deleteRunningTasks, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceTasks update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("taskName") String taskName, @Body ProjectTaskInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceTasks cancel" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}/cancel") + Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("taskName") String taskName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datamigration.v2018_07_15_preview.ServiceTasks listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get service level tasks for a service. + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProjectTaskInner> object if successful. + */ + public PagedList list(final String groupName, final String serviceName) { + ServiceResponse> response = listSinglePageAsync(groupName, serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get service level tasks for a service. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String groupName, final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(groupName, serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get service level tasks for a service. + * 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 + * @return the observable to the PagedList<ProjectTaskInner> object + */ + public Observable> listAsync(final String groupName, final String serviceName) { + return listWithServiceResponseAsync(groupName, serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get service level tasks for a service. + * 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 + * @return the observable to the PagedList<ProjectTaskInner> object + */ + public Observable>> listWithServiceResponseAsync(final String groupName, final String serviceName) { + return listSinglePageAsync(groupName, serviceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get service level tasks for a service. + * 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 + * @return the PagedList<ProjectTaskInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String groupName, final String serviceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String taskType = null; + return service.list(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), taskType, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get service level tasks for a service. + * 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 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProjectTaskInner> object if successful. + */ + public PagedList list(final String groupName, final String serviceName, final String taskType) { + ServiceResponse> response = listSinglePageAsync(groupName, serviceName, taskType).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get service level tasks for a service. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String groupName, final String serviceName, final String taskType, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(groupName, serviceName, taskType), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get service level tasks for a service. + * 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 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProjectTaskInner> object + */ + public Observable> listAsync(final String groupName, final String serviceName, final String taskType) { + return listWithServiceResponseAsync(groupName, serviceName, taskType) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get service level tasks for a service. + * 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 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProjectTaskInner> object + */ + public Observable>> listWithServiceResponseAsync(final String groupName, final String serviceName, final String taskType) { + return listSinglePageAsync(groupName, serviceName, taskType) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get service level tasks for a service. + * 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. + * + ServiceResponse> * @param groupName Name of the resource group + ServiceResponse> * @param serviceName Name of the service + ServiceResponse> * @param taskType Filter tasks by task type + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProjectTaskInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String groupName, final String serviceName, final String taskType) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), taskType, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Create or update service task. + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProjectTaskInner object if successful. + */ + public ProjectTaskInner createOrUpdate(String groupName, String serviceName, String taskName, ProjectTaskInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, taskName, parameters).toBlocking().single().body(); + } + + /** + * Create or update service task. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String groupName, String serviceName, String taskName, ProjectTaskInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, taskName, parameters), serviceCallback); + } + + /** + * Create or update service task. + * 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 + * @return the observable to the ProjectTaskInner object + */ + public Observable createOrUpdateAsync(String groupName, String serviceName, String taskName, ProjectTaskInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, taskName, parameters).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update service task. + * 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 + * @return the observable to the ProjectTaskInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String groupName, String serviceName, String taskName, ProjectTaskInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (taskName == null) { + throw new IllegalArgumentException("Parameter taskName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.createOrUpdate(this.client.subscriptionId(), groupName, serviceName, taskName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Get service task information. + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProjectTaskInner object if successful. + */ + public ProjectTaskInner get(String groupName, String serviceName, String taskName) { + return getWithServiceResponseAsync(groupName, serviceName, taskName).toBlocking().single().body(); + } + + /** + * Get service task information. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String groupName, String serviceName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, taskName), serviceCallback); + } + + /** + * Get service task information. + * 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 + * @return the observable to the ProjectTaskInner object + */ + public Observable getAsync(String groupName, String serviceName, String taskName) { + return getWithServiceResponseAsync(groupName, serviceName, taskName).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get service task information. + * 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 + * @return the observable to the ProjectTaskInner object + */ + public Observable> getWithServiceResponseAsync(String groupName, String serviceName, String taskName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (taskName == null) { + throw new IllegalArgumentException("Parameter taskName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String expand = null; + return service.get(this.client.subscriptionId(), groupName, serviceName, taskName, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get service task information. + * 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 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProjectTaskInner object if successful. + */ + public ProjectTaskInner get(String groupName, String serviceName, String taskName, String expand) { + return getWithServiceResponseAsync(groupName, serviceName, taskName, expand).toBlocking().single().body(); + } + + /** + * Get service task information. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String groupName, String serviceName, String taskName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, taskName, expand), serviceCallback); + } + + /** + * Get service task information. + * 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 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable getAsync(String groupName, String serviceName, String taskName, String expand) { + return getWithServiceResponseAsync(groupName, serviceName, taskName, expand).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get service task information. + * 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 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable> getWithServiceResponseAsync(String groupName, String serviceName, String taskName, String expand) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (taskName == null) { + throw new IllegalArgumentException("Parameter taskName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), groupName, serviceName, taskName, expand, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Delete service task. + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String groupName, String serviceName, String taskName) { + deleteWithServiceResponseAsync(groupName, serviceName, taskName).toBlocking().single().body(); + } + + /** + * Delete service task. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String groupName, String serviceName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, taskName), serviceCallback); + } + + /** + * Delete service task. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String groupName, String serviceName, String taskName) { + return deleteWithServiceResponseAsync(groupName, serviceName, taskName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete service task. + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, String taskName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (taskName == null) { + throw new IllegalArgumentException("Parameter taskName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean deleteRunningTasks = null; + return service.delete(this.client.subscriptionId(), groupName, serviceName, taskName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Delete service task. + * 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 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String groupName, String serviceName, String taskName, Boolean deleteRunningTasks) { + deleteWithServiceResponseAsync(groupName, serviceName, taskName, deleteRunningTasks).toBlocking().single().body(); + } + + /** + * Delete service task. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String groupName, String serviceName, String taskName, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, taskName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete service task. + * 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 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String groupName, String serviceName, String taskName, Boolean deleteRunningTasks) { + return deleteWithServiceResponseAsync(groupName, serviceName, taskName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete service task. + * 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 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, String taskName, Boolean deleteRunningTasks) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (taskName == null) { + throw new IllegalArgumentException("Parameter taskName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), groupName, serviceName, taskName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Create or update service task. + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProjectTaskInner object if successful. + */ + public ProjectTaskInner update(String groupName, String serviceName, String taskName, ProjectTaskInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, taskName, parameters).toBlocking().single().body(); + } + + /** + * Create or update service task. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String groupName, String serviceName, String taskName, ProjectTaskInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, taskName, parameters), serviceCallback); + } + + /** + * Create or update service task. + * 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 + * @return the observable to the ProjectTaskInner object + */ + public Observable updateAsync(String groupName, String serviceName, String taskName, ProjectTaskInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, taskName, parameters).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update service task. + * 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 + * @return the observable to the ProjectTaskInner object + */ + public Observable> updateWithServiceResponseAsync(String groupName, String serviceName, String taskName, ProjectTaskInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (taskName == null) { + throw new IllegalArgumentException("Parameter taskName is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.update(this.client.subscriptionId(), groupName, serviceName, taskName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Cancel a service task. + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ProjectTaskInner object if successful. + */ + public ProjectTaskInner cancel(String groupName, String serviceName, String taskName) { + return cancelWithServiceResponseAsync(groupName, serviceName, taskName).toBlocking().single().body(); + } + + /** + * Cancel a service task. + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture cancelAsync(String groupName, String serviceName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(groupName, serviceName, taskName), serviceCallback); + } + + /** + * Cancel a service task. + * 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 + * @return the observable to the ProjectTaskInner object + */ + public Observable cancelAsync(String groupName, String serviceName, String taskName) { + return cancelWithServiceResponseAsync(groupName, serviceName, taskName).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Cancel a service task. + * 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 + * @return the observable to the ProjectTaskInner object + */ + public Observable> cancelWithServiceResponseAsync(String groupName, String serviceName, String taskName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (taskName == null) { + throw new IllegalArgumentException("Parameter taskName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.cancel(this.client.subscriptionId(), groupName, serviceName, taskName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = cancelDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse cancelDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Get service level tasks for a service. + * 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 nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ProjectTaskInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get service level tasks for a service. + * 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 nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get service level tasks for a service. + * 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 nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProjectTaskInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get service level tasks for a service. + * 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 nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProjectTaskInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get service level tasks for a service. + * 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. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProjectTaskInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + +} diff --git a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/TasksImpl.java b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/TasksImpl.java index 5e670292589f5..a44716265c2ef 100644 --- a/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/TasksImpl.java +++ b/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/TasksImpl.java @@ -15,7 +15,7 @@ import rx.Observable; import rx.functions.Func1; import com.microsoft.azure.Page; -import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ProjectTask; +import com.microsoft.azure.management.datamigration.v2018_07_15_preview.ProjectServiceProjectTask; import com.microsoft.azure.management.datamigration.v2018_07_15_preview.CommandProperties; class TasksImpl extends WrapperImpl implements Tasks { @@ -31,26 +31,26 @@ public DataMigrationManager manager() { } @Override - public ProjectTaskImpl define(String name) { + public ProjectServiceProjectTaskImpl define(String name) { return wrapModel(name); } - private ProjectTaskImpl wrapModel(ProjectTaskInner inner) { - return new ProjectTaskImpl(inner, manager()); + private ProjectServiceProjectTaskImpl wrapModel(ProjectTaskInner inner) { + return new ProjectServiceProjectTaskImpl(inner, manager()); } - private ProjectTaskImpl wrapModel(String name) { - return new ProjectTaskImpl(name, this.manager()); + private ProjectServiceProjectTaskImpl wrapModel(String name) { + return new ProjectServiceProjectTaskImpl(name, this.manager()); } @Override - public Observable cancelAsync(String groupName, String serviceName, String projectName, String taskName) { + public Observable cancelAsync(String groupName, String serviceName, String projectName, String taskName) { TasksInner client = this.inner(); return client.cancelAsync(groupName, serviceName, projectName, taskName) - .map(new Func1() { + .map(new Func1() { @Override - public ProjectTask call(ProjectTaskInner inner) { - return new ProjectTaskImpl(inner, manager()); + public ProjectServiceProjectTask call(ProjectTaskInner inner) { + return new ProjectServiceProjectTaskImpl(inner, manager()); } }); } @@ -68,7 +68,7 @@ public CommandProperties call(CommandPropertiesInner inner) { } @Override - public Observable listAsync(final String groupName, final String serviceName, final String projectName) { + public Observable listAsync(final String groupName, final String serviceName, final String projectName) { TasksInner client = this.inner(); return client.listAsync(groupName, serviceName, projectName) .flatMapIterable(new Func1, Iterable>() { @@ -77,22 +77,26 @@ public Iterable call(Page page) { return page.items(); } }) - .map(new Func1() { + .map(new Func1() { @Override - public ProjectTask call(ProjectTaskInner inner) { + public ProjectServiceProjectTask call(ProjectTaskInner inner) { return wrapModel(inner); } }); } @Override - public Observable getAsync(String groupName, String serviceName, String projectName, String taskName) { + public Observable getAsync(String groupName, String serviceName, String projectName, String taskName) { TasksInner client = this.inner(); return client.getAsync(groupName, serviceName, projectName, taskName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ProjectTask call(ProjectTaskInner inner) { - return wrapModel(inner); + public Observable call(ProjectTaskInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ProjectServiceProjectTask)wrapModel(inner)); + } } }); }