From 7b101a1de63355c9c702af61147a150445d6c401 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 6 Nov 2018 17:41:05 +0000 Subject: [PATCH] Generated from a4cf10ec40bbbcfe492dd714c71c8e9f5758e79e Add azure-sdk-for-java entry --- .../v2017_11_15_preview/pom.xml | 133 + .../v2017_11_15_preview/ApiError.java | 43 + .../ApiErrorException.java | 44 + .../AuthenticationType.java | 62 + .../AvailableServiceSku.java | 35 + .../AvailableServiceSkuCapacity.java | 122 + .../AvailableServiceSkuSku.java | 121 + .../ConnectToSourceSqlServerTaskInput.java | 71 + .../ConnectToSourceSqlServerTaskOutput.java | 42 + ...ourceSqlServerTaskOutputDatabaseLevel.java | 102 + ...tToSourceSqlServerTaskOutputTaskLevel.java | 84 + ...onnectToSourceSqlServerTaskProperties.java | 64 + .../ConnectToTargetSqlDbTaskInput.java | 44 + .../ConnectToTargetSqlDbTaskOutput.java | 79 + .../ConnectToTargetSqlDbTaskProperties.java | 64 + .../v2017_11_15_preview/ConnectionInfo.java | 81 + .../DataIntegrityValidationResult.java | 70 + .../DataItemMigrationSummaryResult.java | 155 ++ .../DataMigrationError.java | 58 + .../DataMigrationProjectMetadata.java | 138 + .../DataMigrationService.java | 206 ++ .../DataMigrationServiceStatusResponse.java | 41 + .../v2017_11_15_preview/Database.java | 463 ++++ .../DatabaseCompatLevel.java | 68 + .../v2017_11_15_preview/DatabaseFileInfo.java | 200 ++ .../DatabaseFileInput.java | 148 ++ .../v2017_11_15_preview/DatabaseFileType.java | 62 + .../v2017_11_15_preview/DatabaseInfo.java | 43 + .../DatabaseMigrationStage.java | 65 + .../DatabaseObjectName.java | 89 + .../v2017_11_15_preview/DatabaseState.java | 74 + .../DatabaseSummaryResult.java | 32 + .../v2017_11_15_preview/DatabaseTable.java | 47 + .../v2017_11_15_preview/ErrorType.java | 56 + .../ExecutionStatistics.java | 176 ++ .../GetUserTablesSqlTaskInput.java | 71 + .../GetUserTablesSqlTaskOutput.java | 65 + .../GetUserTablesSqlTaskProperties.java | 64 + .../MigrateSqlServerSqlDbDatabaseInput.java | 123 + .../MigrateSqlServerSqlDbTaskInput.java | 85 + .../MigrateSqlServerSqlDbTaskOutput.java | 44 + ...SqlServerSqlDbTaskOutputDatabaseLevel.java | 237 ++ .../MigrateSqlServerSqlDbTaskOutputError.java | 36 + ...qlServerSqlDbTaskOutputMigrationLevel.java | 248 ++ ...ateSqlServerSqlDbTaskOutputTableLevel.java | 159 ++ .../MigrateSqlServerSqlDbTaskProperties.java | 64 + .../MigrationReportResult.java | 70 + .../v2017_11_15_preview/MigrationState.java | 68 + .../v2017_11_15_preview/MigrationStatus.java | 77 + .../MigrationTableMetadata.java | 47 + ...igrationValidationDatabaseLevelResult.java | 172 ++ ...rationValidationDatabaseSummaryResult.java | 125 + .../MigrationValidationOptions.java | 99 + .../MigrationValidationResult.java | 92 + .../NameAvailabilityRequest.java | 69 + .../NameAvailabilityResponse.java | 35 + .../NameCheckFailureReason.java | 53 + .../v2017_11_15_preview/ODataError.java | 97 + .../v2017_11_15_preview/ObjectType.java | 62 + .../v2017_11_15_preview/Operations.java | 28 + .../v2017_11_15_preview/Project.java | 268 ++ .../ProjectProvisioningState.java | 53 + .../ProjectSourcePlatform.java | 53 + .../ProjectTargetPlatform.java | 53 + .../v2017_11_15_preview/ProjectTask.java | 147 ++ .../ProjectTaskProperties.java | 63 + .../v2017_11_15_preview/Projects.java | 56 + .../QueryAnalysisValidationResult.java | 70 + .../QueryExecutionResult.java | 121 + .../v2017_11_15_preview/Quota.java | 45 + .../v2017_11_15_preview/QuotaName.java | 69 + .../ReportableException.java | 147 ++ .../v2017_11_15_preview/ResourceSku.java | 81 + .../ResourceSkuCapabilities.java | 47 + .../ResourceSkuCapacity.java | 78 + .../ResourceSkuCapacityScaleType.java | 56 + .../v2017_11_15_preview/ResourceSkuCosts.java | 62 + .../ResourceSkuRestrictions.java | 65 + .../ResourceSkuRestrictionsReasonCode.java | 53 + .../ResourceSkuRestrictionsType.java | 50 + .../v2017_11_15_preview/ResourceSkus.java | 28 + .../SchemaComparisonValidationResult.java | 122 + .../SchemaComparisonValidationResultType.java | 98 + .../ServerLevelPermissionsGroup.java | 53 + .../v2017_11_15_preview/ServiceOperation.java | 30 + .../ServiceOperationDisplay.java | 121 + .../ServiceProvisioningState.java | 77 + .../ServiceScalability.java | 56 + .../v2017_11_15_preview/ServiceSku.java | 150 ++ .../v2017_11_15_preview/Services.java | 94 + .../v2017_11_15_preview/Severity.java | 56 + .../SqlConnectionInfo.java | 154 ++ .../SqlMigrationTaskInput.java | 69 + .../v2017_11_15_preview/TaskState.java | 71 + .../v2017_11_15_preview/Tasks.java | 72 + .../v2017_11_15_preview/UpdateActionType.java | 56 + .../v2017_11_15_preview/Usages.java | 29 + .../v2017_11_15_preview/ValidationError.java | 70 + .../v2017_11_15_preview/ValidationStatus.java | 71 + .../v2017_11_15_preview/WaitStatistics.java | 95 + .../AvailableServiceSkuImpl.java | 47 + .../AvailableServiceSkuInner.java | 97 + .../implementation/DataMigrationManager.java | 159 ++ .../DataMigrationServiceClientImpl.java | 266 ++ .../DataMigrationServiceImpl.java | 108 + .../DataMigrationServiceInner.java | 171 ++ ...ataMigrationServiceStatusResponseImpl.java | 47 + ...taMigrationServiceStatusResponseInner.java | 124 + .../implementation/IdParsingUtils.java | 57 + .../NameAvailabilityResponseImpl.java | 42 + .../NameAvailabilityResponseInner.java | 99 + .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 293 +++ .../implementation/PageImpl.java | 75 + .../implementation/ProjectImpl.java | 189 ++ .../implementation/ProjectInner.java | 190 ++ .../implementation/ProjectTaskImpl.java | 120 + .../implementation/ProjectTaskInner.java | 71 + .../implementation/ProjectsImpl.java | 81 + .../implementation/ProjectsInner.java | 834 ++++++ .../implementation/QuotaImpl.java | 56 + .../implementation/QuotaInner.java | 150 ++ .../implementation/ResourceSkuImpl.java | 91 + .../implementation/ResourceSkuInner.java | 203 ++ .../implementation/ResourceSkusImpl.java | 49 + .../implementation/ResourceSkusInner.java | 297 +++ .../implementation/ServiceOperationImpl.java | 37 + .../implementation/ServiceOperationInner.java | 71 + .../implementation/ServicesImpl.java | 212 ++ .../implementation/ServicesInner.java | 2240 +++++++++++++++++ .../implementation/TasksImpl.java | 93 + .../implementation/TasksInner.java | 1223 +++++++++ .../implementation/UsagesImpl.java | 53 + .../implementation/UsagesInner.java | 305 +++ .../implementation/package-info.java | 11 + .../v2017_11_15_preview/package-info.java | 11 + .../v2018_03_31_preview/pom.xml | 133 + .../v2018_03_31_preview/ApiError.java | 43 + .../ApiErrorException.java | 44 + .../AuthenticationType.java | 50 + .../AvailableServiceSku.java | 35 + .../AvailableServiceSkuCapacity.java | 122 + .../AvailableServiceSkuSku.java | 121 + .../v2018_03_31_preview/BlobShare.java | 43 + .../ConnectToSourceSqlServerTaskInput.java | 123 + .../ConnectToSourceSqlServerTaskOutput.java | 44 + ...ourceSqlServerTaskOutputAgentJobLevel.java | 113 + ...ourceSqlServerTaskOutputDatabaseLevel.java | 102 + ...ToSourceSqlServerTaskOutputLoginLevel.java | 99 + ...tToSourceSqlServerTaskOutputTaskLevel.java | 114 + ...onnectToSourceSqlServerTaskProperties.java | 64 + .../ConnectToTargetSqlDbTaskInput.java | 44 + .../ConnectToTargetSqlDbTaskOutput.java | 79 + .../ConnectToTargetSqlDbTaskProperties.java | 64 + .../ConnectToTargetSqlMITaskInput.java | 44 + .../ConnectToTargetSqlMITaskOutput.java | 109 + .../ConnectToTargetSqlMITaskProperties.java | 64 + .../v2018_03_31_preview/ConnectionInfo.java | 84 + .../DataIntegrityValidationResult.java | 70 + .../DataItemMigrationSummaryResult.java | 155 ++ .../DataMigrationError.java | 58 + .../DataMigrationProjectMetadata.java | 138 + .../DataMigrationService.java | 206 ++ .../DataMigrationServiceStatusResponse.java | 41 + .../v2018_03_31_preview/Database.java | 463 ++++ .../DatabaseCompatLevel.java | 56 + .../v2018_03_31_preview/DatabaseFileInfo.java | 200 ++ .../DatabaseFileInput.java | 148 ++ .../v2018_03_31_preview/DatabaseFileType.java | 50 + .../v2018_03_31_preview/DatabaseInfo.java | 43 + .../DatabaseMigrationStage.java | 53 + .../DatabaseObjectName.java | 89 + .../v2018_03_31_preview/DatabaseState.java | 62 + .../DatabaseSummaryResult.java | 32 + .../v2018_03_31_preview/DatabaseTable.java | 47 + .../v2018_03_31_preview/ErrorType.java | 44 + .../ExecutionStatistics.java | 176 ++ .../v2018_03_31_preview/FileShare.java | 95 + .../GetUserTablesSqlTaskInput.java | 71 + .../GetUserTablesSqlTaskOutput.java | 65 + .../GetUserTablesSqlTaskProperties.java | 64 + .../LoginMigrationStage.java | 74 + .../v2018_03_31_preview/LoginType.java | 68 + .../MigrateSqlServerSqlDbDatabaseInput.java | 123 + .../MigrateSqlServerSqlDbTaskInput.java | 85 + .../MigrateSqlServerSqlDbTaskOutput.java | 44 + ...SqlServerSqlDbTaskOutputDatabaseLevel.java | 237 ++ .../MigrateSqlServerSqlDbTaskOutputError.java | 36 + ...qlServerSqlDbTaskOutputMigrationLevel.java | 248 ++ ...ateSqlServerSqlDbTaskOutputTableLevel.java | 159 ++ .../MigrateSqlServerSqlDbTaskProperties.java | 64 + .../MigrateSqlServerSqlMIDatabaseInput.java | 96 + .../MigrateSqlServerSqlMITaskInput.java | 150 ++ .../MigrateSqlServerSqlMITaskOutput.java | 45 + ...SqlServerSqlMITaskOutputAgentJobLevel.java | 129 + ...SqlServerSqlMITaskOutputDatabaseLevel.java | 145 ++ .../MigrateSqlServerSqlMITaskOutputError.java | 36 + ...ateSqlServerSqlMITaskOutputLoginLevel.java | 132 + ...qlServerSqlMITaskOutputMigrationLevel.java | 252 ++ .../MigrateSqlServerSqlMITaskProperties.java | 64 + ...igrateSqlServerSqlServerDatabaseInput.java | 122 + .../MigrationEligibilityInfo.java | 48 + .../MigrationReportResult.java | 70 + .../v2018_03_31_preview/MigrationState.java | 56 + .../v2018_03_31_preview/MigrationStatus.java | 65 + .../MigrationTableMetadata.java | 47 + ...igrationValidationDatabaseLevelResult.java | 172 ++ ...rationValidationDatabaseSummaryResult.java | 125 + .../MigrationValidationOptions.java | 99 + .../MigrationValidationResult.java | 92 + .../NameAvailabilityRequest.java | 69 + .../NameAvailabilityResponse.java | 35 + .../NameCheckFailureReason.java | 41 + .../v2018_03_31_preview/ODataError.java | 97 + .../v2018_03_31_preview/ObjectType.java | 50 + .../v2018_03_31_preview/Operations.java | 28 + .../v2018_03_31_preview/Project.java | 268 ++ .../ProjectProvisioningState.java | 41 + .../ProjectSourcePlatform.java | 41 + .../ProjectTargetPlatform.java | 44 + .../v2018_03_31_preview/ProjectTask.java | 147 ++ .../ProjectTaskProperties.java | 66 + .../v2018_03_31_preview/Projects.java | 56 + .../QueryAnalysisValidationResult.java | 70 + .../QueryExecutionResult.java | 121 + .../v2018_03_31_preview/Quota.java | 45 + .../v2018_03_31_preview/QuotaName.java | 69 + .../ReportableException.java | 147 ++ .../v2018_03_31_preview/ResourceSku.java | 81 + .../ResourceSkuCapabilities.java | 47 + .../ResourceSkuCapacity.java | 78 + .../ResourceSkuCapacityScaleType.java | 44 + .../v2018_03_31_preview/ResourceSkuCosts.java | 62 + .../ResourceSkuRestrictions.java | 65 + .../ResourceSkuRestrictionsReasonCode.java | 41 + .../ResourceSkuRestrictionsType.java | 38 + .../v2018_03_31_preview/ResourceSkus.java | 28 + .../SchemaComparisonValidationResult.java | 122 + .../SchemaComparisonValidationResultType.java | 98 + .../ServerLevelPermissionsGroup.java | 41 + .../v2018_03_31_preview/ServiceOperation.java | 30 + .../ServiceOperationDisplay.java | 121 + .../ServiceProvisioningState.java | 65 + .../ServiceScalability.java | 44 + .../v2018_03_31_preview/ServiceSku.java | 150 ++ .../v2018_03_31_preview/Services.java | 94 + .../v2018_03_31_preview/Severity.java | 44 + .../SqlConnectionInfo.java | 154 ++ .../SqlMigrationTaskInput.java | 69 + ...tartMigrationScenarioServerRoleResult.java | 64 + .../v2018_03_31_preview/TaskState.java | 59 + .../v2018_03_31_preview/Tasks.java | 72 + .../v2018_03_31_preview/UpdateActionType.java | 44 + .../v2018_03_31_preview/Usages.java | 29 + ...MigrationInputSqlServerSqlMITaskInput.java | 124 + ...igrationInputSqlServerSqlMITaskOutput.java | 109 + ...tionInputSqlServerSqlMITaskProperties.java | 64 + .../v2018_03_31_preview/ValidationError.java | 70 + .../v2018_03_31_preview/ValidationStatus.java | 59 + .../v2018_03_31_preview/WaitStatistics.java | 95 + .../AvailableServiceSkuImpl.java | 47 + .../AvailableServiceSkuInner.java | 97 + .../implementation/DataMigrationManager.java | 159 ++ .../DataMigrationServiceClientImpl.java | 266 ++ .../DataMigrationServiceImpl.java | 108 + .../DataMigrationServiceInner.java | 171 ++ ...ataMigrationServiceStatusResponseImpl.java | 47 + ...taMigrationServiceStatusResponseInner.java | 124 + .../implementation/IdParsingUtils.java | 57 + .../NameAvailabilityResponseImpl.java | 42 + .../NameAvailabilityResponseInner.java | 99 + .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 293 +++ .../implementation/PageImpl.java | 75 + .../implementation/ProjectImpl.java | 189 ++ .../implementation/ProjectInner.java | 190 ++ .../implementation/ProjectTaskImpl.java | 120 + .../implementation/ProjectTaskInner.java | 71 + .../implementation/ProjectsImpl.java | 81 + .../implementation/ProjectsInner.java | 834 ++++++ .../implementation/QuotaImpl.java | 56 + .../implementation/QuotaInner.java | 150 ++ .../implementation/ResourceSkuImpl.java | 91 + .../implementation/ResourceSkuInner.java | 203 ++ .../implementation/ResourceSkusImpl.java | 49 + .../implementation/ResourceSkusInner.java | 297 +++ .../implementation/ServiceOperationImpl.java | 37 + .../implementation/ServiceOperationInner.java | 71 + .../implementation/ServicesImpl.java | 212 ++ .../implementation/ServicesInner.java | 2240 +++++++++++++++++ .../implementation/TasksImpl.java | 93 + .../implementation/TasksInner.java | 1223 +++++++++ .../implementation/UsagesImpl.java | 53 + .../implementation/UsagesInner.java | 305 +++ .../implementation/package-info.java | 11 + .../v2018_03_31_preview/package-info.java | 11 + .../v2018_07_15_preview/pom.xml | 133 + .../v2018_07_15_preview/ApiError.java | 43 + .../ApiErrorException.java | 44 + .../AuthenticationType.java | 50 + .../AvailableServiceSku.java | 35 + .../AvailableServiceSkuCapacity.java | 122 + .../AvailableServiceSkuSku.java | 122 + .../v2018_07_15_preview/BackupMode.java | 41 + .../v2018_07_15_preview/BackupType.java | 56 + .../v2018_07_15_preview/BlobShare.java | 43 + .../CommandProperties.java | 31 + .../v2018_07_15_preview/CommandState.java | 50 + .../ConnectToMongoDbTaskProperties.java | 64 + .../ConnectToSourceMySqlTaskInput.java | 98 + .../ConnectToSourceMySqlTaskProperties.java | 63 + .../ConnectToSourceNonSqlTaskOutput.java | 93 + ...ctToSourceSqlServerSyncTaskProperties.java | 64 + .../ConnectToSourceSqlServerTaskInput.java | 150 ++ .../ConnectToSourceSqlServerTaskOutput.java | 44 + ...ourceSqlServerTaskOutputAgentJobLevel.java | 129 + ...ourceSqlServerTaskOutputDatabaseLevel.java | 102 + ...ToSourceSqlServerTaskOutputLoginLevel.java | 99 + ...tToSourceSqlServerTaskOutputTaskLevel.java | 129 + ...onnectToSourceSqlServerTaskProperties.java | 64 + ...nnectToTargetAzureDbForMySqlTaskInput.java | 70 + ...nectToTargetAzureDbForMySqlTaskOutput.java | 94 + ...ToTargetAzureDbForMySqlTaskProperties.java | 64 + .../ConnectToTargetSqlDbTaskInput.java | 44 + .../ConnectToTargetSqlDbTaskOutput.java | 79 + .../ConnectToTargetSqlDbTaskProperties.java | 64 + .../ConnectToTargetSqlMITaskInput.java | 44 + .../ConnectToTargetSqlMITaskOutput.java | 109 + .../ConnectToTargetSqlMITaskProperties.java | 64 + .../ConnectToTargetSqlSqlDbSyncTaskInput.java | 70 + ...ectToTargetSqlSqlDbSyncTaskProperties.java | 64 + .../v2018_07_15_preview/ConnectionInfo.java | 105 + .../DataIntegrityValidationResult.java | 70 + .../DataItemMigrationSummaryResult.java | 155 ++ .../DataMigrationError.java | 58 + .../DataMigrationProjectMetadata.java | 138 + .../DataMigrationResultCode.java | 53 + .../DataMigrationService.java | 206 ++ .../DataMigrationServiceStatusResponse.java | 41 + .../v2018_07_15_preview/Database.java | 463 ++++ .../DatabaseBackupInfo.java | 142 ++ .../DatabaseCompatLevel.java | 56 + .../v2018_07_15_preview/DatabaseFileInfo.java | 200 ++ .../DatabaseFileInput.java | 148 ++ .../v2018_07_15_preview/DatabaseFileType.java | 50 + .../v2018_07_15_preview/DatabaseInfo.java | 43 + .../DatabaseMigrationStage.java | 53 + .../DatabaseObjectName.java | 89 + .../v2018_07_15_preview/DatabaseState.java | 62 + .../DatabaseSummaryResult.java | 32 + .../v2018_07_15_preview/DatabaseTable.java | 47 + .../v2018_07_15_preview/ErrorType.java | 44 + .../ExecutionStatistics.java | 176 ++ .../v2018_07_15_preview/FileShare.java | 95 + .../v2018_07_15_preview/FileStorageInfo.java | 31 + .../v2018_07_15_preview/Files.java | 85 + .../GetProjectDetailsNonSqlTaskInput.java | 69 + .../GetTdeCertificatesSqlTaskInput.java | 98 + .../GetTdeCertificatesSqlTaskOutput.java | 49 + .../GetTdeCertificatesSqlTaskProperties.java | 63 + .../GetUserTablesSqlSyncTaskInput.java | 123 + .../GetUserTablesSqlSyncTaskOutput.java | 80 + .../GetUserTablesSqlSyncTaskProperties.java | 64 + .../GetUserTablesSqlTaskInput.java | 71 + .../GetUserTablesSqlTaskOutput.java | 65 + .../GetUserTablesSqlTaskProperties.java | 64 + .../LoginMigrationStage.java | 62 + .../v2018_07_15_preview/LoginType.java | 56 + .../MigrateMongoDbTaskProperties.java | 63 + ...MySqlAzureDbForMySqlSyncDatabaseInput.java | 71 + ...rateMySqlAzureDbForMySqlSyncTaskInput.java | 97 + ...ateMySqlAzureDbForMySqlSyncTaskOutput.java | 45 + ...DbForMySqlSyncTaskOutputDatabaseError.java | 74 + ...DbForMySqlSyncTaskOutputDatabaseLevel.java | 250 ++ ...SqlAzureDbForMySqlSyncTaskOutputError.java | 36 + ...bForMySqlSyncTaskOutputMigrationLevel.java | 112 + ...ureDbForMySqlSyncTaskOutputTableLevel.java | 218 ++ ...ySqlAzureDbForMySqlSyncTaskProperties.java | 64 + ...AzureDbForPostgreSqlSyncDatabaseInput.java | 71 + ...eSqlAzureDbForPostgreSqlSyncTaskInput.java | 97 + ...SqlAzureDbForPostgreSqlSyncTaskOutput.java | 45 + ...PostgreSqlSyncTaskOutputDatabaseError.java | 74 + ...PostgreSqlSyncTaskOutputDatabaseLevel.java | 250 ++ ...ureDbForPostgreSqlSyncTaskOutputError.java | 36 + ...ostgreSqlSyncTaskOutputMigrationLevel.java | 112 + ...ForPostgreSqlSyncTaskOutputTableLevel.java | 218 ++ ...zureDbForPostgreSqlSyncTaskProperties.java | 64 + ...rateSchemaSqlServerSqlDbDatabaseInput.java | 95 + .../MigrateSchemaSqlServerSqlDbTaskInput.java | 45 + ...MigrateSchemaSqlServerSqlDbTaskOutput.java | 44 + ...SqlServerSqlDbTaskOutputDatabaseLevel.java | 177 ++ ...teSchemaSqlServerSqlDbTaskOutputError.java | 51 + ...qlServerSqlDbTaskOutputMigrationLevel.java | 128 + ...ateSchemaSqlServerSqlDbTaskProperties.java | 64 + .../MigrateSchemaSqlTaskOutputError.java | 36 + .../MigrateSqlServerSqlDbDatabaseInput.java | 123 + ...igrateSqlServerSqlDbSyncDatabaseInput.java | 227 ++ .../MigrateSqlServerSqlDbSyncTaskInput.java | 71 + .../MigrateSqlServerSqlDbSyncTaskOutput.java | 45 + ...erverSqlDbSyncTaskOutputDatabaseError.java | 74 + ...erverSqlDbSyncTaskOutputDatabaseLevel.java | 250 ++ ...rateSqlServerSqlDbSyncTaskOutputError.java | 36 + ...rverSqlDbSyncTaskOutputMigrationLevel.java | 127 + ...qlServerSqlDbSyncTaskOutputTableLevel.java | 218 ++ ...grateSqlServerSqlDbSyncTaskProperties.java | 64 + .../MigrateSqlServerSqlDbTaskInput.java | 85 + .../MigrateSqlServerSqlDbTaskOutput.java | 44 + ...SqlServerSqlDbTaskOutputDatabaseLevel.java | 237 ++ .../MigrateSqlServerSqlDbTaskOutputError.java | 36 + ...qlServerSqlDbTaskOutputMigrationLevel.java | 274 ++ ...ateSqlServerSqlDbTaskOutputTableLevel.java | 159 ++ .../MigrateSqlServerSqlDbTaskProperties.java | 64 + .../MigrateSqlServerSqlMIDatabaseInput.java | 123 + .../MigrateSqlServerSqlMITaskInput.java | 179 ++ .../MigrateSqlServerSqlMITaskOutput.java | 45 + ...SqlServerSqlMITaskOutputAgentJobLevel.java | 129 + ...SqlServerSqlMITaskOutputDatabaseLevel.java | 145 ++ .../MigrateSqlServerSqlMITaskOutputError.java | 36 + ...ateSqlServerSqlMITaskOutputLoginLevel.java | 132 + ...qlServerSqlMITaskOutputMigrationLevel.java | 252 ++ .../MigrateSqlServerSqlMITaskProperties.java | 64 + ...igrateSqlServerSqlServerDatabaseInput.java | 122 + .../MigrateSyncCompleteCommandInput.java | 70 + .../MigrateSyncCompleteCommandOutput.java | 44 + .../MigrateSyncCompleteCommandProperties.java | 63 + .../MigrationEligibilityInfo.java | 48 + .../MigrationReportResult.java | 70 + .../v2018_07_15_preview/MigrationState.java | 56 + .../v2018_07_15_preview/MigrationStatus.java | 65 + .../MigrationTableMetadata.java | 47 + ...igrationValidationDatabaseLevelResult.java | 172 ++ ...rationValidationDatabaseSummaryResult.java | 125 + .../MigrationValidationOptions.java | 99 + .../MigrationValidationResult.java | 92 + .../MongoDbCancelCommand.java | 48 + .../MongoDbClusterInfo.java | 124 + .../MongoDbClusterType.java | 44 + .../MongoDbCollectionInfo.java | 202 ++ .../MongoDbCollectionProgress.java | 16 + .../MongoDbCollectionSettings.java | 97 + .../MongoDbCommandInput.java | 45 + .../MongoDbConnectionInfo.java | 49 + .../MongoDbDatabaseInfo.java | 71 + .../MongoDbDatabaseProgress.java | 45 + .../MongoDbDatabaseSettings.java | 73 + .../v2018_07_15_preview/MongoDbError.java | 124 + .../v2018_07_15_preview/MongoDbErrorType.java | 44 + .../MongoDbFinishCommand.java | 48 + .../MongoDbFinishCommandInput.java | 45 + .../MongoDbMigrationProgress.java | 45 + .../MongoDbMigrationSettings.java | 181 ++ .../MongoDbMigrationState.java | 68 + .../MongoDbObjectInfo.java | 149 ++ .../v2018_07_15_preview/MongoDbProgress.java | 396 +++ .../MongoDbReplication.java | 44 + .../MongoDbRestartCommand.java | 48 + .../MongoDbShardKeyField.java | 70 + .../MongoDbShardKeyInfo.java | 70 + .../MongoDbShardKeyOrder.java | 44 + .../MongoDbShardKeySetting.java | 70 + .../MongoDbThrottlingSettings.java | 98 + .../MySqlConnectionInfo.java | 73 + .../MySqlTargetPlatformType.java | 38 + .../NameAvailabilityRequest.java | 69 + .../NameAvailabilityResponse.java | 35 + .../NameCheckFailureReason.java | 41 + .../NonSqlDataMigrationTable.java | 43 + .../NonSqlDataMigrationTableResult.java | 125 + .../NonSqlMigrationTaskInput.java | 148 ++ .../NonSqlMigrationTaskOutput.java | 142 ++ .../v2018_07_15_preview/ODataError.java | 97 + .../v2018_07_15_preview/ObjectType.java | 50 + .../v2018_07_15_preview/Operations.java | 28 + .../PostgreSqlConnectionInfo.java | 99 + .../v2018_07_15_preview/Project.java | 268 ++ .../v2018_07_15_preview/ProjectFile.java | 147 ++ .../ProjectFileProperties.java | 129 + .../ProjectProvisioningState.java | 41 + .../ProjectSourcePlatform.java | 50 + .../ProjectTargetPlatform.java | 53 + .../v2018_07_15_preview/ProjectTask.java | 147 ++ .../ProjectTaskProperties.java | 103 + .../v2018_07_15_preview/Projects.java | 56 + .../QueryAnalysisValidationResult.java | 70 + .../QueryExecutionResult.java | 121 + .../v2018_07_15_preview/Quota.java | 45 + .../v2018_07_15_preview/QuotaName.java | 69 + .../ReportableException.java | 173 ++ .../v2018_07_15_preview/ResourceSku.java | 81 + .../ResourceSkuCapabilities.java | 47 + .../ResourceSkuCapacity.java | 78 + .../ResourceSkuCapacityScaleType.java | 44 + .../v2018_07_15_preview/ResourceSkuCosts.java | 62 + .../ResourceSkuRestrictions.java | 65 + .../ResourceSkuRestrictionsReasonCode.java | 41 + .../ResourceSkuRestrictionsType.java | 38 + .../v2018_07_15_preview/ResourceSkus.java | 28 + .../SchemaComparisonValidationResult.java | 122 + .../SchemaComparisonValidationResultType.java | 98 + .../SchemaMigrationOption.java | 44 + .../SchemaMigrationSetting.java | 71 + .../SchemaMigrationStage.java | 65 + .../SelectedCertificateInput.java | 69 + .../ServerLevelPermissionsGroup.java | 47 + .../v2018_07_15_preview/ServerProperties.java | 107 + .../v2018_07_15_preview/ServiceOperation.java | 30 + .../ServiceOperationDisplay.java | 121 + .../ServiceProvisioningState.java | 65 + .../ServiceScalability.java | 44 + .../v2018_07_15_preview/ServiceSku.java | 151 ++ .../v2018_07_15_preview/Services.java | 94 + .../v2018_07_15_preview/Severity.java | 44 + .../SqlConnectionInfo.java | 181 ++ .../SqlMigrationTaskInput.java | 69 + .../SqlSourcePlatform.java | 38 + ...tartMigrationScenarioServerRoleResult.java | 64 + .../SyncDatabaseMigrationReportingState.java | 68 + .../SyncMigrationDatabaseErrorEvent.java | 62 + .../SyncTableMigrationState.java | 53 + .../v2018_07_15_preview/TaskState.java | 59 + .../v2018_07_15_preview/Tasks.java | 87 + .../v2018_07_15_preview/UpdateActionType.java | 44 + .../v2018_07_15_preview/Usages.java | 29 + ...InputSqlServerSqlDbSyncTaskProperties.java | 64 + ...MigrationInputSqlServerSqlMITaskInput.java | 203 ++ ...igrationInputSqlServerSqlMITaskOutput.java | 150 ++ ...tionInputSqlServerSqlMITaskProperties.java | 64 + .../ValidateMongoDbTaskProperties.java | 64 + ...eSyncMigrationInputSqlServerTaskInput.java | 96 + ...SyncMigrationInputSqlServerTaskOutput.java | 63 + .../v2018_07_15_preview/ValidationError.java | 70 + .../v2018_07_15_preview/ValidationStatus.java | 59 + .../v2018_07_15_preview/WaitStatistics.java | 95 + .../AvailableServiceSkuImpl.java | 47 + .../AvailableServiceSkuInner.java | 97 + .../implementation/CommandPropertiesImpl.java | 39 + .../CommandPropertiesInner.java | 88 + .../implementation/DataMigrationManager.java | 171 ++ .../DataMigrationServiceClientImpl.java | 280 +++ .../DataMigrationServiceImpl.java | 108 + .../DataMigrationServiceInner.java | 171 ++ ...ataMigrationServiceStatusResponseImpl.java | 47 + ...taMigrationServiceStatusResponseInner.java | 124 + .../implementation/FileStorageInfoImpl.java | 37 + .../implementation/FileStorageInfoInner.java | 70 + .../implementation/FilesImpl.java | 106 + .../implementation/FilesInner.java | 993 ++++++++ .../implementation/IdParsingUtils.java | 57 + .../NameAvailabilityResponseImpl.java | 42 + .../NameAvailabilityResponseInner.java | 99 + .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 293 +++ .../implementation/PageImpl.java | 75 + .../implementation/ProjectFileImpl.java | 120 + .../implementation/ProjectFileInner.java | 71 + .../implementation/ProjectImpl.java | 189 ++ .../implementation/ProjectInner.java | 191 ++ .../implementation/ProjectTaskImpl.java | 120 + .../implementation/ProjectTaskInner.java | 71 + .../implementation/ProjectsImpl.java | 81 + .../implementation/ProjectsInner.java | 834 ++++++ .../implementation/QuotaImpl.java | 56 + .../implementation/QuotaInner.java | 150 ++ .../implementation/ResourceSkuImpl.java | 91 + .../implementation/ResourceSkuInner.java | 203 ++ .../implementation/ResourceSkusImpl.java | 49 + .../implementation/ResourceSkusInner.java | 297 +++ .../implementation/ServiceOperationImpl.java | 37 + .../implementation/ServiceOperationInner.java | 71 + .../implementation/ServicesImpl.java | 212 ++ .../implementation/ServicesInner.java | 2240 +++++++++++++++++ .../implementation/TasksImpl.java | 106 + .../implementation/TasksInner.java | 1339 ++++++++++ .../implementation/UsagesImpl.java | 53 + .../implementation/UsagesInner.java | 305 +++ .../implementation/package-info.java | 11 + .../v2018_07_15_preview/package-info.java | 11 + 577 files changed, 67457 insertions(+) create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/pom.xml create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ApiError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ApiErrorException.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AuthenticationType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSkuCapacity.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSkuSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectionInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataIntegrityValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataItemMigrationSummaryResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationProjectMetadata.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationService.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationServiceStatusResponse.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Database.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseCompatLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseMigrationStage.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseObjectName.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseSummaryResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseTable.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ErrorType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ExecutionStatistics.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationReportResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationStatus.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationTableMetadata.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationDatabaseLevelResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationDatabaseSummaryResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationOptions.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameAvailabilityRequest.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameAvailabilityResponse.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameCheckFailureReason.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ODataError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ObjectType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Operations.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Project.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectProvisioningState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectSourcePlatform.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTargetPlatform.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTask.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Projects.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QueryAnalysisValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QueryExecutionResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Quota.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QuotaName.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ReportableException.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapabilities.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapacity.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapacityScaleType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCosts.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictions.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictionsReasonCode.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictionsType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkus.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SchemaComparisonValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SchemaComparisonValidationResultType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServerLevelPermissionsGroup.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceOperation.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceOperationDisplay.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceProvisioningState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceScalability.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Services.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Severity.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SqlConnectionInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SqlMigrationTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/TaskState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Tasks.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/UpdateActionType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Usages.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ValidationError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ValidationStatus.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/WaitStatistics.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/AvailableServiceSkuImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/AvailableServiceSkuInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationManager.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceClientImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceStatusResponseImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceStatusResponseInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/IdParsingUtils.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/NameAvailabilityResponseImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/NameAvailabilityResponseInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/OperationsImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/OperationsInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/PageImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectTaskImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectTaskInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectsImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectsInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/QuotaImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/QuotaInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkuImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkuInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkusImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkusInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServiceOperationImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServiceOperationInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServicesImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServicesInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/TasksImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/TasksInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/UsagesImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/UsagesInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/package-info.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/package-info.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/pom.xml create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ApiError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ApiErrorException.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AuthenticationType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSkuCapacity.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSkuSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/BlobShare.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectionInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataIntegrityValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataItemMigrationSummaryResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationProjectMetadata.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationService.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationServiceStatusResponse.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Database.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseCompatLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseMigrationStage.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseObjectName.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseSummaryResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseTable.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ErrorType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ExecutionStatistics.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/FileShare.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/LoginMigrationStage.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/LoginType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMIDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlServerDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationEligibilityInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationReportResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationStatus.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationTableMetadata.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationDatabaseLevelResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationDatabaseSummaryResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationOptions.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameAvailabilityRequest.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameAvailabilityResponse.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameCheckFailureReason.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ODataError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ObjectType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Operations.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Project.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectProvisioningState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectSourcePlatform.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTargetPlatform.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTask.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Projects.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QueryAnalysisValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QueryExecutionResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Quota.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QuotaName.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ReportableException.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapabilities.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapacity.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapacityScaleType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCosts.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictions.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictionsReasonCode.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictionsType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkus.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SchemaComparisonValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SchemaComparisonValidationResultType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServerLevelPermissionsGroup.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceOperation.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceOperationDisplay.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceProvisioningState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceScalability.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Services.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Severity.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SqlConnectionInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SqlMigrationTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/StartMigrationScenarioServerRoleResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/TaskState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Tasks.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/UpdateActionType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Usages.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidationError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidationStatus.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/WaitStatistics.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/AvailableServiceSkuImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/AvailableServiceSkuInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationManager.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceClientImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceStatusResponseImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceStatusResponseInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/IdParsingUtils.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/NameAvailabilityResponseImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/NameAvailabilityResponseInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/OperationsImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/OperationsInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/PageImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectTaskImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectTaskInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectsImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectsInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/QuotaImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/QuotaInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkuImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkuInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkusImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkusInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServiceOperationImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServiceOperationInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServicesImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServicesInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/TasksImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/TasksInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/UsagesImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/UsagesInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/package-info.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/package-info.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/pom.xml create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ApiError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ApiErrorException.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AuthenticationType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSkuCapacity.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSkuSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BackupMode.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BackupType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BlobShare.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/CommandProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/CommandState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceMySqlTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceNonSqlTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectionInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataIntegrityValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataItemMigrationSummaryResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationProjectMetadata.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationResultCode.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationService.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationServiceStatusResponse.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Database.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseBackupInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseCompatLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseMigrationStage.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseObjectName.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseSummaryResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseTable.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ErrorType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ExecutionStatistics.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/FileShare.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/FileStorageInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Files.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetProjectDetailsNonSqlTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/LoginMigrationStage.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/LoginType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMongoDbTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMIDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlServerDatabaseInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationEligibilityInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationReportResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationStatus.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationTableMetadata.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationDatabaseLevelResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationDatabaseSummaryResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationOptions.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCancelCommand.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbClusterInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbClusterType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionProgress.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionSettings.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCommandInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbConnectionInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseProgress.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseSettings.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbErrorType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbFinishCommand.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbFinishCommandInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationProgress.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationSettings.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbObjectInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbProgress.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbReplication.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbRestartCommand.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyField.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyOrder.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeySetting.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbThrottlingSettings.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MySqlConnectionInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MySqlTargetPlatformType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameAvailabilityRequest.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameAvailabilityResponse.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameCheckFailureReason.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlDataMigrationTable.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlDataMigrationTableResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlMigrationTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlMigrationTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ODataError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ObjectType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Operations.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/PostgreSqlConnectionInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Project.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectFile.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectFileProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectProvisioningState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectSourcePlatform.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTargetPlatform.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTask.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Projects.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QueryAnalysisValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QueryExecutionResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Quota.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QuotaName.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ReportableException.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapabilities.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapacity.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapacityScaleType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCosts.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictions.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictionsReasonCode.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictionsType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkus.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaComparisonValidationResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaComparisonValidationResultType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationOption.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationSetting.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationStage.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SelectedCertificateInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServerLevelPermissionsGroup.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServerProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceOperation.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceOperationDisplay.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceProvisioningState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceScalability.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceSku.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Services.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Severity.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlConnectionInfo.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlMigrationTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlSourcePlatform.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/StartMigrationScenarioServerRoleResult.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncDatabaseMigrationReportingState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncMigrationDatabaseErrorEvent.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncTableMigrationState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/TaskState.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Tasks.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/UpdateActionType.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Usages.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMongoDbTaskProperties.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateSyncMigrationInputSqlServerTaskInput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateSyncMigrationInputSqlServerTaskOutput.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidationError.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidationStatus.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/WaitStatistics.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/AvailableServiceSkuImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/AvailableServiceSkuInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/CommandPropertiesImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/CommandPropertiesInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationManager.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceClientImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceStatusResponseImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceStatusResponseInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FileStorageInfoImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FileStorageInfoInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FilesImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FilesInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/IdParsingUtils.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/NameAvailabilityResponseImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/NameAvailabilityResponseInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/OperationsImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/OperationsInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/PageImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectFileImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectFileInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectTaskImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectTaskInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectsImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectsInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/QuotaImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/QuotaInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkuImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkuInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkusImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkusInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServiceOperationImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServiceOperationInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServicesImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServicesInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/TasksImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/TasksInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/UsagesImpl.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/UsagesInner.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/package-info.java create mode 100644 azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/package-info.java diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/pom.xml b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/pom.xml new file mode 100644 index 000000000000..a46d042d0660 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.azuredatabasemigrationservice.v2017_11_15_preview + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-datamigration + 1.0.0-beta + jar + Microsoft Azure SDK for DataMigration Management + This package contains Microsoft DataMigration Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ApiError.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ApiError.java new file mode 100644 index 000000000000..bbfa915685b0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ApiError.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error information. + */ +public class ApiError { + /** + * Error information in OData format. + */ + @JsonProperty(value = "error") + private ODataError error; + + /** + * Get error information in OData format. + * + * @return the error value + */ + public ODataError error() { + return this.error; + } + + /** + * Set error information in OData format. + * + * @param error the error value to set + * @return the ApiError object itself. + */ + public ApiError withError(ODataError error) { + this.error = error; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ApiErrorException.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ApiErrorException.java new file mode 100644 index 000000000000..81997de67cfd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ApiErrorException.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ApiError information. + */ +public class ApiErrorException extends RestException { + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ApiErrorException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ApiErrorException(final String message, final Response response, final ApiError body) { + super(message, response, body); + } + + @Override + public ApiError body() { + return (ApiError) super.body(); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AuthenticationType.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AuthenticationType.java new file mode 100644 index 000000000000..8bbe4a0f2a83 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AuthenticationType.java @@ -0,0 +1,62 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AuthenticationType. + */ +public enum AuthenticationType { + /** Enum value None. */ + NONE("None"), + + /** Enum value WindowsAuthentication. */ + WINDOWS_AUTHENTICATION("WindowsAuthentication"), + + /** Enum value SqlAuthentication. */ + SQL_AUTHENTICATION("SqlAuthentication"), + + /** Enum value ActiveDirectoryIntegrated. */ + ACTIVE_DIRECTORY_INTEGRATED("ActiveDirectoryIntegrated"), + + /** Enum value ActiveDirectoryPassword. */ + ACTIVE_DIRECTORY_PASSWORD("ActiveDirectoryPassword"); + + /** The actual serialized value for a AuthenticationType instance. */ + private String value; + + AuthenticationType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AuthenticationType instance. + * + * @param value the serialized value to parse. + * @return the parsed AuthenticationType object, or null if unable to parse. + */ + @JsonCreator + public static AuthenticationType fromString(String value) { + AuthenticationType[] items = AuthenticationType.values(); + for (AuthenticationType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSku.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSku.java new file mode 100644 index 000000000000..52b294430552 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSku.java @@ -0,0 +1,35 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.AvailableServiceSkuInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationManager; + +/** + * Type representing AvailableServiceSku. + */ +public interface AvailableServiceSku extends HasInner, HasManager { + /** + * @return the capacity value. + */ + AvailableServiceSkuCapacity capacity(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the sku value. + */ + AvailableServiceSkuSku sku(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSkuCapacity.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSkuCapacity.java new file mode 100644 index 000000000000..d8f311cccf0a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSkuCapacity.java @@ -0,0 +1,122 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A description of the scaling capacities of the SKU. + */ +public class AvailableServiceSkuCapacity { + /** + * The minimum capacity, usually 0 or 1. + */ + @JsonProperty(value = "minimum") + private Integer minimum; + + /** + * The maximum capacity. + */ + @JsonProperty(value = "maximum") + private Integer maximum; + + /** + * The default capacity. + */ + @JsonProperty(value = "default") + private Integer defaultProperty; + + /** + * The scalability approach. Possible values include: 'none', 'manual', + * 'automatic'. + */ + @JsonProperty(value = "scaleType") + private ServiceScalability scaleType; + + /** + * Get the minimum capacity, usually 0 or 1. + * + * @return the minimum value + */ + public Integer minimum() { + return this.minimum; + } + + /** + * Set the minimum capacity, usually 0 or 1. + * + * @param minimum the minimum value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withMinimum(Integer minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the maximum capacity. + * + * @return the maximum value + */ + public Integer maximum() { + return this.maximum; + } + + /** + * Set the maximum capacity. + * + * @param maximum the maximum value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withMaximum(Integer maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get the default capacity. + * + * @return the defaultProperty value + */ + public Integer defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the default capacity. + * + * @param defaultProperty the defaultProperty value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withDefaultProperty(Integer defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the scalability approach. Possible values include: 'none', 'manual', 'automatic'. + * + * @return the scaleType value + */ + public ServiceScalability scaleType() { + return this.scaleType; + } + + /** + * Set the scalability approach. Possible values include: 'none', 'manual', 'automatic'. + * + * @param scaleType the scaleType value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withScaleType(ServiceScalability scaleType) { + this.scaleType = scaleType; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSkuSku.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSkuSku.java new file mode 100644 index 000000000000..c1654d4deb18 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/AvailableServiceSkuSku.java @@ -0,0 +1,121 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU name, tier, etc. + */ +public class AvailableServiceSkuSku { + /** + * The name of the SKU. + */ + @JsonProperty(value = "name") + private String name; + + /** + * SKU family. + */ + @JsonProperty(value = "family") + private String family; + + /** + * SKU size. + */ + @JsonProperty(value = "size") + private String size; + + /** + * The tier of the SKU, such as "Free", "Basic", "Standard", or "Premium". + */ + @JsonProperty(value = "tier") + private String tier; + + /** + * Get the name of the SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the SKU. + * + * @param name the name value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get sKU family. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set sKU family. + * + * @param family the family value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get sKU size. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set sKU size. + * + * @param size the size value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the tier of the SKU, such as "Free", "Basic", "Standard", or "Premium". + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier of the SKU, such as "Free", "Basic", "Standard", or "Premium". + * + * @param tier the tier value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withTier(String tier) { + this.tier = tier; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskInput.java new file mode 100644 index 000000000000..19a113439e66 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskInput.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to SQL Server and also + * validates source server requirements. + */ +public class ConnectToSourceSqlServerTaskInput { + /** + * Connection information for Source SQL Server. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Permission group for validations. Possible values include: 'Default', + * 'MigrationFromSqlServerToAzureDB'. + */ + @JsonProperty(value = "checkPermissionsGroup") + private ServerLevelPermissionsGroup checkPermissionsGroup; + + /** + * 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 ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get permission group for validations. Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB'. + * + * @return the checkPermissionsGroup value + */ + public ServerLevelPermissionsGroup checkPermissionsGroup() { + return this.checkPermissionsGroup; + } + + /** + * Set permission group for validations. Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB'. + * + * @param checkPermissionsGroup the checkPermissionsGroup value to set + * @return the ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withCheckPermissionsGroup(ServerLevelPermissionsGroup checkPermissionsGroup) { + this.checkPermissionsGroup = checkPermissionsGroup; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutput.java new file mode 100644 index 000000000000..e79e91adafa0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutput.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.azuredatabasemigrationservice.v2017_11_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 validates connection to SQL Server and also + * validates source server requirements. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ConnectToSourceSqlServerTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = ConnectToSourceSqlServerTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "TaskLevelOutput", value = ConnectToSourceSqlServerTaskOutputTaskLevel.class) +}) +public class ConnectToSourceSqlServerTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..4f000d7863ab --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java @@ -0,0 +1,102 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * 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") +@JsonTypeName("DatabaseLevelOutput") +public class ConnectToSourceSqlServerTaskOutputDatabaseLevel extends ConnectToSourceSqlServerTaskOutput { + /** + * Database name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Size of the file in megabytes. + */ + @JsonProperty(value = "sizeMB", access = JsonProperty.Access.WRITE_ONLY) + private Double sizeMB; + + /** + * The list of database files. + */ + @JsonProperty(value = "databaseFiles", access = JsonProperty.Access.WRITE_ONLY) + private List databaseFiles; + + /** + * SQL Server compatibility level of database. Possible values include: + * 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', + * 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + */ + @JsonProperty(value = "compatibilityLevel", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseCompatLevel compatibilityLevel; + + /** + * State of the database. Possible values include: 'Online', 'Restoring', + * 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', + * 'Copying', 'OfflineSecondary'. + */ + @JsonProperty(value = "databaseState", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseState databaseState; + + /** + * Get database name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get size of the file in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + + /** + * Get the list of database files. + * + * @return the databaseFiles value + */ + public List databaseFiles() { + return this.databaseFiles; + } + + /** + * Get sQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + * + * @return the compatibilityLevel value + */ + public DatabaseCompatLevel compatibilityLevel() { + return this.compatibilityLevel; + } + + /** + * Get state of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'. + * + * @return the databaseState value + */ + public DatabaseState databaseState() { + return this.databaseState; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java new file mode 100644 index 000000000000..c49a3d3715b4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java @@ -0,0 +1,84 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * 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") +@JsonTypeName("TaskLevelOutput") +public class ConnectToSourceSqlServerTaskOutputTaskLevel extends ConnectToSourceSqlServerTaskOutput { + /** + * Source databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * 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; + + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get source databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * 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 validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskProperties.java new file mode 100644 index 000000000000..ed1ef75de6e3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToSourceSqlServerTaskProperties.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.azuredatabasemigrationservice.v2017_11_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 SQL Server and also + * validates source server requirements. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ConnectToSource.SqlServer") +public class ConnectToSourceSqlServerTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToSourceSqlServerTaskInput 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 ConnectToSourceSqlServerTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToSourceSqlServerTaskProperties object itself. + */ + public ConnectToSourceSqlServerTaskProperties withInput(ConnectToSourceSqlServerTaskInput 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskInput.java new file mode 100644 index 000000000000..f0feacd8a9d0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskInput.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to SQL DB and target server + * requirements. + */ +public class ConnectToTargetSqlDbTaskInput { + /** + * Connection information for target SQL DB. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Get connection information for target SQL DB. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target SQL DB. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ConnectToTargetSqlDbTaskInput object itself. + */ + public ConnectToTargetSqlDbTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskOutput.java new file mode 100644 index 000000000000..355b84db7e11 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskOutput.java @@ -0,0 +1,79 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the task that validates connection to SQL DB and target server + * requirements. + */ +public class ConnectToTargetSqlDbTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Source databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * Version of the target server. + */ + @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; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get source databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * Get version of the target server. + * + * @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; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskProperties.java new file mode 100644 index 000000000000..b3f729ec22b6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectToTargetSqlDbTaskProperties.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.azuredatabasemigrationservice.v2017_11_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 SQL DB and target + * server requirements. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ConnectToTarget.SqlDb") +public class ConnectToTargetSqlDbTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToTargetSqlDbTaskInput 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 ConnectToTargetSqlDbTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToTargetSqlDbTaskProperties object itself. + */ + public ConnectToTargetSqlDbTaskProperties withInput(ConnectToTargetSqlDbTaskInput 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectionInfo.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectionInfo.java new file mode 100644 index 000000000000..117eaee261d8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ConnectionInfo.java @@ -0,0 +1,81 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_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; + +/** + * Defines the connection properties of a server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Unknown") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), + @JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class) +}) +public class ConnectionInfo { + /** + * User name. + */ + @JsonProperty(value = "userName") + private String userName; + + /** + * Password credential. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get user name. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Set user name. + * + * @param userName the userName value to set + * @return the ConnectionInfo object itself. + */ + public ConnectionInfo withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get password credential. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set password credential. + * + * @param password the password value to set + * @return the ConnectionInfo object itself. + */ + public ConnectionInfo withPassword(String password) { + this.password = password; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataIntegrityValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataIntegrityValidationResult.java new file mode 100644 index 000000000000..96017df12086 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataIntegrityValidationResult.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results for checksum based Data Integrity validation results. + */ +public class DataIntegrityValidationResult { + /** + * List of failed table names of source and target pair. + */ + @JsonProperty(value = "failedObjects") + private Map failedObjects; + + /** + * List of errors that happened while performing data integrity validation. + */ + @JsonProperty(value = "validationErrors") + private ValidationError validationErrors; + + /** + * Get list of failed table names of source and target pair. + * + * @return the failedObjects value + */ + public Map failedObjects() { + return this.failedObjects; + } + + /** + * Set list of failed table names of source and target pair. + * + * @param failedObjects the failedObjects value to set + * @return the DataIntegrityValidationResult object itself. + */ + public DataIntegrityValidationResult withFailedObjects(Map failedObjects) { + this.failedObjects = failedObjects; + return this; + } + + /** + * Get list of errors that happened while performing data integrity validation. + * + * @return the validationErrors value + */ + public ValidationError validationErrors() { + return this.validationErrors; + } + + /** + * Set list of errors that happened while performing data integrity validation. + * + * @param validationErrors the validationErrors value to set + * @return the DataIntegrityValidationResult object itself. + */ + public DataIntegrityValidationResult withValidationErrors(ValidationError validationErrors) { + this.validationErrors = validationErrors; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataItemMigrationSummaryResult.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataItemMigrationSummaryResult.java new file mode 100644 index 000000000000..1ee65c34adda --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataItemMigrationSummaryResult.java @@ -0,0 +1,155 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Basic summary of a data item migration. + */ +public class DataItemMigrationSummaryResult { + /** + * Name of the item. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * 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 state of migration. Possible values include: 'None', + * 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Number of items. + */ + @JsonProperty(value = "itemsCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCount; + + /** + * Number of successfully completed items. + */ + @JsonProperty(value = "itemsCompletedCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCompletedCount; + + /** + * Wildcard string prefix to use for querying all errors of the item. + */ + @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String errorPrefix; + + /** + * Wildcard string prefix to use for querying all sub-tem results of the + * item. + */ + @JsonProperty(value = "resultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String resultPrefix; + + /** + * Get name of the item. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * 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 state of migration. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get number of items. + * + * @return the itemsCount value + */ + public Long itemsCount() { + return this.itemsCount; + } + + /** + * Get number of successfully completed items. + * + * @return the itemsCompletedCount value + */ + public Long itemsCompletedCount() { + return this.itemsCompletedCount; + } + + /** + * Get wildcard string prefix to use for querying all errors of the item. + * + * @return the errorPrefix value + */ + public String errorPrefix() { + return this.errorPrefix; + } + + /** + * Get wildcard string prefix to use for querying all sub-tem results of the item. + * + * @return the resultPrefix value + */ + public String resultPrefix() { + return this.resultPrefix; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationError.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationError.java new file mode 100644 index 000000000000..b0ce87718b1e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationError.java @@ -0,0 +1,58 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration Task errors. + */ +public class DataMigrationError { + /** + * Error description. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Possible values include: 'Default', 'Warning', 'Error'. + */ + @JsonProperty(value = "type") + private ErrorType type; + + /** + * Get error description. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get possible values include: 'Default', 'Warning', 'Error'. + * + * @return the type value + */ + public ErrorType type() { + return this.type; + } + + /** + * Set possible values include: 'Default', 'Warning', 'Error'. + * + * @param type the type value to set + * @return the DataMigrationError object itself. + */ + public DataMigrationError withType(ErrorType type) { + this.type = type; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationProjectMetadata.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationProjectMetadata.java new file mode 100644 index 000000000000..bf38592d996f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationProjectMetadata.java @@ -0,0 +1,138 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Common metadata for migration projects. + */ +public class DataMigrationProjectMetadata { + /** + * Source server name. + */ + @JsonProperty(value = "sourceServerName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerName; + + /** + * Source server port number. + */ + @JsonProperty(value = "sourceServerPort", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerPort; + + /** + * Source username. + */ + @JsonProperty(value = "sourceUsername", access = JsonProperty.Access.WRITE_ONLY) + private String sourceUsername; + + /** + * Target server name. + */ + @JsonProperty(value = "targetServerName", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerName; + + /** + * Target username. + */ + @JsonProperty(value = "targetUsername", access = JsonProperty.Access.WRITE_ONLY) + private String targetUsername; + + /** + * Target database name. + */ + @JsonProperty(value = "targetDbName", access = JsonProperty.Access.WRITE_ONLY) + private String targetDbName; + + /** + * Whether target connection is Windows authentication. + */ + @JsonProperty(value = "targetUsingWinAuth", access = JsonProperty.Access.WRITE_ONLY) + private Boolean targetUsingWinAuth; + + /** + * List of tables selected for migration. + */ + @JsonProperty(value = "selectedMigrationTables", access = JsonProperty.Access.WRITE_ONLY) + private List selectedMigrationTables; + + /** + * Get source server name. + * + * @return the sourceServerName value + */ + public String sourceServerName() { + return this.sourceServerName; + } + + /** + * Get source server port number. + * + * @return the sourceServerPort value + */ + public String sourceServerPort() { + return this.sourceServerPort; + } + + /** + * Get source username. + * + * @return the sourceUsername value + */ + public String sourceUsername() { + return this.sourceUsername; + } + + /** + * Get target server name. + * + * @return the targetServerName value + */ + public String targetServerName() { + return this.targetServerName; + } + + /** + * Get target username. + * + * @return the targetUsername value + */ + public String targetUsername() { + return this.targetUsername; + } + + /** + * Get target database name. + * + * @return the targetDbName value + */ + public String targetDbName() { + return this.targetDbName; + } + + /** + * Get whether target connection is Windows authentication. + * + * @return the targetUsingWinAuth value + */ + public Boolean targetUsingWinAuth() { + return this.targetUsingWinAuth; + } + + /** + * Get list of tables selected for migration. + * + * @return the selectedMigrationTables value + */ + public List selectedMigrationTables() { + return this.selectedMigrationTables; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationService.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationService.java new file mode 100644 index 000000000000..cd081b0129b7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationService.java @@ -0,0 +1,206 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +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.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationServiceInner; + +/** + * Type representing DataMigrationService. + */ +public interface DataMigrationService extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the provisioningState value. + */ + ServiceProvisioningState provisioningState(); + + /** + * @return the publicKey value. + */ + String publicKey(); + + /** + * @return the sku value. + */ + ServiceSku sku(); + + /** + * @return the virtualSubnetId value. + */ + String virtualSubnetId(); + + /** + * The entirety of the DataMigrationService definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithVirtualSubnetId, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataMigrationService definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataMigrationService definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the DataMigrationService definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the datamigrationservice definition allowing to specify VirtualSubnetId. + */ + interface WithVirtualSubnetId { + /** + * Specifies virtualSubnetId. + * @param virtualSubnetId The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined + * @return the next definition stage +*/ + WithCreate withVirtualSubnetId(String virtualSubnetId); + } + + /** + * The stage of the datamigrationservice definition allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag HTTP strong entity tag value. Ignored if submitted + * @return the next definition stage + */ + WithCreate withEtag(String etag); + } + + /** + * The stage of the datamigrationservice definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind The resource kind. Only 'vm' (the default) is supported + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the datamigrationservice definition allowing to specify PublicKey. + */ + interface WithPublicKey { + /** + * Specifies publicKey. + * @param publicKey The public key of the service, used to encrypt secrets sent to the service + * @return the next definition stage + */ + WithCreate withPublicKey(String publicKey); + } + + /** + * The stage of the datamigrationservice definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Service SKU + * @return the next definition stage + */ + WithCreate withSku(ServiceSku sku); + } + + /** + * 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, Resource.DefinitionWithTags, DefinitionStages.WithEtag, DefinitionStages.WithKind, DefinitionStages.WithPublicKey, DefinitionStages.WithSku { + } + } + /** + * The template for a DataMigrationService update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithEtag, UpdateStages.WithKind, UpdateStages.WithPublicKey, UpdateStages.WithSku { + } + + /** + * Grouping of DataMigrationService update stages. + */ + interface UpdateStages { + /** + * The stage of the datamigrationservice update allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag HTTP strong entity tag value. Ignored if submitted + * @return the next update stage + */ + Update withEtag(String etag); + } + + /** + * The stage of the datamigrationservice update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind The resource kind. Only 'vm' (the default) is supported + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the datamigrationservice update allowing to specify PublicKey. + */ + interface WithPublicKey { + /** + * Specifies publicKey. + * @param publicKey The public key of the service, used to encrypt secrets sent to the service + * @return the next update stage + */ + Update withPublicKey(String publicKey); + } + + /** + * The stage of the datamigrationservice update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Service SKU + * @return the next update stage + */ + Update withSku(ServiceSku sku); + } + + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationServiceStatusResponse.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationServiceStatusResponse.java new file mode 100644 index 000000000000..fe0c05fe3468 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DataMigrationServiceStatusResponse.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationServiceStatusResponseInner; +import java.util.List; + +/** + * Type representing DataMigrationServiceStatusResponse. + */ +public interface DataMigrationServiceStatusResponse extends HasInner, HasManager { + /** + * @return the agentVersion value. + */ + String agentVersion(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the supportedTaskTypes value. + */ + List supportedTaskTypes(); + + /** + * @return the vmSize value. + */ + String vmSize(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Database.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Database.java new file mode 100644 index 000000000000..9fd23b6cb3f3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Database.java @@ -0,0 +1,463 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about a single database. + */ +public class Database { + /** + * Unique identifier for the database. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Name of the database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * SQL Server compatibility level of database. Possible values include: + * 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', + * 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + */ + @JsonProperty(value = "compatibilityLevel") + private DatabaseCompatLevel compatibilityLevel; + + /** + * Collation name of the database. + */ + @JsonProperty(value = "collation") + private String collation; + + /** + * Name of the server. + */ + @JsonProperty(value = "serverName") + private String serverName; + + /** + * Fully qualified name. + */ + @JsonProperty(value = "fqdn") + private String fqdn; + + /** + * Install id of the database. + */ + @JsonProperty(value = "installId") + private String installId; + + /** + * Version of the server. + */ + @JsonProperty(value = "serverVersion") + private String serverVersion; + + /** + * Edition of the server. + */ + @JsonProperty(value = "serverEdition") + private String serverEdition; + + /** + * Product level of the server (RTM, SP, CTP). + */ + @JsonProperty(value = "serverLevel") + private String serverLevel; + + /** + * Default path of the data files. + */ + @JsonProperty(value = "serverDefaultDataPath") + private String serverDefaultDataPath; + + /** + * Default path of the log files. + */ + @JsonProperty(value = "serverDefaultLogPath") + private String serverDefaultLogPath; + + /** + * Default path of the backup folder. + */ + @JsonProperty(value = "serverDefaultBackupPath") + private String serverDefaultBackupPath; + + /** + * Number of cores on the server. + */ + @JsonProperty(value = "serverCoreCount") + private Integer serverCoreCount; + + /** + * Number of cores on the server that have VISIBLE ONLINE status. + */ + @JsonProperty(value = "serverVisibleOnlineCoreCount") + private Integer serverVisibleOnlineCoreCount; + + /** + * State of the database. Possible values include: 'Online', 'Restoring', + * 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', + * 'Copying', 'OfflineSecondary'. + */ + @JsonProperty(value = "databaseState") + private DatabaseState databaseState; + + /** + * The unique Server Id. + */ + @JsonProperty(value = "serverId") + private String serverId; + + /** + * Get unique identifier for the database. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique identifier for the database. + * + * @param id the id value to set + * @return the Database object itself. + */ + public Database withId(String id) { + this.id = id; + return this; + } + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the Database object itself. + */ + public Database withName(String name) { + this.name = name; + return this; + } + + /** + * Get sQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + * + * @return the compatibilityLevel value + */ + public DatabaseCompatLevel compatibilityLevel() { + return this.compatibilityLevel; + } + + /** + * Set sQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + * + * @param compatibilityLevel the compatibilityLevel value to set + * @return the Database object itself. + */ + public Database withCompatibilityLevel(DatabaseCompatLevel compatibilityLevel) { + this.compatibilityLevel = compatibilityLevel; + return this; + } + + /** + * Get collation name of the database. + * + * @return the collation value + */ + public String collation() { + return this.collation; + } + + /** + * Set collation name of the database. + * + * @param collation the collation value to set + * @return the Database object itself. + */ + public Database withCollation(String collation) { + this.collation = collation; + return this; + } + + /** + * Get name of the server. + * + * @return the serverName value + */ + public String serverName() { + return this.serverName; + } + + /** + * Set name of the server. + * + * @param serverName the serverName value to set + * @return the Database object itself. + */ + public Database withServerName(String serverName) { + this.serverName = serverName; + return this; + } + + /** + * Get fully qualified name. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set fully qualified name. + * + * @param fqdn the fqdn value to set + * @return the Database object itself. + */ + public Database withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get install id of the database. + * + * @return the installId value + */ + public String installId() { + return this.installId; + } + + /** + * Set install id of the database. + * + * @param installId the installId value to set + * @return the Database object itself. + */ + public Database withInstallId(String installId) { + this.installId = installId; + return this; + } + + /** + * Get version of the server. + * + * @return the serverVersion value + */ + public String serverVersion() { + return this.serverVersion; + } + + /** + * Set version of the server. + * + * @param serverVersion the serverVersion value to set + * @return the Database object itself. + */ + public Database withServerVersion(String serverVersion) { + this.serverVersion = serverVersion; + return this; + } + + /** + * Get edition of the server. + * + * @return the serverEdition value + */ + public String serverEdition() { + return this.serverEdition; + } + + /** + * Set edition of the server. + * + * @param serverEdition the serverEdition value to set + * @return the Database object itself. + */ + public Database withServerEdition(String serverEdition) { + this.serverEdition = serverEdition; + return this; + } + + /** + * Get product level of the server (RTM, SP, CTP). + * + * @return the serverLevel value + */ + public String serverLevel() { + return this.serverLevel; + } + + /** + * Set product level of the server (RTM, SP, CTP). + * + * @param serverLevel the serverLevel value to set + * @return the Database object itself. + */ + public Database withServerLevel(String serverLevel) { + this.serverLevel = serverLevel; + return this; + } + + /** + * Get default path of the data files. + * + * @return the serverDefaultDataPath value + */ + public String serverDefaultDataPath() { + return this.serverDefaultDataPath; + } + + /** + * Set default path of the data files. + * + * @param serverDefaultDataPath the serverDefaultDataPath value to set + * @return the Database object itself. + */ + public Database withServerDefaultDataPath(String serverDefaultDataPath) { + this.serverDefaultDataPath = serverDefaultDataPath; + return this; + } + + /** + * Get default path of the log files. + * + * @return the serverDefaultLogPath value + */ + public String serverDefaultLogPath() { + return this.serverDefaultLogPath; + } + + /** + * Set default path of the log files. + * + * @param serverDefaultLogPath the serverDefaultLogPath value to set + * @return the Database object itself. + */ + public Database withServerDefaultLogPath(String serverDefaultLogPath) { + this.serverDefaultLogPath = serverDefaultLogPath; + return this; + } + + /** + * Get default path of the backup folder. + * + * @return the serverDefaultBackupPath value + */ + public String serverDefaultBackupPath() { + return this.serverDefaultBackupPath; + } + + /** + * Set default path of the backup folder. + * + * @param serverDefaultBackupPath the serverDefaultBackupPath value to set + * @return the Database object itself. + */ + public Database withServerDefaultBackupPath(String serverDefaultBackupPath) { + this.serverDefaultBackupPath = serverDefaultBackupPath; + return this; + } + + /** + * Get number of cores on the server. + * + * @return the serverCoreCount value + */ + public Integer serverCoreCount() { + return this.serverCoreCount; + } + + /** + * Set number of cores on the server. + * + * @param serverCoreCount the serverCoreCount value to set + * @return the Database object itself. + */ + public Database withServerCoreCount(Integer serverCoreCount) { + this.serverCoreCount = serverCoreCount; + return this; + } + + /** + * Get number of cores on the server that have VISIBLE ONLINE status. + * + * @return the serverVisibleOnlineCoreCount value + */ + public Integer serverVisibleOnlineCoreCount() { + return this.serverVisibleOnlineCoreCount; + } + + /** + * Set number of cores on the server that have VISIBLE ONLINE status. + * + * @param serverVisibleOnlineCoreCount the serverVisibleOnlineCoreCount value to set + * @return the Database object itself. + */ + public Database withServerVisibleOnlineCoreCount(Integer serverVisibleOnlineCoreCount) { + this.serverVisibleOnlineCoreCount = serverVisibleOnlineCoreCount; + return this; + } + + /** + * Get state of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'. + * + * @return the databaseState value + */ + public DatabaseState databaseState() { + return this.databaseState; + } + + /** + * Set state of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'. + * + * @param databaseState the databaseState value to set + * @return the Database object itself. + */ + public Database withDatabaseState(DatabaseState databaseState) { + this.databaseState = databaseState; + return this; + } + + /** + * Get the unique Server Id. + * + * @return the serverId value + */ + public String serverId() { + return this.serverId; + } + + /** + * Set the unique Server Id. + * + * @param serverId the serverId value to set + * @return the Database object itself. + */ + public Database withServerId(String serverId) { + this.serverId = serverId; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseCompatLevel.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseCompatLevel.java new file mode 100644 index 000000000000..f7dee1e630ce --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseCompatLevel.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DatabaseCompatLevel. + */ +public enum DatabaseCompatLevel { + /** Enum value CompatLevel80. */ + COMPAT_LEVEL80("CompatLevel80"), + + /** Enum value CompatLevel90. */ + COMPAT_LEVEL90("CompatLevel90"), + + /** Enum value CompatLevel100. */ + COMPAT_LEVEL100("CompatLevel100"), + + /** Enum value CompatLevel110. */ + COMPAT_LEVEL110("CompatLevel110"), + + /** Enum value CompatLevel120. */ + COMPAT_LEVEL120("CompatLevel120"), + + /** Enum value CompatLevel130. */ + COMPAT_LEVEL130("CompatLevel130"), + + /** Enum value CompatLevel140. */ + COMPAT_LEVEL140("CompatLevel140"); + + /** The actual serialized value for a DatabaseCompatLevel instance. */ + private String value; + + DatabaseCompatLevel(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DatabaseCompatLevel instance. + * + * @param value the serialized value to parse. + * @return the parsed DatabaseCompatLevel object, or null if unable to parse. + */ + @JsonCreator + public static DatabaseCompatLevel fromString(String value) { + DatabaseCompatLevel[] items = DatabaseCompatLevel.values(); + for (DatabaseCompatLevel item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileInfo.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileInfo.java new file mode 100644 index 000000000000..4dde5012ae71 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileInfo.java @@ -0,0 +1,200 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database file specific information. + */ +public class DatabaseFileInfo { + /** + * Name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * Unique identifier for database file. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Logical name of the file. + */ + @JsonProperty(value = "logicalName") + private String logicalName; + + /** + * Operating-system full path of the file. + */ + @JsonProperty(value = "physicalFullName") + private String physicalFullName; + + /** + * Suggested full path of the file for restoring. + */ + @JsonProperty(value = "restoreFullName") + private String restoreFullName; + + /** + * Database file type. Possible values include: 'Rows', 'Log', + * 'Filestream', 'NotSupported', 'Fulltext'. + */ + @JsonProperty(value = "fileType") + private DatabaseFileType fileType; + + /** + * Size of the file in megabytes. + */ + @JsonProperty(value = "sizeMB") + private Double sizeMB; + + /** + * Get name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set name of the database. + * + * @param databaseName the databaseName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get unique identifier for database file. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique identifier for database file. + * + * @param id the id value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withId(String id) { + this.id = id; + return this; + } + + /** + * Get logical name of the file. + * + * @return the logicalName value + */ + public String logicalName() { + return this.logicalName; + } + + /** + * Set logical name of the file. + * + * @param logicalName the logicalName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withLogicalName(String logicalName) { + this.logicalName = logicalName; + return this; + } + + /** + * Get operating-system full path of the file. + * + * @return the physicalFullName value + */ + public String physicalFullName() { + return this.physicalFullName; + } + + /** + * Set operating-system full path of the file. + * + * @param physicalFullName the physicalFullName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withPhysicalFullName(String physicalFullName) { + this.physicalFullName = physicalFullName; + return this; + } + + /** + * Get suggested full path of the file for restoring. + * + * @return the restoreFullName value + */ + public String restoreFullName() { + return this.restoreFullName; + } + + /** + * Set suggested full path of the file for restoring. + * + * @param restoreFullName the restoreFullName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withRestoreFullName(String restoreFullName) { + this.restoreFullName = restoreFullName; + return this; + } + + /** + * Get database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @return the fileType value + */ + public DatabaseFileType fileType() { + return this.fileType; + } + + /** + * Set database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @param fileType the fileType value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withFileType(DatabaseFileType fileType) { + this.fileType = fileType; + return this; + } + + /** + * Get size of the file in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + + /** + * Set size of the file in megabytes. + * + * @param sizeMB the sizeMB value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withSizeMB(Double sizeMB) { + this.sizeMB = sizeMB; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileInput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileInput.java new file mode 100644 index 000000000000..e4ea692b00e9 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileInput.java @@ -0,0 +1,148 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database file specific information for input. + */ +public class DatabaseFileInput { + /** + * Unique identifier for database file. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Logical name of the file. + */ + @JsonProperty(value = "logicalName") + private String logicalName; + + /** + * Operating-system full path of the file. + */ + @JsonProperty(value = "physicalFullName") + private String physicalFullName; + + /** + * Suggested full path of the file for restoring. + */ + @JsonProperty(value = "restoreFullName") + private String restoreFullName; + + /** + * Database file type. Possible values include: 'Rows', 'Log', + * 'Filestream', 'NotSupported', 'Fulltext'. + */ + @JsonProperty(value = "fileType") + private DatabaseFileType fileType; + + /** + * Get unique identifier for database file. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique identifier for database file. + * + * @param id the id value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withId(String id) { + this.id = id; + return this; + } + + /** + * Get logical name of the file. + * + * @return the logicalName value + */ + public String logicalName() { + return this.logicalName; + } + + /** + * Set logical name of the file. + * + * @param logicalName the logicalName value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withLogicalName(String logicalName) { + this.logicalName = logicalName; + return this; + } + + /** + * Get operating-system full path of the file. + * + * @return the physicalFullName value + */ + public String physicalFullName() { + return this.physicalFullName; + } + + /** + * Set operating-system full path of the file. + * + * @param physicalFullName the physicalFullName value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withPhysicalFullName(String physicalFullName) { + this.physicalFullName = physicalFullName; + return this; + } + + /** + * Get suggested full path of the file for restoring. + * + * @return the restoreFullName value + */ + public String restoreFullName() { + return this.restoreFullName; + } + + /** + * Set suggested full path of the file for restoring. + * + * @param restoreFullName the restoreFullName value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withRestoreFullName(String restoreFullName) { + this.restoreFullName = restoreFullName; + return this; + } + + /** + * Get database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @return the fileType value + */ + public DatabaseFileType fileType() { + return this.fileType; + } + + /** + * Set database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @param fileType the fileType value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withFileType(DatabaseFileType fileType) { + this.fileType = fileType; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileType.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileType.java new file mode 100644 index 000000000000..9b7901462a09 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseFileType.java @@ -0,0 +1,62 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DatabaseFileType. + */ +public enum DatabaseFileType { + /** Enum value Rows. */ + ROWS("Rows"), + + /** Enum value Log. */ + LOG("Log"), + + /** Enum value Filestream. */ + FILESTREAM("Filestream"), + + /** Enum value NotSupported. */ + NOT_SUPPORTED("NotSupported"), + + /** Enum value Fulltext. */ + FULLTEXT("Fulltext"); + + /** The actual serialized value for a DatabaseFileType instance. */ + private String value; + + DatabaseFileType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DatabaseFileType instance. + * + * @param value the serialized value to parse. + * @return the parsed DatabaseFileType object, or null if unable to parse. + */ + @JsonCreator + public static DatabaseFileType fromString(String value) { + DatabaseFileType[] items = DatabaseFileType.values(); + for (DatabaseFileType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseInfo.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseInfo.java new file mode 100644 index 000000000000..663b48d39dbb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseInfo.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Project Database Details. + */ +public class DatabaseInfo { + /** + * Name of the database. + */ + @JsonProperty(value = "sourceDatabaseName", required = true) + private String sourceDatabaseName; + + /** + * Get name of the database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Set name of the database. + * + * @param sourceDatabaseName the sourceDatabaseName value to set + * @return the DatabaseInfo object itself. + */ + public DatabaseInfo withSourceDatabaseName(String sourceDatabaseName) { + this.sourceDatabaseName = sourceDatabaseName; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseMigrationStage.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseMigrationStage.java new file mode 100644 index 000000000000..b7e3ab032194 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseMigrationStage.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DatabaseMigrationStage. + */ +public enum DatabaseMigrationStage { + /** Enum value None. */ + NONE("None"), + + /** Enum value Initialize. */ + INITIALIZE("Initialize"), + + /** Enum value Backup. */ + BACKUP("Backup"), + + /** Enum value FileCopy. */ + FILE_COPY("FileCopy"), + + /** Enum value Restore. */ + RESTORE("Restore"), + + /** Enum value Completed. */ + COMPLETED("Completed"); + + /** The actual serialized value for a DatabaseMigrationStage instance. */ + private String value; + + DatabaseMigrationStage(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DatabaseMigrationStage instance. + * + * @param value the serialized value to parse. + * @return the parsed DatabaseMigrationStage object, or null if unable to parse. + */ + @JsonCreator + public static DatabaseMigrationStage fromString(String value) { + DatabaseMigrationStage[] items = DatabaseMigrationStage.values(); + for (DatabaseMigrationStage item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseObjectName.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseObjectName.java new file mode 100644 index 000000000000..24d86c5abb1d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseObjectName.java @@ -0,0 +1,89 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A representation of the name of an object in a database. + */ +public class DatabaseObjectName { + /** + * The unescaped name of the database containing the object. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * The unescaped name of the object. + */ + @JsonProperty(value = "objectName", access = JsonProperty.Access.WRITE_ONLY) + private String objectName; + + /** + * The unescaped name of the schema containing the object. + */ + @JsonProperty(value = "schemaName", access = JsonProperty.Access.WRITE_ONLY) + private String schemaName; + + /** + * Type of the object in the database. Possible values include: + * 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + */ + @JsonProperty(value = "objectType") + private ObjectType objectType; + + /** + * Get the unescaped name of the database containing the object. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Get the unescaped name of the object. + * + * @return the objectName value + */ + public String objectName() { + return this.objectName; + } + + /** + * Get the unescaped name of the schema containing the object. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Get type of the object in the database. Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @return the objectType value + */ + public ObjectType objectType() { + return this.objectType; + } + + /** + * Set type of the object in the database. Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @param objectType the objectType value to set + * @return the DatabaseObjectName object itself. + */ + public DatabaseObjectName withObjectType(ObjectType objectType) { + this.objectType = objectType; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseState.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseState.java new file mode 100644 index 000000000000..8be73021dae3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseState.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DatabaseState. + */ +public enum DatabaseState { + /** Enum value Online. */ + ONLINE("Online"), + + /** Enum value Restoring. */ + RESTORING("Restoring"), + + /** Enum value Recovering. */ + RECOVERING("Recovering"), + + /** Enum value RecoveryPending. */ + RECOVERY_PENDING("RecoveryPending"), + + /** Enum value Suspect. */ + SUSPECT("Suspect"), + + /** Enum value Emergency. */ + EMERGENCY("Emergency"), + + /** Enum value Offline. */ + OFFLINE("Offline"), + + /** Enum value Copying. */ + COPYING("Copying"), + + /** Enum value OfflineSecondary. */ + OFFLINE_SECONDARY("OfflineSecondary"); + + /** The actual serialized value for a DatabaseState instance. */ + private String value; + + DatabaseState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DatabaseState instance. + * + * @param value the serialized value to parse. + * @return the parsed DatabaseState object, or null if unable to parse. + */ + @JsonCreator + public static DatabaseState fromString(String value) { + DatabaseState[] items = DatabaseState.values(); + for (DatabaseState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseSummaryResult.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseSummaryResult.java new file mode 100644 index 000000000000..858cd0aeab19 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseSummaryResult.java @@ -0,0 +1,32 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Summary of database results in the migration. + */ +public class DatabaseSummaryResult extends DataItemMigrationSummaryResult { + /** + * Size of the database in megabytes. + */ + @JsonProperty(value = "sizeMB", access = JsonProperty.Access.WRITE_ONLY) + private Double sizeMB; + + /** + * Get size of the database in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseTable.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseTable.java new file mode 100644 index 000000000000..8a3f0231ec34 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/DatabaseTable.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Table properties. + */ +public class DatabaseTable { + /** + * Indicates whether table is empty or not. + */ + @JsonProperty(value = "hasRows", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasRows; + + /** + * Schema-qualified name of the table. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Get indicates whether table is empty or not. + * + * @return the hasRows value + */ + public Boolean hasRows() { + return this.hasRows; + } + + /** + * Get schema-qualified name of the table. + * + * @return the name value + */ + public String name() { + return this.name; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ErrorType.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ErrorType.java new file mode 100644 index 000000000000..6eaeb24c4128 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ErrorType.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ErrorType. + */ +public enum ErrorType { + /** Enum value Default. */ + DEFAULT("Default"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Error. */ + ERROR("Error"); + + /** The actual serialized value for a ErrorType instance. */ + private String value; + + ErrorType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ErrorType instance. + * + * @param value the serialized value to parse. + * @return the parsed ErrorType object, or null if unable to parse. + */ + @JsonCreator + public static ErrorType fromString(String value) { + ErrorType[] items = ErrorType.values(); + for (ErrorType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ExecutionStatistics.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ExecutionStatistics.java new file mode 100644 index 000000000000..da4cd6d72f22 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ExecutionStatistics.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description about the errors happen while performing migration validation. + */ +public class ExecutionStatistics { + /** + * No. of query executions. + */ + @JsonProperty(value = "executionCount") + private Long executionCount; + + /** + * CPU Time in millisecond(s) for the query execution. + */ + @JsonProperty(value = "cpuTimeMs") + private Double cpuTimeMs; + + /** + * Time taken in millisecond(s) for executing the query. + */ + @JsonProperty(value = "elapsedTimeMs") + private Double elapsedTimeMs; + + /** + * Dictionary of sql query execution wait types and the respective + * statistics. + */ + @JsonProperty(value = "waitStats") + private Map waitStats; + + /** + * Indicates whether the query resulted in an error. + */ + @JsonProperty(value = "hasErrors") + private Boolean hasErrors; + + /** + * List of sql Errors. + */ + @JsonProperty(value = "sqlErrors") + private List sqlErrors; + + /** + * Get no. of query executions. + * + * @return the executionCount value + */ + public Long executionCount() { + return this.executionCount; + } + + /** + * Set no. of query executions. + * + * @param executionCount the executionCount value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withExecutionCount(Long executionCount) { + this.executionCount = executionCount; + return this; + } + + /** + * Get cPU Time in millisecond(s) for the query execution. + * + * @return the cpuTimeMs value + */ + public Double cpuTimeMs() { + return this.cpuTimeMs; + } + + /** + * Set cPU Time in millisecond(s) for the query execution. + * + * @param cpuTimeMs the cpuTimeMs value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withCpuTimeMs(Double cpuTimeMs) { + this.cpuTimeMs = cpuTimeMs; + return this; + } + + /** + * Get time taken in millisecond(s) for executing the query. + * + * @return the elapsedTimeMs value + */ + public Double elapsedTimeMs() { + return this.elapsedTimeMs; + } + + /** + * Set time taken in millisecond(s) for executing the query. + * + * @param elapsedTimeMs the elapsedTimeMs value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withElapsedTimeMs(Double elapsedTimeMs) { + this.elapsedTimeMs = elapsedTimeMs; + return this; + } + + /** + * Get dictionary of sql query execution wait types and the respective statistics. + * + * @return the waitStats value + */ + public Map waitStats() { + return this.waitStats; + } + + /** + * Set dictionary of sql query execution wait types and the respective statistics. + * + * @param waitStats the waitStats value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withWaitStats(Map waitStats) { + this.waitStats = waitStats; + return this; + } + + /** + * Get indicates whether the query resulted in an error. + * + * @return the hasErrors value + */ + public Boolean hasErrors() { + return this.hasErrors; + } + + /** + * Set indicates whether the query resulted in an error. + * + * @param hasErrors the hasErrors value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withHasErrors(Boolean hasErrors) { + this.hasErrors = hasErrors; + return this; + } + + /** + * Get list of sql Errors. + * + * @return the sqlErrors value + */ + public List sqlErrors() { + return this.sqlErrors; + } + + /** + * Set list of sql Errors. + * + * @param sqlErrors the sqlErrors value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withSqlErrors(List sqlErrors) { + this.sqlErrors = sqlErrors; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskInput.java new file mode 100644 index 000000000000..96e8c27e9988 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskInput.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that collects user tables for the given list of + * databases. + */ +public class GetUserTablesSqlTaskInput { + /** + * Connection information for SQL Server. + */ + @JsonProperty(value = "connectionInfo", required = true) + private SqlConnectionInfo connectionInfo; + + /** + * List of database names to collect tables for. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Get connection information for SQL Server. + * + * @return the connectionInfo value + */ + public SqlConnectionInfo connectionInfo() { + return this.connectionInfo; + } + + /** + * Set connection information for SQL Server. + * + * @param connectionInfo the connectionInfo value to set + * @return the GetUserTablesSqlTaskInput object itself. + */ + public GetUserTablesSqlTaskInput withConnectionInfo(SqlConnectionInfo connectionInfo) { + this.connectionInfo = connectionInfo; + return this; + } + + /** + * Get list of database names to collect tables for. + * + * @return the selectedDatabases value + */ + public List selectedDatabases() { + return this.selectedDatabases; + } + + /** + * Set list of database names to collect tables for. + * + * @param selectedDatabases the selectedDatabases value to set + * @return the GetUserTablesSqlTaskInput object itself. + */ + public GetUserTablesSqlTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskOutput.java new file mode 100644 index 000000000000..be68ecd7e848 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskOutput.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output of the task that collects user tables for the given list of + * databases. + */ +public class GetUserTablesSqlTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Mapping from database name to list of tables. + */ + @JsonProperty(value = "databasesToTables", access = JsonProperty.Access.WRITE_ONLY) + private Map> databasesToTables; + + /** + * Validation errors. + */ + @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 mapping from database name to list of tables. + * + * @return the databasesToTables value + */ + public Map> databasesToTables() { + return this.databasesToTables; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskProperties.java new file mode 100644 index 000000000000..d60ec5e8be43 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/GetUserTablesSqlTaskProperties.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.azuredatabasemigrationservice.v2017_11_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") +@JsonTypeName("GetUserTables.Sql") +public class GetUserTablesSqlTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private GetUserTablesSqlTaskInput 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 GetUserTablesSqlTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the GetUserTablesSqlTaskProperties object itself. + */ + public GetUserTablesSqlTaskProperties withInput(GetUserTablesSqlTaskInput 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbDatabaseInput.java new file mode 100644 index 000000000000..12d6da9bf060 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbDatabaseInput.java @@ -0,0 +1,123 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for SQL to Azure SQL DB migration task inputs. + */ +public class MigrateSqlServerSqlDbDatabaseInput { + /** + * Name of the database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Name of target database. Note: Target database will be truncated before + * starting migration. + */ + @JsonProperty(value = "targetDatabaseName") + private String targetDatabaseName; + + /** + * Whether to set database read only before migration. + */ + @JsonProperty(value = "makeSourceDbReadOnly") + private Boolean makeSourceDbReadOnly; + + /** + * Mapping of source to target tables. + */ + @JsonProperty(value = "tableMap") + private Map tableMap; + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withName(String name) { + this.name = name; + 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 MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withTargetDatabaseName(String targetDatabaseName) { + this.targetDatabaseName = targetDatabaseName; + return this; + } + + /** + * Get whether to set database read only before migration. + * + * @return the makeSourceDbReadOnly value + */ + public Boolean makeSourceDbReadOnly() { + return this.makeSourceDbReadOnly; + } + + /** + * Set whether to set database read only before migration. + * + * @param makeSourceDbReadOnly the makeSourceDbReadOnly value to set + * @return the MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withMakeSourceDbReadOnly(Boolean makeSourceDbReadOnly) { + this.makeSourceDbReadOnly = makeSourceDbReadOnly; + 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 MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withTableMap(Map tableMap) { + this.tableMap = tableMap; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskInput.java new file mode 100644 index 000000000000..acf44f3441e8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskInput.java @@ -0,0 +1,85 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that migrates on-prem SQL Server databases to Azure SQL + * Database. + */ +public class MigrateSqlServerSqlDbTaskInput extends SqlMigrationTaskInput { + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Options for enabling various post migration validations. Available + * options, + * 1.) Data Integrity Check: Performs a checksum based comparison on source + * and target tables after the migration to ensure the correctness of the + * data. + * 2.) Schema Validation: Performs a thorough schema comparison between the + * source and target tables and provides a list of differences between the + * source and target database, 3.) Query Analysis: Executes a set of + * queries picked up automatically either from the Query Plan Cache or + * Query Store and execute them and compares the execution time between the + * source and target database. + */ + @JsonProperty(value = "validationOptions") + private MigrationValidationOptions validationOptions; + + /** + * 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 MigrateSqlServerSqlDbTaskInput object itself. + */ + public MigrateSqlServerSqlDbTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + + /** + * Get options for enabling various post migration validations. Available options, + 1.) Data Integrity Check: Performs a checksum based comparison on source and target tables after the migration to ensure the correctness of the data. + 2.) Schema Validation: Performs a thorough schema comparison between the source and target tables and provides a list of differences between the source and target database, 3.) Query Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or Query Store and execute them and compares the execution time between the source and target database. + * + * @return the validationOptions value + */ + public MigrationValidationOptions validationOptions() { + return this.validationOptions; + } + + /** + * Set options for enabling various post migration validations. Available options, + 1.) Data Integrity Check: Performs a checksum based comparison on source and target tables after the migration to ensure the correctness of the data. + 2.) Schema Validation: Performs a thorough schema comparison between the source and target tables and provides a list of differences between the source and target database, 3.) Query Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or Query Store and execute them and compares the execution time between the source and target database. + * + * @param validationOptions the validationOptions value to set + * @return the MigrateSqlServerSqlDbTaskInput object itself. + */ + public MigrateSqlServerSqlDbTaskInput withValidationOptions(MigrationValidationOptions validationOptions) { + this.validationOptions = validationOptions; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutput.java new file mode 100644 index 000000000000..94367d9f9d2f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutput.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.azuredatabasemigrationservice.v2017_11_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 on-prem SQL Server databases to Azure SQL + * Database. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrateSqlServerSqlDbTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlDbTaskOutputError.class), + @JsonSubTypes.Type(name = "TableLevelOutput", value = MigrateSqlServerSqlDbTaskOutputTableLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlDbTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlDbTaskOutputMigrationLevel.class) +}) +public class MigrateSqlServerSqlDbTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..4b2aac2a0589 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java @@ -0,0 +1,237 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import org.joda.time.DateTime; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Database level result for Sql Server to Azure Sql DB migration. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelOutput") +public class MigrateSqlServerSqlDbTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbTaskOutput { + /** + * Name of the item. + */ + @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; + + /** + * 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 stage that this database is in. Possible values include: + * 'None', 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed'. + */ + @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseMigrationStage stage; + + /** + * Status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Number of objects. + */ + @JsonProperty(value = "numberOfObjects", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfObjects; + + /** + * Number of successfully completed objects. + */ + @JsonProperty(value = "numberOfObjectsCompleted", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfObjectsCompleted; + + /** + * Number of database/object errors. + */ + @JsonProperty(value = "errorCount", access = JsonProperty.Access.WRITE_ONLY) + private Long errorCount; + + /** + * Wildcard string prefix to use for querying all errors of the item. + */ + @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String errorPrefix; + + /** + * Wildcard string prefix to use for querying all sub-tem results of the + * item. + */ + @JsonProperty(value = "resultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String resultPrefix; + + /** + * Migration exceptions and warnings. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Summary of object results in the migration. + */ + @JsonProperty(value = "objectSummary", access = JsonProperty.Access.WRITE_ONLY) + private Map objectSummary; + + /** + * Get name of the item. + * + * @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 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 stage that this database is in. Possible values include: 'None', 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed'. + * + * @return the stage value + */ + public DatabaseMigrationStage stage() { + return this.stage; + } + + /** + * Get status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get number of objects. + * + * @return the numberOfObjects value + */ + public Long numberOfObjects() { + return this.numberOfObjects; + } + + /** + * Get number of successfully completed objects. + * + * @return the numberOfObjectsCompleted value + */ + public Long numberOfObjectsCompleted() { + return this.numberOfObjectsCompleted; + } + + /** + * Get number of database/object errors. + * + * @return the errorCount value + */ + public Long errorCount() { + return this.errorCount; + } + + /** + * Get wildcard string prefix to use for querying all errors of the item. + * + * @return the errorPrefix value + */ + public String errorPrefix() { + return this.errorPrefix; + } + + /** + * Get wildcard string prefix to use for querying all sub-tem results of the item. + * + * @return the resultPrefix value + */ + public String resultPrefix() { + return this.resultPrefix; + } + + /** + * Get migration exceptions and warnings. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + + /** + * Get summary of object results in the migration. + * + * @return the objectSummary value + */ + public Map objectSummary() { + return this.objectSummary; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputError.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputError.java new file mode 100644 index 000000000000..ccbe0d6db50b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputError.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Task errors for Sql Server to Azure Sql DB migration. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ErrorOutput") +public class MigrateSqlServerSqlDbTaskOutputError extends MigrateSqlServerSqlDbTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java new file mode 100644 index 000000000000..d75f3c51685c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java @@ -0,0 +1,248 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import org.joda.time.DateTime; +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Migration level result for Sql server to Azure Sql DB migration. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrationLevelOutput") +public class MigrateSqlServerSqlDbTaskOutputMigrationLevel extends MigrateSqlServerSqlDbTaskOutput { + /** + * 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; + + /** + * Duration of task execution in seconds. + */ + @JsonProperty(value = "durationInSeconds", access = JsonProperty.Access.WRITE_ONLY) + private Long durationInSeconds; + + /** + * 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 status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Selected databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * Summary of database results in the migration. + */ + @JsonProperty(value = "databaseSummary", access = JsonProperty.Access.WRITE_ONLY) + private Map databaseSummary; + + /** + * Migration Report Result, provides unique url for downloading your + * migration report. + */ + @JsonProperty(value = "migrationReportResult") + private MigrationReportResult migrationReportResult; + + /** + * 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; + + /** + * 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 duration of task execution in seconds. + * + * @return the durationInSeconds value + */ + public Long durationInSeconds() { + return this.durationInSeconds; + } + + /** + * 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 status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get selected databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * Get summary of database results in the migration. + * + * @return the databaseSummary value + */ + public Map databaseSummary() { + return this.databaseSummary; + } + + /** + * Get migration Report Result, provides unique url for downloading your migration report. + * + * @return the migrationReportResult value + */ + public MigrationReportResult migrationReportResult() { + return this.migrationReportResult; + } + + /** + * Set migration Report Result, provides unique url for downloading your migration report. + * + * @param migrationReportResult the migrationReportResult value to set + * @return the MigrateSqlServerSqlDbTaskOutputMigrationLevel object itself. + */ + public MigrateSqlServerSqlDbTaskOutputMigrationLevel withMigrationReportResult(MigrationReportResult migrationReportResult) { + this.migrationReportResult = migrationReportResult; + return this; + } + + /** + * 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; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java new file mode 100644 index 000000000000..56fd7b0fd968 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java @@ -0,0 +1,159 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_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; + +/** + * Table level result for Sql Server to Azure Sql DB migration. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("TableLevelOutput") +public class MigrateSqlServerSqlDbTaskOutputTableLevel extends MigrateSqlServerSqlDbTaskOutput { + /** + * Name of the item. + */ + @JsonProperty(value = "objectName", access = JsonProperty.Access.WRITE_ONLY) + private String objectName; + + /** + * 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 state of migration. Possible values include: 'None', + * 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Number of items. + */ + @JsonProperty(value = "itemsCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCount; + + /** + * Number of successfully completed items. + */ + @JsonProperty(value = "itemsCompletedCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCompletedCount; + + /** + * Wildcard string prefix to use for querying all errors of the item. + */ + @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String errorPrefix; + + /** + * Wildcard string prefix to use for querying all sub-tem results of the + * item. + */ + @JsonProperty(value = "resultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String resultPrefix; + + /** + * Get name of the item. + * + * @return the objectName value + */ + public String objectName() { + return this.objectName; + } + + /** + * 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 state of migration. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get number of items. + * + * @return the itemsCount value + */ + public Long itemsCount() { + return this.itemsCount; + } + + /** + * Get number of successfully completed items. + * + * @return the itemsCompletedCount value + */ + public Long itemsCompletedCount() { + return this.itemsCompletedCount; + } + + /** + * Get wildcard string prefix to use for querying all errors of the item. + * + * @return the errorPrefix value + */ + public String errorPrefix() { + return this.errorPrefix; + } + + /** + * Get wildcard string prefix to use for querying all sub-tem results of the item. + * + * @return the resultPrefix value + */ + public String resultPrefix() { + return this.resultPrefix; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskProperties.java new file mode 100644 index 000000000000..488c6150f211 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrateSqlServerSqlDbTaskProperties.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.azuredatabasemigrationservice.v2017_11_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 on-prem SQL Server databases to Azure + * SQL Database. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Migrate.SqlServer.SqlDb") +public class MigrateSqlServerSqlDbTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateSqlServerSqlDbTaskInput 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 MigrateSqlServerSqlDbTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateSqlServerSqlDbTaskProperties object itself. + */ + public MigrateSqlServerSqlDbTaskProperties withInput(MigrateSqlServerSqlDbTaskInput 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationReportResult.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationReportResult.java new file mode 100644 index 000000000000..0580f6cf71fc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationReportResult.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration validation report result, contains the url for downloading the + * generated report. + */ +public class MigrationReportResult { + /** + * Migration validation result identifier. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The url of the report. + */ + @JsonProperty(value = "reportUrl") + private String reportUrl; + + /** + * Get migration validation result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set migration validation result identifier. + * + * @param id the id value to set + * @return the MigrationReportResult object itself. + */ + public MigrationReportResult withId(String id) { + this.id = id; + return this; + } + + /** + * Get the url of the report. + * + * @return the reportUrl value + */ + public String reportUrl() { + return this.reportUrl; + } + + /** + * Set the url of the report. + * + * @param reportUrl the reportUrl value to set + * @return the MigrationReportResult object itself. + */ + public MigrationReportResult withReportUrl(String reportUrl) { + this.reportUrl = reportUrl; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationState.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationState.java new file mode 100644 index 000000000000..f46b6c973210 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationState.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for MigrationState. + */ +public enum MigrationState { + /** Enum value None. */ + NONE("None"), + + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Completed. */ + COMPLETED("Completed"), + + /** Enum value Skipped. */ + SKIPPED("Skipped"), + + /** Enum value Stopped. */ + STOPPED("Stopped"); + + /** The actual serialized value for a MigrationState instance. */ + private String value; + + MigrationState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MigrationState instance. + * + * @param value the serialized value to parse. + * @return the parsed MigrationState object, or null if unable to parse. + */ + @JsonCreator + public static MigrationState fromString(String value) { + MigrationState[] items = MigrationState.values(); + for (MigrationState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationStatus.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationStatus.java new file mode 100644 index 000000000000..a7f126dbefae --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationStatus.java @@ -0,0 +1,77 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for MigrationStatus. + */ +public enum MigrationStatus { + /** Enum value Default. */ + DEFAULT("Default"), + + /** Enum value Connecting. */ + CONNECTING("Connecting"), + + /** Enum value SourceAndTargetSelected. */ + SOURCE_AND_TARGET_SELECTED("SourceAndTargetSelected"), + + /** Enum value SelectLogins. */ + SELECT_LOGINS("SelectLogins"), + + /** Enum value Configured. */ + CONFIGURED("Configured"), + + /** Enum value Running. */ + RUNNING("Running"), + + /** Enum value Error. */ + ERROR("Error"), + + /** Enum value Stopped. */ + STOPPED("Stopped"), + + /** Enum value Completed. */ + COMPLETED("Completed"), + + /** Enum value CompletedWithWarnings. */ + COMPLETED_WITH_WARNINGS("CompletedWithWarnings"); + + /** The actual serialized value for a MigrationStatus instance. */ + private String value; + + MigrationStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MigrationStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed MigrationStatus object, or null if unable to parse. + */ + @JsonCreator + public static MigrationStatus fromString(String value) { + MigrationStatus[] items = MigrationStatus.values(); + for (MigrationStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationTableMetadata.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationTableMetadata.java new file mode 100644 index 000000000000..3c8a3752fccf --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationTableMetadata.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metadata for tables selected in migration project. + */ +public class MigrationTableMetadata { + /** + * Source table name. + */ + @JsonProperty(value = "sourceTableName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceTableName; + + /** + * Target table name. + */ + @JsonProperty(value = "targetTableName", access = JsonProperty.Access.WRITE_ONLY) + private String targetTableName; + + /** + * Get source table name. + * + * @return the sourceTableName value + */ + public String sourceTableName() { + return this.sourceTableName; + } + + /** + * Get target table name. + * + * @return the targetTableName value + */ + public String targetTableName() { + return this.targetTableName; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationDatabaseLevelResult.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationDatabaseLevelResult.java new file mode 100644 index 000000000000..067198e5f471 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationDatabaseLevelResult.java @@ -0,0 +1,172 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database level validation results. + */ +public class MigrationValidationDatabaseLevelResult { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Migration Identifier. + */ + @JsonProperty(value = "migrationId", access = JsonProperty.Access.WRITE_ONLY) + private String migrationId; + + /** + * Name of the source database. + */ + @JsonProperty(value = "sourceDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceDatabaseName; + + /** + * Name of the target database. + */ + @JsonProperty(value = "targetDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String targetDatabaseName; + + /** + * Validation start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Validation end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Provides data integrity validation result between the source and target + * tables that are migrated. + */ + @JsonProperty(value = "dataIntegrityValidationResult", access = JsonProperty.Access.WRITE_ONLY) + private DataIntegrityValidationResult dataIntegrityValidationResult; + + /** + * Provides schema comparison result between source and target database. + */ + @JsonProperty(value = "schemaValidationResult", access = JsonProperty.Access.WRITE_ONLY) + private SchemaComparisonValidationResult schemaValidationResult; + + /** + * Results of some of the query execution result between source and target + * database. + */ + @JsonProperty(value = "queryAnalysisValidationResult", access = JsonProperty.Access.WRITE_ONLY) + private QueryAnalysisValidationResult queryAnalysisValidationResult; + + /** + * Current status of validation at the database level. Possible values + * include: 'Default', 'NotStarted', 'Initialized', 'InProgress', + * 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get migration Identifier. + * + * @return the migrationId value + */ + public String migrationId() { + return this.migrationId; + } + + /** + * Get name of the source database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Get name of the target database. + * + * @return the targetDatabaseName value + */ + public String targetDatabaseName() { + return this.targetDatabaseName; + } + + /** + * Get validation start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get validation end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get provides data integrity validation result between the source and target tables that are migrated. + * + * @return the dataIntegrityValidationResult value + */ + public DataIntegrityValidationResult dataIntegrityValidationResult() { + return this.dataIntegrityValidationResult; + } + + /** + * Get provides schema comparison result between source and target database. + * + * @return the schemaValidationResult value + */ + public SchemaComparisonValidationResult schemaValidationResult() { + return this.schemaValidationResult; + } + + /** + * Get results of some of the query execution result between source and target database. + * + * @return the queryAnalysisValidationResult value + */ + public QueryAnalysisValidationResult queryAnalysisValidationResult() { + return this.queryAnalysisValidationResult; + } + + /** + * Get current status of validation at the database level. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationDatabaseSummaryResult.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationDatabaseSummaryResult.java new file mode 100644 index 000000000000..b5dff707283e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationDatabaseSummaryResult.java @@ -0,0 +1,125 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration Validation Database level summary result. + */ +public class MigrationValidationDatabaseSummaryResult { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Migration Identifier. + */ + @JsonProperty(value = "migrationId", access = JsonProperty.Access.WRITE_ONLY) + private String migrationId; + + /** + * Name of the source database. + */ + @JsonProperty(value = "sourceDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceDatabaseName; + + /** + * Name of the target database. + */ + @JsonProperty(value = "targetDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String targetDatabaseName; + + /** + * Validation start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Validation end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Current status of validation at the database level. Possible values + * include: 'Default', 'NotStarted', 'Initialized', 'InProgress', + * 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get migration Identifier. + * + * @return the migrationId value + */ + public String migrationId() { + return this.migrationId; + } + + /** + * Get name of the source database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Get name of the target database. + * + * @return the targetDatabaseName value + */ + public String targetDatabaseName() { + return this.targetDatabaseName; + } + + /** + * Get validation start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get validation end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get current status of validation at the database level. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationOptions.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationOptions.java new file mode 100644 index 000000000000..1cfddeb08a95 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationOptions.java @@ -0,0 +1,99 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Types of validations to run after the migration. + */ +public class MigrationValidationOptions { + /** + * Allows to compare the schema information between source and target. + */ + @JsonProperty(value = "enableSchemaValidation") + private Boolean enableSchemaValidation; + + /** + * Allows to perform a checksum based data integrity validation between + * source and target for the selected database / tables . + */ + @JsonProperty(value = "enableDataIntegrityValidation") + private Boolean enableDataIntegrityValidation; + + /** + * Allows to perform a quick and intelligent query analysis by retrieving + * queries from the source database and executes them in the target. The + * result will have execution statistics for executions in source and + * target databases for the extracted queries. + */ + @JsonProperty(value = "enableQueryAnalysisValidation") + private Boolean enableQueryAnalysisValidation; + + /** + * Get allows to compare the schema information between source and target. + * + * @return the enableSchemaValidation value + */ + public Boolean enableSchemaValidation() { + return this.enableSchemaValidation; + } + + /** + * Set allows to compare the schema information between source and target. + * + * @param enableSchemaValidation the enableSchemaValidation value to set + * @return the MigrationValidationOptions object itself. + */ + public MigrationValidationOptions withEnableSchemaValidation(Boolean enableSchemaValidation) { + this.enableSchemaValidation = enableSchemaValidation; + return this; + } + + /** + * Get allows to perform a checksum based data integrity validation between source and target for the selected database / tables . + * + * @return the enableDataIntegrityValidation value + */ + public Boolean enableDataIntegrityValidation() { + return this.enableDataIntegrityValidation; + } + + /** + * Set allows to perform a checksum based data integrity validation between source and target for the selected database / tables . + * + * @param enableDataIntegrityValidation the enableDataIntegrityValidation value to set + * @return the MigrationValidationOptions object itself. + */ + public MigrationValidationOptions withEnableDataIntegrityValidation(Boolean enableDataIntegrityValidation) { + this.enableDataIntegrityValidation = enableDataIntegrityValidation; + return this; + } + + /** + * Get allows to perform a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries. + * + * @return the enableQueryAnalysisValidation value + */ + public Boolean enableQueryAnalysisValidation() { + return this.enableQueryAnalysisValidation; + } + + /** + * Set allows to perform a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries. + * + * @param enableQueryAnalysisValidation the enableQueryAnalysisValidation value to set + * @return the MigrationValidationOptions object itself. + */ + public MigrationValidationOptions withEnableQueryAnalysisValidation(Boolean enableQueryAnalysisValidation) { + this.enableQueryAnalysisValidation = enableQueryAnalysisValidation; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationResult.java new file mode 100644 index 000000000000..f3c55de12ccd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/MigrationValidationResult.java @@ -0,0 +1,92 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration Validation Result. + */ +public class MigrationValidationResult { + /** + * Migration validation result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Migration Identifier. + */ + @JsonProperty(value = "migrationId", access = JsonProperty.Access.WRITE_ONLY) + private String migrationId; + + /** + * Validation summary results for each database. + */ + @JsonProperty(value = "summaryResults") + private Map summaryResults; + + /** + * Current status of validation at the migration level. Status from the + * database validation result status will be aggregated here. Possible + * values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', + * 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get migration validation result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get migration Identifier. + * + * @return the migrationId value + */ + public String migrationId() { + return this.migrationId; + } + + /** + * Get validation summary results for each database. + * + * @return the summaryResults value + */ + public Map summaryResults() { + return this.summaryResults; + } + + /** + * Set validation summary results for each database. + * + * @param summaryResults the summaryResults value to set + * @return the MigrationValidationResult object itself. + */ + public MigrationValidationResult withSummaryResults(Map summaryResults) { + this.summaryResults = summaryResults; + return this; + } + + /** + * Get current status of validation at the migration level. Status from the database validation result status will be aggregated here. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameAvailabilityRequest.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameAvailabilityRequest.java new file mode 100644 index 000000000000..72935b5eea74 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameAvailabilityRequest.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A resource type and proposed name. + */ +public class NameAvailabilityRequest { + /** + * The proposed resource name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The resource type chain (e.g. virtualMachines/extensions). + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the proposed resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the proposed resource name. + * + * @param name the name value to set + * @return the NameAvailabilityRequest object itself. + */ + public NameAvailabilityRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource type chain (e.g. virtualMachines/extensions). + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the resource type chain (e.g. virtualMachines/extensions). + * + * @param type the type value to set + * @return the NameAvailabilityRequest object itself. + */ + public NameAvailabilityRequest withType(String type) { + this.type = type; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameAvailabilityResponse.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameAvailabilityResponse.java new file mode 100644 index 000000000000..e14f682ae36f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameAvailabilityResponse.java @@ -0,0 +1,35 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.NameAvailabilityResponseInner; + +/** + * Type representing NameAvailabilityResponse. + */ +public interface NameAvailabilityResponse extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + NameCheckFailureReason reason(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameCheckFailureReason.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameCheckFailureReason.java new file mode 100644 index 000000000000..86344f7f1bba --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/NameCheckFailureReason.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for NameCheckFailureReason. + */ +public enum NameCheckFailureReason { + /** Enum value AlreadyExists. */ + ALREADY_EXISTS("AlreadyExists"), + + /** Enum value Invalid. */ + INVALID("Invalid"); + + /** The actual serialized value for a NameCheckFailureReason instance. */ + private String value; + + NameCheckFailureReason(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a NameCheckFailureReason instance. + * + * @param value the serialized value to parse. + * @return the parsed NameCheckFailureReason object, or null if unable to parse. + */ + @JsonCreator + public static NameCheckFailureReason fromString(String value) { + NameCheckFailureReason[] items = NameCheckFailureReason.values(); + for (NameCheckFailureReason item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ODataError.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ODataError.java new file mode 100644 index 000000000000..9056fd9f8560 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ODataError.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error information in OData format. + */ +public class ODataError { + /** + * The machine-readable description of the error, such as 'InvalidRequest' + * or 'InternalServerError'. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The human-readable description of the error. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Inner errors that caused this error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get the machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError'. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError'. + * + * @param code the code value to set + * @return the ODataError object itself. + */ + public ODataError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the human-readable description of the error. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the human-readable description of the error. + * + * @param message the message value to set + * @return the ODataError object itself. + */ + public ODataError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get inner errors that caused this error. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set inner errors that caused this error. + * + * @param details the details value to set + * @return the ODataError object itself. + */ + public ODataError withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ObjectType.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ObjectType.java new file mode 100644 index 000000000000..c8635331808a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ObjectType.java @@ -0,0 +1,62 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ObjectType. + */ +public enum ObjectType { + /** Enum value StoredProcedures. */ + STORED_PROCEDURES("StoredProcedures"), + + /** Enum value Table. */ + TABLE("Table"), + + /** Enum value User. */ + USER("User"), + + /** Enum value View. */ + VIEW("View"), + + /** Enum value Function. */ + FUNCTION("Function"); + + /** The actual serialized value for a ObjectType instance. */ + private String value; + + ObjectType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ObjectType instance. + * + * @param value the serialized value to parse. + * @return the parsed ObjectType object, or null if unable to parse. + */ + @JsonCreator + public static ObjectType fromString(String value) { + ObjectType[] items = ObjectType.values(); + for (ObjectType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Operations.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Operations.java new file mode 100644 index 000000000000..678a7d4f37be --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Operations.java @@ -0,0 +1,28 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Project.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Project.java new file mode 100644 index 000000000000..aee85f559fe4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Project.java @@ -0,0 +1,268 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.ProjectInner; +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.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationManager; +import java.util.Map; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing Project. + */ +public interface Project extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the creationTime value. + */ + DateTime creationTime(); + + /** + * @return the databasesInfo value. + */ + List databasesInfo(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProjectProvisioningState provisioningState(); + + /** + * @return the sourceConnectionInfo value. + */ + ConnectionInfo sourceConnectionInfo(); + + /** + * @return the sourcePlatform value. + */ + ProjectSourcePlatform sourcePlatform(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the targetConnectionInfo value. + */ + ConnectionInfo targetConnectionInfo(); + + /** + * @return the targetPlatform value. + */ + ProjectTargetPlatform targetPlatform(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the Project definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithService, DefinitionStages.WithLocation, DefinitionStages.WithSourcePlatform, DefinitionStages.WithTargetPlatform, DefinitionStages.WithCreate { + } + + /** + * Grouping of Project definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Project definition. + */ + interface Blank extends WithService { + } + + /** + * The stage of the project 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 + */ + WithLocation withExistingService(String groupName, String serviceName); + } + + /** + * The stage of the project definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next definition stage + */ + WithSourcePlatform withLocation(String location); + } + + /** + * The stage of the project definition allowing to specify SourcePlatform. + */ + interface WithSourcePlatform { + /** + * Specifies sourcePlatform. + * @param sourcePlatform Source platform for the project. Possible values include: 'SQL', 'Unknown' + * @return the next definition stage + */ + WithTargetPlatform withSourcePlatform(ProjectSourcePlatform sourcePlatform); + } + + /** + * The stage of the project definition allowing to specify TargetPlatform. + */ + interface WithTargetPlatform { + /** + * Specifies targetPlatform. + * @param targetPlatform Target platform for the project. Possible values include: 'SQLDB', 'Unknown' + * @return the next definition stage + */ + WithCreate withTargetPlatform(ProjectTargetPlatform targetPlatform); + } + + /** + * The stage of the project definition allowing to specify DatabasesInfo. + */ + interface WithDatabasesInfo { + /** + * Specifies databasesInfo. + * @param databasesInfo List of DatabaseInfo + * @return the next definition stage + */ + WithCreate withDatabasesInfo(List databasesInfo); + } + + /** + * The stage of the project definition allowing to specify SourceConnectionInfo. + */ + interface WithSourceConnectionInfo { + /** + * Specifies sourceConnectionInfo. + * @param sourceConnectionInfo Information for connecting to source + * @return the next definition stage + */ + WithCreate withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo); + } + + /** + * The stage of the project definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the project definition allowing to specify TargetConnectionInfo. + */ + interface WithTargetConnectionInfo { + /** + * Specifies targetConnectionInfo. + * @param targetConnectionInfo Information for connecting to target + * @return the next definition stage + */ + WithCreate withTargetConnectionInfo(ConnectionInfo targetConnectionInfo); + } + + /** + * 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.WithDatabasesInfo, DefinitionStages.WithSourceConnectionInfo, DefinitionStages.WithTags, DefinitionStages.WithTargetConnectionInfo { + } + } + /** + * The template for a Project update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithDatabasesInfo, UpdateStages.WithSourceConnectionInfo, UpdateStages.WithTags, UpdateStages.WithTargetConnectionInfo { + } + + /** + * Grouping of Project update stages. + */ + interface UpdateStages { + /** + * The stage of the project update allowing to specify DatabasesInfo. + */ + interface WithDatabasesInfo { + /** + * Specifies databasesInfo. + * @param databasesInfo List of DatabaseInfo + * @return the next update stage + */ + Update withDatabasesInfo(List databasesInfo); + } + + /** + * The stage of the project update allowing to specify SourceConnectionInfo. + */ + interface WithSourceConnectionInfo { + /** + * Specifies sourceConnectionInfo. + * @param sourceConnectionInfo Information for connecting to source + * @return the next update stage + */ + Update withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo); + } + + /** + * The stage of the project update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next update stage + */ + Update withTags(Map tags); + } + + /** + * The stage of the project update allowing to specify TargetConnectionInfo. + */ + interface WithTargetConnectionInfo { + /** + * Specifies targetConnectionInfo. + * @param targetConnectionInfo Information for connecting to target + * @return the next update stage + */ + Update withTargetConnectionInfo(ConnectionInfo targetConnectionInfo); + } + + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectProvisioningState.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectProvisioningState.java new file mode 100644 index 000000000000..6b664e8dc972 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectProvisioningState.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ProjectProvisioningState. + */ +public enum ProjectProvisioningState { + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"); + + /** The actual serialized value for a ProjectProvisioningState instance. */ + private String value; + + ProjectProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ProjectProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed ProjectProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static ProjectProvisioningState fromString(String value) { + ProjectProvisioningState[] items = ProjectProvisioningState.values(); + for (ProjectProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectSourcePlatform.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectSourcePlatform.java new file mode 100644 index 000000000000..3a52e5964e50 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectSourcePlatform.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ProjectSourcePlatform. + */ +public enum ProjectSourcePlatform { + /** Enum value SQL. */ + SQL("SQL"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a ProjectSourcePlatform instance. */ + private String value; + + ProjectSourcePlatform(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ProjectSourcePlatform instance. + * + * @param value the serialized value to parse. + * @return the parsed ProjectSourcePlatform object, or null if unable to parse. + */ + @JsonCreator + public static ProjectSourcePlatform fromString(String value) { + ProjectSourcePlatform[] items = ProjectSourcePlatform.values(); + for (ProjectSourcePlatform item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTargetPlatform.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTargetPlatform.java new file mode 100644 index 000000000000..e83d0e9d82f2 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTargetPlatform.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ProjectTargetPlatform. + */ +public enum ProjectTargetPlatform { + /** Enum value SQLDB. */ + SQLDB("SQLDB"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a ProjectTargetPlatform instance. */ + private String value; + + ProjectTargetPlatform(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ProjectTargetPlatform instance. + * + * @param value the serialized value to parse. + * @return the parsed ProjectTargetPlatform object, or null if unable to parse. + */ + @JsonCreator + public static ProjectTargetPlatform fromString(String value) { + ProjectTargetPlatform[] items = ProjectTargetPlatform.values(); + for (ProjectTargetPlatform item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTask.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTask.java new file mode 100644 index 000000000000..9311715350ac --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTask.java @@ -0,0 +1,147 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_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.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationManager; + +/** + * Type representing ProjectTask. + */ +public interface ProjectTask 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 ProjectTask definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProject, DefinitionStages.WithCreate { + } + + /** + * Grouping of ProjectTask definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ProjectTask definition. + */ + interface Blank extends WithProject { + } + + /** + * The stage of the projecttask definition allowing to specify Project. + */ + interface WithProject { + /** + * Specifies groupName, serviceName, projectName. + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @return the next definition stage + */ + WithCreate withExistingProject(String groupName, String serviceName, String projectName); + } + + /** + * The stage of the projecttask 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 projecttask 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 ProjectTask update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithEtag, UpdateStages.WithProperties { + } + + /** + * Grouping of ProjectTask update stages. + */ + interface UpdateStages { + /** + * The stage of the projecttask 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 projecttask 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTaskProperties.java new file mode 100644 index 000000000000..0c844548cee8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ProjectTaskProperties.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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") +@JsonTypeName("Unknown") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), + @JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class) +}) +public class ProjectTaskProperties { + /** + * Array of errors. This is ignored if submitted. + */ + @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; + + /** + * The state of the task. This is ignored if submitted. Possible values + * include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + * 'Failed', 'FailedInputValidation', 'Faulted'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private TaskState state; + + /** + * Get array of errors. This is ignored if submitted. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + + /** + * Get the state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted'. + * + * @return the state value + */ + public TaskState state() { + return this.state; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Projects.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Projects.java new file mode 100644 index 000000000000..1252370f5eb5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Projects.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.ProjectsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Projects. + */ +public interface Projects extends SupportsCreating, HasInner { + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String groupName, String serviceName, String projectName); + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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 project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String groupName, String serviceName, String projectName); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QueryAnalysisValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QueryAnalysisValidationResult.java new file mode 100644 index 000000000000..767995f57dce --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QueryAnalysisValidationResult.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results for query analysis comparison between the source and target. + */ +public class QueryAnalysisValidationResult { + /** + * List of queries executed and it's execution results in source and + * target. + */ + @JsonProperty(value = "queryResults") + private QueryExecutionResult queryResults; + + /** + * Errors that are part of the execution. + */ + @JsonProperty(value = "validationErrors") + private ValidationError validationErrors; + + /** + * Get list of queries executed and it's execution results in source and target. + * + * @return the queryResults value + */ + public QueryExecutionResult queryResults() { + return this.queryResults; + } + + /** + * Set list of queries executed and it's execution results in source and target. + * + * @param queryResults the queryResults value to set + * @return the QueryAnalysisValidationResult object itself. + */ + public QueryAnalysisValidationResult withQueryResults(QueryExecutionResult queryResults) { + this.queryResults = queryResults; + return this; + } + + /** + * Get errors that are part of the execution. + * + * @return the validationErrors value + */ + public ValidationError validationErrors() { + return this.validationErrors; + } + + /** + * Set errors that are part of the execution. + * + * @param validationErrors the validationErrors value to set + * @return the QueryAnalysisValidationResult object itself. + */ + public QueryAnalysisValidationResult withValidationErrors(ValidationError validationErrors) { + this.validationErrors = validationErrors; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QueryExecutionResult.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QueryExecutionResult.java new file mode 100644 index 000000000000..d022c4dc08fb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QueryExecutionResult.java @@ -0,0 +1,121 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes query analysis results for execution in source and target. + */ +public class QueryExecutionResult { + /** + * Query text retrieved from the source server. + */ + @JsonProperty(value = "queryText") + private String queryText; + + /** + * Total no. of statements in the batch. + */ + @JsonProperty(value = "statementsInBatch") + private Long statementsInBatch; + + /** + * Query analysis result from the source. + */ + @JsonProperty(value = "sourceResult") + private ExecutionStatistics sourceResult; + + /** + * Query analysis result from the target. + */ + @JsonProperty(value = "targetResult") + private ExecutionStatistics targetResult; + + /** + * Get query text retrieved from the source server. + * + * @return the queryText value + */ + public String queryText() { + return this.queryText; + } + + /** + * Set query text retrieved from the source server. + * + * @param queryText the queryText value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withQueryText(String queryText) { + this.queryText = queryText; + return this; + } + + /** + * Get total no. of statements in the batch. + * + * @return the statementsInBatch value + */ + public Long statementsInBatch() { + return this.statementsInBatch; + } + + /** + * Set total no. of statements in the batch. + * + * @param statementsInBatch the statementsInBatch value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withStatementsInBatch(Long statementsInBatch) { + this.statementsInBatch = statementsInBatch; + return this; + } + + /** + * Get query analysis result from the source. + * + * @return the sourceResult value + */ + public ExecutionStatistics sourceResult() { + return this.sourceResult; + } + + /** + * Set query analysis result from the source. + * + * @param sourceResult the sourceResult value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withSourceResult(ExecutionStatistics sourceResult) { + this.sourceResult = sourceResult; + return this; + } + + /** + * Get query analysis result from the target. + * + * @return the targetResult value + */ + public ExecutionStatistics targetResult() { + return this.targetResult; + } + + /** + * Set query analysis result from the target. + * + * @param targetResult the targetResult value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withTargetResult(ExecutionStatistics targetResult) { + this.targetResult = targetResult; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Quota.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Quota.java new file mode 100644 index 000000000000..e59a86b4e9fd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Quota.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.QuotaInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationManager; + +/** + * Type representing Quota. + */ +public interface Quota extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + Double currentValue(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the limit value. + */ + Double limit(); + + /** + * @return the name value. + */ + QuotaName name(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QuotaName.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QuotaName.java new file mode 100644 index 000000000000..226178015d05 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/QuotaName.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The name of the quota. + */ +public class QuotaName { + /** + * The localized name of the quota. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * The unlocalized name (or ID) of the quota. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the localized name of the quota. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set the localized name of the quota. + * + * @param localizedValue the localizedValue value to set + * @return the QuotaName object itself. + */ + public QuotaName withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + + /** + * Get the unlocalized name (or ID) of the quota. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the unlocalized name (or ID) of the quota. + * + * @param value the value value to set + * @return the QuotaName object itself. + */ + public QuotaName withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ReportableException.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ReportableException.java new file mode 100644 index 000000000000..351e75a27dd5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ReportableException.java @@ -0,0 +1,147 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Exception object for all custom exceptions. + */ +public class ReportableException { + /** + * Error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The path to the file where exception occurred. + */ + @JsonProperty(value = "filePath") + private String filePath; + + /** + * The line number where exception occurred. + */ + @JsonProperty(value = "lineNumber") + private String lineNumber; + + /** + * Coded numerical value that is assigned to a specific exception. + */ + @JsonProperty(value = "hResult") + private Integer hResult; + + /** + * Stack trace. + */ + @JsonProperty(value = "stackTrace") + private String stackTrace; + + /** + * Get error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set error message. + * + * @param message the message value to set + * @return the ReportableException object itself. + */ + public ReportableException withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the path to the file where exception occurred. + * + * @return the filePath value + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the path to the file where exception occurred. + * + * @param filePath the filePath value to set + * @return the ReportableException object itself. + */ + public ReportableException withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get the line number where exception occurred. + * + * @return the lineNumber value + */ + public String lineNumber() { + return this.lineNumber; + } + + /** + * Set the line number where exception occurred. + * + * @param lineNumber the lineNumber value to set + * @return the ReportableException object itself. + */ + public ReportableException withLineNumber(String lineNumber) { + this.lineNumber = lineNumber; + return this; + } + + /** + * Get coded numerical value that is assigned to a specific exception. + * + * @return the hResult value + */ + public Integer hResult() { + return this.hResult; + } + + /** + * Set coded numerical value that is assigned to a specific exception. + * + * @param hResult the hResult value to set + * @return the ReportableException object itself. + */ + public ReportableException withHResult(Integer hResult) { + this.hResult = hResult; + return this; + } + + /** + * Get stack trace. + * + * @return the stackTrace value + */ + public String stackTrace() { + return this.stackTrace; + } + + /** + * Set stack trace. + * + * @param stackTrace the stackTrace value to set + * @return the ReportableException object itself. + */ + public ReportableException withStackTrace(String stackTrace) { + this.stackTrace = stackTrace; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSku.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSku.java new file mode 100644 index 000000000000..d3f74f364cb6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSku.java @@ -0,0 +1,81 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.ResourceSkuInner; +import java.util.List; + +/** + * Type representing ResourceSku. + */ +public interface ResourceSku extends HasInner, HasManager { + /** + * @return the apiVersions value. + */ + List apiVersions(); + + /** + * @return the capabilities value. + */ + List capabilities(); + + /** + * @return the capacity value. + */ + ResourceSkuCapacity capacity(); + + /** + * @return the costs value. + */ + List costs(); + + /** + * @return the family value. + */ + String family(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the locations value. + */ + List locations(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the restrictions value. + */ + List restrictions(); + + /** + * @return the size value. + */ + String size(); + + /** + * @return the tier value. + */ + String tier(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapabilities.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapabilities.java new file mode 100644 index 000000000000..3adf85e70de0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapabilities.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes The SKU capabilites object. + */ +public class ResourceSkuCapabilities { + /** + * An invariant to describe the feature. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * An invariant if the feature is measured by quantity. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** + * Get an invariant to describe the feature. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get an invariant if the feature is measured by quantity. + * + * @return the value value + */ + public String value() { + return this.value; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapacity.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapacity.java new file mode 100644 index 000000000000..c240b071ffe5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapacity.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes scaling information of a SKU. + */ +public class ResourceSkuCapacity { + /** + * The minimum capacity. + */ + @JsonProperty(value = "minimum", access = JsonProperty.Access.WRITE_ONLY) + private Long minimum; + + /** + * The maximum capacity. + */ + @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY) + private Long maximum; + + /** + * The default capacity. + */ + @JsonProperty(value = "default", access = JsonProperty.Access.WRITE_ONLY) + private Long defaultProperty; + + /** + * The scale type applicable to the SKU. Possible values include: + * 'Automatic', 'Manual', 'None'. + */ + @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuCapacityScaleType scaleType; + + /** + * Get the minimum capacity. + * + * @return the minimum value + */ + public Long minimum() { + return this.minimum; + } + + /** + * Get the maximum capacity. + * + * @return the maximum value + */ + public Long maximum() { + return this.maximum; + } + + /** + * Get the default capacity. + * + * @return the defaultProperty value + */ + public Long defaultProperty() { + return this.defaultProperty; + } + + /** + * Get the scale type applicable to the SKU. Possible values include: 'Automatic', 'Manual', 'None'. + * + * @return the scaleType value + */ + public ResourceSkuCapacityScaleType scaleType() { + return this.scaleType; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapacityScaleType.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapacityScaleType.java new file mode 100644 index 000000000000..eb4c6eae092c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCapacityScaleType.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ResourceSkuCapacityScaleType. + */ +public enum ResourceSkuCapacityScaleType { + /** Enum value Automatic. */ + AUTOMATIC("Automatic"), + + /** Enum value Manual. */ + MANUAL("Manual"), + + /** Enum value None. */ + NONE("None"); + + /** The actual serialized value for a ResourceSkuCapacityScaleType instance. */ + private String value; + + ResourceSkuCapacityScaleType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResourceSkuCapacityScaleType instance. + * + * @param value the serialized value to parse. + * @return the parsed ResourceSkuCapacityScaleType object, or null if unable to parse. + */ + @JsonCreator + public static ResourceSkuCapacityScaleType fromString(String value) { + ResourceSkuCapacityScaleType[] items = ResourceSkuCapacityScaleType.values(); + for (ResourceSkuCapacityScaleType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCosts.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCosts.java new file mode 100644 index 000000000000..f3d9da500237 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuCosts.java @@ -0,0 +1,62 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes metadata for retrieving price info. + */ +public class ResourceSkuCosts { + /** + * Used for querying price from commerce. + */ + @JsonProperty(value = "meterID", access = JsonProperty.Access.WRITE_ONLY) + private String meterID; + + /** + * The multiplier is needed to extend the base metered cost. + */ + @JsonProperty(value = "quantity", access = JsonProperty.Access.WRITE_ONLY) + private Long quantity; + + /** + * An invariant to show the extended unit. + */ + @JsonProperty(value = "extendedUnit", access = JsonProperty.Access.WRITE_ONLY) + private String extendedUnit; + + /** + * Get used for querying price from commerce. + * + * @return the meterID value + */ + public String meterID() { + return this.meterID; + } + + /** + * Get the multiplier is needed to extend the base metered cost. + * + * @return the quantity value + */ + public Long quantity() { + return this.quantity; + } + + /** + * Get an invariant to show the extended unit. + * + * @return the extendedUnit value + */ + public String extendedUnit() { + return this.extendedUnit; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictions.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictions.java new file mode 100644 index 000000000000..0106e38e2d44 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictions.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes scaling information of a SKU. + */ +public class ResourceSkuRestrictions { + /** + * The type of restrictions. Possible values include: 'location'. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuRestrictionsType type; + + /** + * The value of restrictions. If the restriction type is set to location. + * This would be different locations where the SKU is restricted. + */ + @JsonProperty(value = "values", access = JsonProperty.Access.WRITE_ONLY) + private List values; + + /** + * The reason code for restriction. Possible values include: 'QuotaId', + * 'NotAvailableForSubscription'. + */ + @JsonProperty(value = "reasonCode", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuRestrictionsReasonCode reasonCode; + + /** + * Get the type of restrictions. Possible values include: 'location'. + * + * @return the type value + */ + public ResourceSkuRestrictionsType type() { + return this.type; + } + + /** + * Get the value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Get the reason code for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. + * + * @return the reasonCode value + */ + public ResourceSkuRestrictionsReasonCode reasonCode() { + return this.reasonCode; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictionsReasonCode.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictionsReasonCode.java new file mode 100644 index 000000000000..63e3528c9f32 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictionsReasonCode.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ResourceSkuRestrictionsReasonCode. + */ +public enum ResourceSkuRestrictionsReasonCode { + /** Enum value QuotaId. */ + QUOTA_ID("QuotaId"), + + /** Enum value NotAvailableForSubscription. */ + NOT_AVAILABLE_FOR_SUBSCRIPTION("NotAvailableForSubscription"); + + /** The actual serialized value for a ResourceSkuRestrictionsReasonCode instance. */ + private String value; + + ResourceSkuRestrictionsReasonCode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResourceSkuRestrictionsReasonCode instance. + * + * @param value the serialized value to parse. + * @return the parsed ResourceSkuRestrictionsReasonCode object, or null if unable to parse. + */ + @JsonCreator + public static ResourceSkuRestrictionsReasonCode fromString(String value) { + ResourceSkuRestrictionsReasonCode[] items = ResourceSkuRestrictionsReasonCode.values(); + for (ResourceSkuRestrictionsReasonCode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictionsType.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictionsType.java new file mode 100644 index 000000000000..69f9c3d13d60 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkuRestrictionsType.java @@ -0,0 +1,50 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ResourceSkuRestrictionsType. + */ +public enum ResourceSkuRestrictionsType { + /** Enum value location. */ + LOCATION("location"); + + /** The actual serialized value for a ResourceSkuRestrictionsType instance. */ + private String value; + + ResourceSkuRestrictionsType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResourceSkuRestrictionsType instance. + * + * @param value the serialized value to parse. + * @return the parsed ResourceSkuRestrictionsType object, or null if unable to parse. + */ + @JsonCreator + public static ResourceSkuRestrictionsType fromString(String value) { + ResourceSkuRestrictionsType[] items = ResourceSkuRestrictionsType.values(); + for (ResourceSkuRestrictionsType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkus.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkus.java new file mode 100644 index 000000000000..05cf544a09d1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ResourceSkus.java @@ -0,0 +1,28 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.ResourceSkusInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ResourceSkus. + */ +public interface ResourceSkus extends HasInner { + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SchemaComparisonValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SchemaComparisonValidationResult.java new file mode 100644 index 000000000000..82d803d9adbe --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SchemaComparisonValidationResult.java @@ -0,0 +1,122 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results for schema comparison between the source and target. + */ +public class SchemaComparisonValidationResult { + /** + * List of schema differences between the source and target databases. + */ + @JsonProperty(value = "schemaDifferences") + private SchemaComparisonValidationResultType schemaDifferences; + + /** + * List of errors that happened while performing schema compare validation. + */ + @JsonProperty(value = "validationErrors") + private ValidationError validationErrors; + + /** + * Count of source database objects. + */ + @JsonProperty(value = "sourceDatabaseObjectCount") + private Map sourceDatabaseObjectCount; + + /** + * Count of target database objects. + */ + @JsonProperty(value = "targetDatabaseObjectCount") + private Map targetDatabaseObjectCount; + + /** + * Get list of schema differences between the source and target databases. + * + * @return the schemaDifferences value + */ + public SchemaComparisonValidationResultType schemaDifferences() { + return this.schemaDifferences; + } + + /** + * Set list of schema differences between the source and target databases. + * + * @param schemaDifferences the schemaDifferences value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withSchemaDifferences(SchemaComparisonValidationResultType schemaDifferences) { + this.schemaDifferences = schemaDifferences; + return this; + } + + /** + * Get list of errors that happened while performing schema compare validation. + * + * @return the validationErrors value + */ + public ValidationError validationErrors() { + return this.validationErrors; + } + + /** + * Set list of errors that happened while performing schema compare validation. + * + * @param validationErrors the validationErrors value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withValidationErrors(ValidationError validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + /** + * Get count of source database objects. + * + * @return the sourceDatabaseObjectCount value + */ + public Map sourceDatabaseObjectCount() { + return this.sourceDatabaseObjectCount; + } + + /** + * Set count of source database objects. + * + * @param sourceDatabaseObjectCount the sourceDatabaseObjectCount value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withSourceDatabaseObjectCount(Map sourceDatabaseObjectCount) { + this.sourceDatabaseObjectCount = sourceDatabaseObjectCount; + return this; + } + + /** + * Get count of target database objects. + * + * @return the targetDatabaseObjectCount value + */ + public Map targetDatabaseObjectCount() { + return this.targetDatabaseObjectCount; + } + + /** + * Set count of target database objects. + * + * @param targetDatabaseObjectCount the targetDatabaseObjectCount value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withTargetDatabaseObjectCount(Map targetDatabaseObjectCount) { + this.targetDatabaseObjectCount = targetDatabaseObjectCount; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SchemaComparisonValidationResultType.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SchemaComparisonValidationResultType.java new file mode 100644 index 000000000000..c48e5bef87c7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SchemaComparisonValidationResultType.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description about the errors happen while performing migration validation. + */ +public class SchemaComparisonValidationResultType { + /** + * Name of the object that has the difference. + */ + @JsonProperty(value = "objectName") + private String objectName; + + /** + * Type of the object that has the difference. e.g + * (Table/View/StoredProcedure). Possible values include: + * 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + */ + @JsonProperty(value = "objectType") + private ObjectType objectType; + + /** + * Update action type with respect to target. Possible values include: + * 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget'. + */ + @JsonProperty(value = "updateAction") + private UpdateActionType updateAction; + + /** + * Get name of the object that has the difference. + * + * @return the objectName value + */ + public String objectName() { + return this.objectName; + } + + /** + * Set name of the object that has the difference. + * + * @param objectName the objectName value to set + * @return the SchemaComparisonValidationResultType object itself. + */ + public SchemaComparisonValidationResultType withObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @return the objectType value + */ + public ObjectType objectType() { + return this.objectType; + } + + /** + * Set type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @param objectType the objectType value to set + * @return the SchemaComparisonValidationResultType object itself. + */ + public SchemaComparisonValidationResultType withObjectType(ObjectType objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget'. + * + * @return the updateAction value + */ + public UpdateActionType updateAction() { + return this.updateAction; + } + + /** + * Set update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget'. + * + * @param updateAction the updateAction value to set + * @return the SchemaComparisonValidationResultType object itself. + */ + public SchemaComparisonValidationResultType withUpdateAction(UpdateActionType updateAction) { + this.updateAction = updateAction; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServerLevelPermissionsGroup.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServerLevelPermissionsGroup.java new file mode 100644 index 000000000000..e8e0f426d2f5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServerLevelPermissionsGroup.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ServerLevelPermissionsGroup. + */ +public enum ServerLevelPermissionsGroup { + /** Enum value Default. */ + DEFAULT("Default"), + + /** Enum value MigrationFromSqlServerToAzureDB. */ + MIGRATION_FROM_SQL_SERVER_TO_AZURE_DB("MigrationFromSqlServerToAzureDB"); + + /** The actual serialized value for a ServerLevelPermissionsGroup instance. */ + private String value; + + ServerLevelPermissionsGroup(String value) { + this.value = value; + } + + /** + * 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 value) { + ServerLevelPermissionsGroup[] items = ServerLevelPermissionsGroup.values(); + for (ServerLevelPermissionsGroup item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceOperation.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceOperation.java new file mode 100644 index 000000000000..df930bb13102 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceOperation.java @@ -0,0 +1,30 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.ServiceOperationInner; + +/** + * Type representing ServiceOperation. + */ +public interface ServiceOperation extends HasInner, HasManager { + /** + * @return the display value. + */ + ServiceOperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceOperationDisplay.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceOperationDisplay.java new file mode 100644 index 000000000000..f62c52eaa599 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceOperationDisplay.java @@ -0,0 +1,121 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Localized display text. + */ +public class ServiceOperationDisplay { + /** + * The localized resource provider name. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The localized resource type name. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * The localized operation name. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The localized operation description. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the localized resource provider name. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the localized resource provider name. + * + * @param provider the provider value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the localized resource type name. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set the localized resource type name. + * + * @param resource the resource value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the localized operation name. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set the localized operation name. + * + * @param operation the operation value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the localized operation description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the localized operation description. + * + * @param description the description value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceProvisioningState.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceProvisioningState.java new file mode 100644 index 000000000000..62335e27472a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceProvisioningState.java @@ -0,0 +1,77 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ServiceProvisioningState. + */ +public enum ServiceProvisioningState { + /** Enum value Accepted. */ + ACCEPTED("Accepted"), + + /** Enum value Deleting. */ + DELETING("Deleting"), + + /** Enum value Deploying. */ + DEPLOYING("Deploying"), + + /** Enum value Stopped. */ + STOPPED("Stopped"), + + /** Enum value Stopping. */ + STOPPING("Stopping"), + + /** Enum value Starting. */ + STARTING("Starting"), + + /** Enum value FailedToStart. */ + FAILED_TO_START("FailedToStart"), + + /** Enum value FailedToStop. */ + FAILED_TO_STOP("FailedToStop"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Failed. */ + FAILED("Failed"); + + /** The actual serialized value for a ServiceProvisioningState instance. */ + private String value; + + ServiceProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ServiceProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed ServiceProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static ServiceProvisioningState fromString(String value) { + ServiceProvisioningState[] items = ServiceProvisioningState.values(); + for (ServiceProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceScalability.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceScalability.java new file mode 100644 index 000000000000..182d62389894 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceScalability.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ServiceScalability. + */ +public enum ServiceScalability { + /** Enum value none. */ + NONE("none"), + + /** Enum value manual. */ + MANUAL("manual"), + + /** Enum value automatic. */ + AUTOMATIC("automatic"); + + /** The actual serialized value for a ServiceScalability instance. */ + private String value; + + ServiceScalability(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ServiceScalability instance. + * + * @param value the serialized value to parse. + * @return the parsed ServiceScalability object, or null if unable to parse. + */ + @JsonCreator + public static ServiceScalability fromString(String value) { + ServiceScalability[] items = ServiceScalability.values(); + for (ServiceScalability item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceSku.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceSku.java new file mode 100644 index 000000000000..14e14b7e7e4e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ServiceSku.java @@ -0,0 +1,150 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An Azure SKU instance. + */ +public class ServiceSku { + /** + * The unique name of the SKU, such as 'P3'. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The tier of the SKU, such as 'Free', 'Basic', 'Standard', or 'Premium'. + */ + @JsonProperty(value = "tier") + private String tier; + + /** + * The SKU family, used when the service has multiple performance classes + * within a tier, such as 'A', 'D', etc. for virtual machines. + */ + @JsonProperty(value = "family") + private String family; + + /** + * The size of the SKU, used when the name alone does not denote a service + * size or when a SKU has multiple performance classes within a family, + * e.g. 'A1' for virtual machines. + */ + @JsonProperty(value = "size") + private String size; + + /** + * The capacity of the SKU, if it supports scaling. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Get the unique name of the SKU, such as 'P3'. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the SKU, such as 'P3'. + * + * @param name the name value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier of the SKU, such as 'Free', 'Basic', 'Standard', or 'Premium'. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier of the SKU, such as 'Free', 'Basic', 'Standard', or 'Premium'. + * + * @param tier the tier value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get the SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set the SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines. + * + * @param family the family value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set the size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines. + * + * @param size the size value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the capacity of the SKU, if it supports scaling. + * + * @return the capacity value + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity of the SKU, if it supports scaling. + * + * @param capacity the capacity value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Services.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Services.java new file mode 100644 index 000000000000..f55e9556ad20 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Services.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.ServicesInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.AvailableServiceSku; + +/** + * Type representing Services. + */ +public interface Services extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Check service health status. + * The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 checkStatusAsync(String groupName, String serviceName); + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + Completable startAsync(String groupName, String serviceName); + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + Completable stopAsync(String groupName, String serviceName); + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters); + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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 listSkusAsync(final String groupName, final String serviceName); + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Severity.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Severity.java new file mode 100644 index 000000000000..9d606031b8cc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Severity.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for Severity. + */ +public enum Severity { + /** Enum value Message. */ + MESSAGE("Message"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Error. */ + ERROR("Error"); + + /** The actual serialized value for a Severity instance. */ + private String value; + + Severity(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a Severity instance. + * + * @param value the serialized value to parse. + * @return the parsed Severity object, or null if unable to parse. + */ + @JsonCreator + public static Severity fromString(String value) { + Severity[] items = Severity.values(); + for (Severity item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SqlConnectionInfo.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SqlConnectionInfo.java new file mode 100644 index 000000000000..5b7e55e8ed6a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SqlConnectionInfo.java @@ -0,0 +1,154 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Information for connecting to SQL database server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("SqlConnectionInfo") +public class SqlConnectionInfo extends ConnectionInfo { + /** + * Data source in the format + * Protocol:MachineName\SQLServerInstanceName,PortNumber. + */ + @JsonProperty(value = "dataSource", required = true) + private String dataSource; + + /** + * Authentication type to use for connection. Possible values include: + * 'None', 'WindowsAuthentication', 'SqlAuthentication', + * 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. + */ + @JsonProperty(value = "authentication") + private AuthenticationType authentication; + + /** + * Whether to encrypt the connection. + */ + @JsonProperty(value = "encryptConnection") + private Boolean encryptConnection; + + /** + * Additional connection settings. + */ + @JsonProperty(value = "additionalSettings") + private String additionalSettings; + + /** + * Whether to trust the server certificate. + */ + @JsonProperty(value = "trustServerCertificate") + private Boolean trustServerCertificate; + + /** + * Get data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber. + * + * @return the dataSource value + */ + public String dataSource() { + return this.dataSource; + } + + /** + * Set data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber. + * + * @param dataSource the dataSource value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withDataSource(String dataSource) { + this.dataSource = dataSource; + return this; + } + + /** + * Get authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SqlAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. + * + * @return the authentication value + */ + public AuthenticationType authentication() { + return this.authentication; + } + + /** + * Set authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SqlAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. + * + * @param authentication the authentication value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withAuthentication(AuthenticationType authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get whether to encrypt the connection. + * + * @return the encryptConnection value + */ + public Boolean encryptConnection() { + return this.encryptConnection; + } + + /** + * Set whether to encrypt the connection. + * + * @param encryptConnection the encryptConnection value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withEncryptConnection(Boolean encryptConnection) { + this.encryptConnection = encryptConnection; + return this; + } + + /** + * Get additional connection settings. + * + * @return the additionalSettings value + */ + public String additionalSettings() { + return this.additionalSettings; + } + + /** + * Set additional connection settings. + * + * @param additionalSettings the additionalSettings value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withAdditionalSettings(String additionalSettings) { + this.additionalSettings = additionalSettings; + return this; + } + + /** + * Get whether to trust the server certificate. + * + * @return the trustServerCertificate value + */ + public Boolean trustServerCertificate() { + return this.trustServerCertificate; + } + + /** + * Set whether to trust the server certificate. + * + * @param trustServerCertificate the trustServerCertificate value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withTrustServerCertificate(Boolean trustServerCertificate) { + this.trustServerCertificate = trustServerCertificate; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SqlMigrationTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SqlMigrationTaskInput.java new file mode 100644 index 000000000000..6c1742b095f3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/SqlMigrationTaskInput.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class for migration task input. + */ +public class SqlMigrationTaskInput { + /** + * Information for connecting to source. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Information for connecting to target. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Get information for connecting to source. + * + * @return the sourceConnectionInfo value + */ + public SqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set information for connecting to source. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the SqlMigrationTaskInput object itself. + */ + public SqlMigrationTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get information for connecting to target. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set information for connecting to target. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the SqlMigrationTaskInput object itself. + */ + public SqlMigrationTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/TaskState.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/TaskState.java new file mode 100644 index 000000000000..17b452a2b346 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/TaskState.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for TaskState. + */ +public enum TaskState { + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value Queued. */ + QUEUED("Queued"), + + /** Enum value Running. */ + RUNNING("Running"), + + /** Enum value Canceled. */ + CANCELED("Canceled"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value FailedInputValidation. */ + FAILED_INPUT_VALIDATION("FailedInputValidation"), + + /** Enum value Faulted. */ + FAULTED("Faulted"); + + /** The actual serialized value for a TaskState instance. */ + private String value; + + TaskState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a TaskState instance. + * + * @param value the serialized value to parse. + * @return the parsed TaskState object, or null if unable to parse. + */ + @JsonCreator + public static TaskState fromString(String value) { + TaskState[] items = TaskState.values(); + for (TaskState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Tasks.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Tasks.java new file mode 100644 index 000000000000..30d6f9399eb7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Tasks.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.TasksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Tasks. + */ +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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable cancelAsync(String groupName, String serviceName, String projectName, String taskName); + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String groupName, String serviceName, String projectName, String taskName); + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String groupName, final String serviceName, final String projectName); + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String groupName, String serviceName, String projectName, String taskName); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/UpdateActionType.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/UpdateActionType.java new file mode 100644 index 000000000000..b4b55f36f819 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/UpdateActionType.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UpdateActionType. + */ +public enum UpdateActionType { + /** Enum value DeletedOnTarget. */ + DELETED_ON_TARGET("DeletedOnTarget"), + + /** Enum value ChangedOnTarget. */ + CHANGED_ON_TARGET("ChangedOnTarget"), + + /** Enum value AddedOnTarget. */ + ADDED_ON_TARGET("AddedOnTarget"); + + /** The actual serialized value for a UpdateActionType instance. */ + private String value; + + UpdateActionType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UpdateActionType instance. + * + * @param value the serialized value to parse. + * @return the parsed UpdateActionType object, or null if unable to parse. + */ + @JsonCreator + public static UpdateActionType fromString(String value) { + UpdateActionType[] items = UpdateActionType.values(); + for (UpdateActionType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Usages.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Usages.java new file mode 100644 index 000000000000..b2dbcac06d48 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/Usages.java @@ -0,0 +1,29 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview; + +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation.UsagesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Usages. + */ +public interface Usages extends HasInner { + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ValidationError.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ValidationError.java new file mode 100644 index 000000000000..c8c671776936 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ValidationError.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description about the errors happen while performing migration validation. + */ +public class ValidationError { + /** + * Error Text. + */ + @JsonProperty(value = "text") + private String text; + + /** + * Severity of the error. Possible values include: 'Message', 'Warning', + * 'Error'. + */ + @JsonProperty(value = "severity") + private Severity severity; + + /** + * Get error Text. + * + * @return the text value + */ + public String text() { + return this.text; + } + + /** + * Set error Text. + * + * @param text the text value to set + * @return the ValidationError object itself. + */ + public ValidationError withText(String text) { + this.text = text; + return this; + } + + /** + * Get severity of the error. Possible values include: 'Message', 'Warning', 'Error'. + * + * @return the severity value + */ + public Severity severity() { + return this.severity; + } + + /** + * Set severity of the error. Possible values include: 'Message', 'Warning', 'Error'. + * + * @param severity the severity value to set + * @return the ValidationError object itself. + */ + public ValidationError withSeverity(Severity severity) { + this.severity = severity; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ValidationStatus.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ValidationStatus.java new file mode 100644 index 000000000000..141c675fae4e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/ValidationStatus.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ValidationStatus. + */ +public enum ValidationStatus { + /** Enum value Default. */ + DEFAULT("Default"), + + /** Enum value NotStarted. */ + NOT_STARTED("NotStarted"), + + /** Enum value Initialized. */ + INITIALIZED("Initialized"), + + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Completed. */ + COMPLETED("Completed"), + + /** Enum value CompletedWithIssues. */ + COMPLETED_WITH_ISSUES("CompletedWithIssues"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Stopped. */ + STOPPED("Stopped"); + + /** The actual serialized value for a ValidationStatus instance. */ + private String value; + + ValidationStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ValidationStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed ValidationStatus object, or null if unable to parse. + */ + @JsonCreator + public static ValidationStatus fromString(String value) { + ValidationStatus[] items = ValidationStatus.values(); + for (ValidationStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/WaitStatistics.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/WaitStatistics.java new file mode 100644 index 000000000000..f717015e3b75 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/WaitStatistics.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.azuredatabasemigrationservice.v2017_11_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Wait statistics gathered during query batch execution. + */ +public class WaitStatistics { + /** + * Type of the Wait. + */ + @JsonProperty(value = "waitType") + private String waitType; + + /** + * Total wait time in millisecond(s). + */ + @JsonProperty(value = "waitTimeMs") + private Double waitTimeMs; + + /** + * Total no. of waits. + */ + @JsonProperty(value = "waitCount") + private Long waitCount; + + /** + * Get type of the Wait. + * + * @return the waitType value + */ + public String waitType() { + return this.waitType; + } + + /** + * Set type of the Wait. + * + * @param waitType the waitType value to set + * @return the WaitStatistics object itself. + */ + public WaitStatistics withWaitType(String waitType) { + this.waitType = waitType; + return this; + } + + /** + * Get total wait time in millisecond(s). + * + * @return the waitTimeMs value + */ + public Double waitTimeMs() { + return this.waitTimeMs; + } + + /** + * Set total wait time in millisecond(s). + * + * @param waitTimeMs the waitTimeMs value to set + * @return the WaitStatistics object itself. + */ + public WaitStatistics withWaitTimeMs(Double waitTimeMs) { + this.waitTimeMs = waitTimeMs; + return this; + } + + /** + * Get total no. of waits. + * + * @return the waitCount value + */ + public Long waitCount() { + return this.waitCount; + } + + /** + * Set total no. of waits. + * + * @param waitCount the waitCount value to set + * @return the WaitStatistics object itself. + */ + public WaitStatistics withWaitCount(Long waitCount) { + this.waitCount = waitCount; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/AvailableServiceSkuImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/AvailableServiceSkuImpl.java new file mode 100644 index 000000000000..aa3786039742 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/AvailableServiceSkuImpl.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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.AvailableServiceSku; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.AvailableServiceSkuCapacity; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.AvailableServiceSkuSku; + +class AvailableServiceSkuImpl extends WrapperImpl implements AvailableServiceSku { + private final DataMigrationManager manager; + + AvailableServiceSkuImpl(AvailableServiceSkuInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + + + @Override + public AvailableServiceSkuCapacity capacity() { + return this.inner().capacity(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public AvailableServiceSkuSku sku() { + return this.inner().sku(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/AvailableServiceSkuInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/AvailableServiceSkuInner.java new file mode 100644 index 000000000000..4bce2c0cd08f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/AvailableServiceSkuInner.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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.AvailableServiceSkuSku; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.AvailableServiceSkuCapacity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the available service SKU. + */ +public class AvailableServiceSkuInner { + /** + * The resource type, including the provider namespace. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /** + * SKU name, tier, etc. + */ + @JsonProperty(value = "sku") + private AvailableServiceSkuSku sku; + + /** + * A description of the scaling capacities of the SKU. + */ + @JsonProperty(value = "capacity") + private AvailableServiceSkuCapacity capacity; + + /** + * Get the resource type, including the provider namespace. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resource type, including the provider namespace. + * + * @param resourceType the resourceType value to set + * @return the AvailableServiceSkuInner object itself. + */ + public AvailableServiceSkuInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get sKU name, tier, etc. + * + * @return the sku value + */ + public AvailableServiceSkuSku sku() { + return this.sku; + } + + /** + * Set sKU name, tier, etc. + * + * @param sku the sku value to set + * @return the AvailableServiceSkuInner object itself. + */ + public AvailableServiceSkuInner withSku(AvailableServiceSkuSku sku) { + this.sku = sku; + return this; + } + + /** + * Get a description of the scaling capacities of the SKU. + * + * @return the capacity value + */ + public AvailableServiceSkuCapacity capacity() { + return this.capacity; + } + + /** + * Set a description of the scaling capacities of the SKU. + * + * @param capacity the capacity value to set + * @return the AvailableServiceSkuInner object itself. + */ + public AvailableServiceSkuInner withCapacity(AvailableServiceSkuCapacity capacity) { + this.capacity = capacity; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationManager.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationManager.java new file mode 100644 index 000000000000..58ed4a844aa7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationManager.java @@ -0,0 +1,159 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkus; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Services; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Tasks; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Projects; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Usages; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Operations; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure DataMigration resource management. + */ +public final class DataMigrationManager extends ManagerCore { + private ResourceSkus resourceSkus; + private Services services; + private Tasks tasks; + private Projects projects; + private Usages usages; + private Operations operations; + /** + * Get a Configurable instance that can be used to create DataMigrationManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new DataMigrationManager.ConfigurableImpl(); + } + /** + * Creates an instance of DataMigrationManager that exposes DataMigration resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the DataMigrationManager + */ + public static DataMigrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new DataMigrationManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of DataMigrationManager that exposes DataMigration resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the DataMigrationManager + */ + public static DataMigrationManager authenticate(RestClient restClient, String subscriptionId) { + return new DataMigrationManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of DataMigrationManager that exposes DataMigration management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing DataMigration management API entry points that work across subscriptions + */ + DataMigrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage ResourceSkus. + */ + public ResourceSkus resourceSkus() { + if (this.resourceSkus == null) { + this.resourceSkus = new ResourceSkusImpl(this); + } + return this.resourceSkus; + } + + /** + * @return Entry point to manage Services. + */ + public Services services() { + if (this.services == null) { + this.services = new ServicesImpl(this); + } + return this.services; + } + + /** + * @return Entry point to manage Tasks. + */ + public Tasks tasks() { + if (this.tasks == null) { + this.tasks = new TasksImpl(this); + } + return this.tasks; + } + + /** + * @return Entry point to manage Projects. + */ + public Projects projects() { + if (this.projects == null) { + this.projects = new ProjectsImpl(this); + } + return this.projects; + } + + /** + * @return Entry point to manage Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(this); + } + return this.usages; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public DataMigrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return DataMigrationManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private DataMigrationManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new DataMigrationServiceClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceClientImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceClientImpl.java new file mode 100644 index 000000000000..59c73179890a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceClientImpl.java @@ -0,0 +1,266 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the DataMigrationServiceClientImpl class. + */ +public class DataMigrationServiceClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Version of the API. */ + private String apiVersion; + + /** + * Gets Version of the API. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** Identifier of the subscription. */ + private String subscriptionId; + + /** + * Gets Identifier of the subscription. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Identifier of the subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The ResourceSkusInner object to access its operations. + */ + private ResourceSkusInner resourceSkus; + + /** + * Gets the ResourceSkusInner object to access its operations. + * @return the ResourceSkusInner object. + */ + public ResourceSkusInner resourceSkus() { + return this.resourceSkus; + } + + /** + * The ServicesInner object to access its operations. + */ + private ServicesInner services; + + /** + * Gets the ServicesInner object to access its operations. + * @return the ServicesInner object. + */ + public ServicesInner services() { + return this.services; + } + + /** + * The TasksInner object to access its operations. + */ + private TasksInner tasks; + + /** + * Gets the TasksInner object to access its operations. + * @return the TasksInner object. + */ + public TasksInner tasks() { + return this.tasks; + } + + /** + * The ProjectsInner object to access its operations. + */ + private ProjectsInner projects; + + /** + * Gets the ProjectsInner object to access its operations. + * @return the ProjectsInner object. + */ + public ProjectsInner projects() { + return this.projects; + } + + /** + * The UsagesInner object to access its operations. + */ + private UsagesInner usages; + + /** + * Gets the UsagesInner object to access its operations. + * @return the UsagesInner object. + */ + public UsagesInner usages() { + return this.usages; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * Initializes an instance of DataMigrationServiceClient client. + * + * @param credentials the management credentials for Azure + */ + public DataMigrationServiceClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of DataMigrationServiceClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public DataMigrationServiceClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of DataMigrationServiceClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public DataMigrationServiceClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2017-11-15-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.resourceSkus = new ResourceSkusInner(restClient().retrofit(), this); + this.services = new ServicesInner(restClient().retrofit(), this); + this.tasks = new TasksInner(restClient().retrofit(), this); + this.projects = new ProjectsInner(restClient().retrofit(), this); + this.usages = new UsagesInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "DataMigrationServiceClient", "2017-11-15-preview"); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceImpl.java new file mode 100644 index 000000000000..abd25917156b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceImpl.java @@ -0,0 +1,108 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.DataMigrationService; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ServiceProvisioningState; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ServiceSku; + +class DataMigrationServiceImpl extends GroupableResourceCoreImpl implements DataMigrationService, DataMigrationService.Definition, DataMigrationService.Update { + DataMigrationServiceImpl(String name, DataMigrationServiceInner inner, DataMigrationManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ServicesInner client = this.manager().inner().services(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ServicesInner client = this.manager().inner().services(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ServicesInner client = this.manager().inner().services(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public ServiceProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String publicKey() { + return this.inner().publicKey(); + } + + @Override + public ServiceSku sku() { + return this.inner().sku(); + } + + @Override + public String virtualSubnetId() { + return this.inner().virtualSubnetId(); + } + + @Override + public DataMigrationServiceImpl withVirtualSubnetId(String virtualSubnetId) { + this.inner().withVirtualSubnetId(virtualSubnetId); + return this; + } + + @Override + public DataMigrationServiceImpl withEtag(String etag) { + this.inner().withEtag(etag); + return this; + } + + @Override + public DataMigrationServiceImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public DataMigrationServiceImpl withPublicKey(String publicKey) { + this.inner().withPublicKey(publicKey); + return this; + } + + @Override + public DataMigrationServiceImpl withSku(ServiceSku sku) { + this.inner().withSku(sku); + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceInner.java new file mode 100644 index 000000000000..dfd19788f8c9 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceInner.java @@ -0,0 +1,171 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ServiceProvisioningState; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ServiceSku; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * A Data Migration Service resource. + */ +@JsonFlatten +public class DataMigrationServiceInner extends Resource { + /** + * HTTP strong entity tag value. Ignored if submitted. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * The resource kind. Only 'vm' (the default) is supported. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * The resource's provisioning state. Possible values include: 'Accepted', + * 'Deleting', 'Deploying', 'Stopped', 'Stopping', 'Starting', + * 'FailedToStart', 'FailedToStop', 'Succeeded', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ServiceProvisioningState provisioningState; + + /** + * The public key of the service, used to encrypt secrets sent to the + * service. + */ + @JsonProperty(value = "properties.publicKey") + private String publicKey; + + /** + * The ID of the Microsoft.Network/virtualNetworks/subnets resource to + * which the service should be joined. + */ + @JsonProperty(value = "properties.virtualSubnetId", required = true) + private String virtualSubnetId; + + /** + * Service SKU. + */ + @JsonProperty(value = "sku") + private ServiceSku sku; + + /** + * Get hTTP strong entity tag value. Ignored if submitted. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set hTTP strong entity tag value. Ignored if submitted. + * + * @param etag the etag value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the resource kind. Only 'vm' (the default) is supported. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set the resource kind. Only 'vm' (the default) is supported. + * + * @param kind the kind value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the resource's provisioning state. Possible values include: 'Accepted', 'Deleting', 'Deploying', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop', 'Succeeded', 'Failed'. + * + * @return the provisioningState value + */ + public ServiceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the public key of the service, used to encrypt secrets sent to the service. + * + * @return the publicKey value + */ + public String publicKey() { + return this.publicKey; + } + + /** + * Set the public key of the service, used to encrypt secrets sent to the service. + * + * @param publicKey the publicKey value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withPublicKey(String publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * Get the ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined. + * + * @return the virtualSubnetId value + */ + public String virtualSubnetId() { + return this.virtualSubnetId; + } + + /** + * Set the ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined. + * + * @param virtualSubnetId the virtualSubnetId value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withVirtualSubnetId(String virtualSubnetId) { + this.virtualSubnetId = virtualSubnetId; + return this; + } + + /** + * Get service SKU. + * + * @return the sku value + */ + public ServiceSku sku() { + return this.sku; + } + + /** + * Set service SKU. + * + * @param sku the sku value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withSku(ServiceSku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceStatusResponseImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceStatusResponseImpl.java new file mode 100644 index 000000000000..26f30009f291 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceStatusResponseImpl.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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.DataMigrationServiceStatusResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class DataMigrationServiceStatusResponseImpl extends WrapperImpl implements DataMigrationServiceStatusResponse { + private final DataMigrationManager manager; + DataMigrationServiceStatusResponseImpl(DataMigrationServiceStatusResponseInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public String agentVersion() { + return this.inner().agentVersion(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public List supportedTaskTypes() { + return this.inner().supportedTaskTypes(); + } + + @Override + public String vmSize() { + return this.inner().vmSize(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceStatusResponseInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceStatusResponseInner.java new file mode 100644 index 000000000000..a6bc33e1d602 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/DataMigrationServiceStatusResponseInner.java @@ -0,0 +1,124 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Service health status. + */ +public class DataMigrationServiceStatusResponseInner { + /** + * The DMS instance agent version. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * The machine-readable status, such as 'Initializing', 'Offline', + * 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', + * 'FailedToStart', 'FailedToStop' or 'Failed'. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The services virtual machine size, such as 'Standard_D2_v2'. + */ + @JsonProperty(value = "vmSize") + private String vmSize; + + /** + * The list of supported task types. + */ + @JsonProperty(value = "supportedTaskTypes") + private List supportedTaskTypes; + + /** + * Get the DMS instance agent version. + * + * @return the agentVersion value + */ + public String agentVersion() { + return this.agentVersion; + } + + /** + * Set the DMS instance agent version. + * + * @param agentVersion the agentVersion value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get the machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed'. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed'. + * + * @param status the status value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the services virtual machine size, such as 'Standard_D2_v2'. + * + * @return the vmSize value + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set the services virtual machine size, such as 'Standard_D2_v2'. + * + * @param vmSize the vmSize value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withVmSize(String vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the list of supported task types. + * + * @return the supportedTaskTypes value + */ + public List supportedTaskTypes() { + return this.supportedTaskTypes; + } + + /** + * Set the list of supported task types. + * + * @param supportedTaskTypes the supportedTaskTypes value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withSupportedTaskTypes(List supportedTaskTypes) { + this.supportedTaskTypes = supportedTaskTypes; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/IdParsingUtils.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..ecb85cfc8638 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/NameAvailabilityResponseImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/NameAvailabilityResponseImpl.java new file mode 100644 index 000000000000..88c5af985ee9 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/NameAvailabilityResponseImpl.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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.NameAvailabilityResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.NameCheckFailureReason; + +class NameAvailabilityResponseImpl extends WrapperImpl implements NameAvailabilityResponse { + private final DataMigrationManager manager; + NameAvailabilityResponseImpl(NameAvailabilityResponseInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public NameCheckFailureReason reason() { + return this.inner().reason(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/NameAvailabilityResponseInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/NameAvailabilityResponseInner.java new file mode 100644 index 000000000000..003376ae10b4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/NameAvailabilityResponseInner.java @@ -0,0 +1,99 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.NameCheckFailureReason; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Indicates whether a proposed resource name is available. + */ +public class NameAvailabilityResponseInner { + /** + * If true, the name is valid and available. If false, 'reason' describes + * why not. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /** + * The reason why the name is not available, if nameAvailable is false. + * Possible values include: 'AlreadyExists', 'Invalid'. + */ + @JsonProperty(value = "reason") + private NameCheckFailureReason reason; + + /** + * The localized reason why the name is not available, if nameAvailable is + * false. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get if true, the name is valid and available. If false, 'reason' describes why not. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set if true, the name is valid and available. If false, 'reason' describes why not. + * + * @param nameAvailable the nameAvailable value to set + * @return the NameAvailabilityResponseInner object itself. + */ + public NameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid'. + * + * @return the reason value + */ + public NameCheckFailureReason reason() { + return this.reason; + } + + /** + * Set the reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid'. + * + * @param reason the reason value to set + * @return the NameAvailabilityResponseInner object itself. + */ + public NameAvailabilityResponseInner withReason(NameCheckFailureReason reason) { + this.reason = reason; + return this; + } + + /** + * Get the localized reason why the name is not available, if nameAvailable is false. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the localized reason why the name is not available, if nameAvailable is false. + * + * @param message the message value to set + * @return the NameAvailabilityResponseInner object itself. + */ + public NameAvailabilityResponseInner withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/OperationsImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/OperationsImpl.java new file mode 100644 index 000000000000..c043c22e9c36 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/OperationsImpl.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. + * abc + */ + +package com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ServiceOperation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final DataMigrationManager manager; + + OperationsImpl(DataMigrationManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceOperation call(ServiceOperationInner inner) { + return new ServiceOperationImpl(inner, manager()); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/OperationsInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/OperationsInner.java new file mode 100644 index 000000000000..c92b09b51d0e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/OperationsInner.java @@ -0,0 +1,293 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_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.azuredatabasemigrationservice.v2017_11_15_preview.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +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 Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Operations list" }) + @GET("providers/Microsoft.DataMigration/operations") + Observable> list(@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.azuredatabasemigrationservice.v2017_11_15_preview.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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<ServiceOperationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceOperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceOperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceOperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), 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); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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<ServiceOperationInner> 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 available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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 available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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<ServiceOperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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<ServiceOperationInner> 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 available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceOperationInner> 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/PageImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/PageImpl.java new file mode 100644 index 000000000000..a5855615641b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectImpl.java new file mode 100644 index 000000000000..29a4a92bce15 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectImpl.java @@ -0,0 +1,189 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Project; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.Map; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ProjectSourcePlatform; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ProjectTargetPlatform; +import org.joda.time.DateTime; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ConnectionInfo; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.DatabaseInfo; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ProjectProvisioningState; + +class ProjectImpl extends CreatableUpdatableImpl implements Project, Project.Definition, Project.Update { + private final DataMigrationManager manager; + private String groupName; + private String serviceName; + private String projectName; + + ProjectImpl(String name, DataMigrationManager manager) { + super(name, new ProjectInner()); + this.manager = manager; + // Set resource name + this.projectName = name; + // + } + + ProjectImpl(ProjectInner inner, DataMigrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.projectName = inner.name(); + // set resource ancestor and positional variables + this.groupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "services"); + this.projectName = IdParsingUtils.getValueFromIdByName(inner.id(), "projects"); + // + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ProjectsInner client = this.manager().inner().projects(); + return client.createOrUpdateAsync(this.groupName, this.serviceName, this.projectName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ProjectsInner client = this.manager().inner().projects(); + return client.updateAsync(this.groupName, this.serviceName, this.projectName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ProjectsInner client = this.manager().inner().projects(); + return client.getAsync(this.groupName, this.serviceName, this.projectName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public DateTime creationTime() { + return this.inner().creationTime(); + } + + @Override + public List databasesInfo() { + return this.inner().databasesInfo(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProjectProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public ConnectionInfo sourceConnectionInfo() { + return this.inner().sourceConnectionInfo(); + } + + @Override + public ProjectSourcePlatform sourcePlatform() { + return this.inner().sourcePlatform(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public ConnectionInfo targetConnectionInfo() { + return this.inner().targetConnectionInfo(); + } + + @Override + public ProjectTargetPlatform targetPlatform() { + return this.inner().targetPlatform(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ProjectImpl withExistingService(String groupName, String serviceName) { + this.groupName = groupName; + this.serviceName = serviceName; + return this; + } + + @Override + public ProjectImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public ProjectImpl withSourcePlatform(ProjectSourcePlatform sourcePlatform) { + this.inner().withSourcePlatform(sourcePlatform); + return this; + } + + @Override + public ProjectImpl withTargetPlatform(ProjectTargetPlatform targetPlatform) { + this.inner().withTargetPlatform(targetPlatform); + return this; + } + + @Override + public ProjectImpl withDatabasesInfo(List databasesInfo) { + this.inner().withDatabasesInfo(databasesInfo); + return this; + } + + @Override + public ProjectImpl withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo) { + this.inner().withSourceConnectionInfo(sourceConnectionInfo); + return this; + } + + @Override + public ProjectImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + + @Override + public ProjectImpl withTargetConnectionInfo(ConnectionInfo targetConnectionInfo) { + this.inner().withTargetConnectionInfo(targetConnectionInfo); + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectInner.java new file mode 100644 index 000000000000..f5cca7436b03 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectInner.java @@ -0,0 +1,190 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ProjectSourcePlatform; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ProjectTargetPlatform; +import org.joda.time.DateTime; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ConnectionInfo; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.DatabaseInfo; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ProjectProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * A project resource. + */ +@JsonFlatten +public class ProjectInner extends Resource { + /** + * Source platform for the project. Possible values include: 'SQL', + * 'Unknown'. + */ + @JsonProperty(value = "properties.sourcePlatform", required = true) + private ProjectSourcePlatform sourcePlatform; + + /** + * Target platform for the project. Possible values include: 'SQLDB', + * 'Unknown'. + */ + @JsonProperty(value = "properties.targetPlatform", required = true) + private ProjectTargetPlatform targetPlatform; + + /** + * UTC Date and time when project was created. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * Information for connecting to source. + */ + @JsonProperty(value = "properties.sourceConnectionInfo") + private ConnectionInfo sourceConnectionInfo; + + /** + * Information for connecting to target. + */ + @JsonProperty(value = "properties.targetConnectionInfo") + private ConnectionInfo targetConnectionInfo; + + /** + * List of DatabaseInfo. + */ + @JsonProperty(value = "properties.databasesInfo") + private List databasesInfo; + + /** + * The project's provisioning state. Possible values include: 'Deleting', + * 'Succeeded'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProjectProvisioningState provisioningState; + + /** + * Get source platform for the project. Possible values include: 'SQL', 'Unknown'. + * + * @return the sourcePlatform value + */ + public ProjectSourcePlatform sourcePlatform() { + return this.sourcePlatform; + } + + /** + * Set source platform for the project. Possible values include: 'SQL', 'Unknown'. + * + * @param sourcePlatform the sourcePlatform value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withSourcePlatform(ProjectSourcePlatform sourcePlatform) { + this.sourcePlatform = sourcePlatform; + return this; + } + + /** + * Get target platform for the project. Possible values include: 'SQLDB', 'Unknown'. + * + * @return the targetPlatform value + */ + public ProjectTargetPlatform targetPlatform() { + return this.targetPlatform; + } + + /** + * Set target platform for the project. Possible values include: 'SQLDB', 'Unknown'. + * + * @param targetPlatform the targetPlatform value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withTargetPlatform(ProjectTargetPlatform targetPlatform) { + this.targetPlatform = targetPlatform; + return this; + } + + /** + * Get uTC Date and time when project was created. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get information for connecting to source. + * + * @return the sourceConnectionInfo value + */ + public ConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set information for connecting to source. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get information for connecting to target. + * + * @return the targetConnectionInfo value + */ + public ConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set information for connecting to target. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withTargetConnectionInfo(ConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * Get list of DatabaseInfo. + * + * @return the databasesInfo value + */ + public List databasesInfo() { + return this.databasesInfo; + } + + /** + * Set list of DatabaseInfo. + * + * @param databasesInfo the databasesInfo value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withDatabasesInfo(List databasesInfo) { + this.databasesInfo = databasesInfo; + return this; + } + + /** + * Get the project's provisioning state. Possible values include: 'Deleting', 'Succeeded'. + * + * @return the provisioningState value + */ + public ProjectProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectTaskImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectTaskImpl.java new file mode 100644 index 000000000000..25a8d164da3e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectTaskImpl.java @@ -0,0 +1,120 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ProjectTask; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ProjectTaskProperties; + +class ProjectTaskImpl extends CreatableUpdatableImpl implements ProjectTask, ProjectTask.Definition, ProjectTask.Update { + private final DataMigrationManager manager; + private String groupName; + private String serviceName; + private String projectName; + private String taskName; + + ProjectTaskImpl(String name, DataMigrationManager manager) { + super(name, new ProjectTaskInner()); + this.manager = manager; + // Set resource name + this.taskName = name; + // + } + + ProjectTaskImpl(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.projectName = IdParsingUtils.getValueFromIdByName(inner.id(), "projects"); + this.taskName = IdParsingUtils.getValueFromIdByName(inner.id(), "tasks"); + // + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + 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() { + TasksInner client = this.manager().inner().tasks(); + return client.updateAsync(this.groupName, this.serviceName, this.projectName, this.taskName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + TasksInner client = this.manager().inner().tasks(); + return client.getAsync(this.groupName, this.serviceName, this.projectName, 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 ProjectTaskImpl withExistingProject(String groupName, String serviceName, String projectName) { + this.groupName = groupName; + this.serviceName = serviceName; + this.projectName = projectName; + return this; + } + + @Override + public ProjectTaskImpl withEtag(String etag) { + this.inner().withEtag(etag); + return this; + } + + @Override + public ProjectTaskImpl withProperties(ProjectTaskProperties properties) { + this.inner().withProperties(properties); + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectTaskInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectTaskInner.java new file mode 100644 index 000000000000..ab099fa4f3db --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectTaskInner.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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ProjectTaskProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * A task resource. + */ +public class ProjectTaskInner extends ProxyResource { + /** + * HTTP strong entity tag value. This is ignored if submitted. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * Custom task properties. + */ + @JsonProperty(value = "properties") + private ProjectTaskProperties properties; + + /** + * Get hTTP strong entity tag value. This is ignored if submitted. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set hTTP strong entity tag value. This is ignored if submitted. + * + * @param etag the etag value to set + * @return the ProjectTaskInner object itself. + */ + public ProjectTaskInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get custom task properties. + * + * @return the properties value + */ + public ProjectTaskProperties properties() { + return this.properties; + } + + /** + * Set custom task properties. + * + * @param properties the properties value to set + * @return the ProjectTaskInner object itself. + */ + public ProjectTaskInner withProperties(ProjectTaskProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectsImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectsImpl.java new file mode 100644 index 000000000000..b04cf2514dbc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectsImpl.java @@ -0,0 +1,81 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Projects; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Project; + +class ProjectsImpl extends WrapperImpl implements Projects { + private final DataMigrationManager manager; + + ProjectsImpl(DataMigrationManager manager) { + super(manager.inner().projects()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ProjectImpl define(String name) { + return wrapModel(name); + } + + private ProjectImpl wrapModel(ProjectInner inner) { + return new ProjectImpl(inner, manager()); + } + + private ProjectImpl wrapModel(String name) { + return new ProjectImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String groupName, final String serviceName) { + ProjectsInner 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 Project call(ProjectInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String groupName, String serviceName, String projectName) { + ProjectsInner client = this.inner(); + return client.getAsync(groupName, serviceName, projectName) + .map(new Func1() { + @Override + public Project call(ProjectInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String groupName, String serviceName, String projectName) { + ProjectsInner client = this.inner(); + return client.deleteAsync(groupName, serviceName, projectName).toCompletable(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectsInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectsInner.java new file mode 100644 index 000000000000..cf8c188e1e3b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ProjectsInner.java @@ -0,0 +1,834 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_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.azuredatabasemigrationservice.v2017_11_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.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 Projects. + */ +public class ProjectsInner { + /** The Retrofit service to perform REST calls. */ + private ProjectsService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of ProjectsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ProjectsInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(ProjectsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Projects to be + * used by Retrofit to perform actually REST calls. + */ + interface ProjectsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Projects list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Projects createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Body ProjectInner 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.azuredatabasemigrationservice.v2017_11_15_preview.Projects get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Projects delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Projects update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Body ProjectInner 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.azuredatabasemigrationservice.v2017_11_15_preview.Projects listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + ServiceResponse> * @param groupName Name of the resource group + ServiceResponse> * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProjectInner> 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."); + } + return service.list(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), 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 project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 ProjectInner object if successful. + */ + public ProjectInner createOrUpdate(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).toBlocking().single().body(); + } + + /** + * Create or update project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 projectName, ProjectInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, parameters), serviceCallback); + } + + /** + * Create or update project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable createOrUpdateAsync(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).map(new Func1, ProjectInner>() { + @Override + public ProjectInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String groupName, String serviceName, String projectName, ProjectInner 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 ProjectInner object if successful. + */ + public ProjectInner get(String groupName, String serviceName, String projectName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName).toBlocking().single().body(); + } + + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, projectName), serviceCallback); + } + + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable getAsync(String groupName, String serviceName, String projectName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName).map(new Func1, ProjectInner>() { + @Override + public ProjectInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable> getWithServiceResponseAsync(String groupName, String serviceName, String projectName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 projectName) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName).toBlocking().single().body(); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName), serviceCallback); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String groupName, String serviceName, String projectName) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, String projectName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, Boolean deleteRunningTasks) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName, deleteRunningTasks).toBlocking().single().body(); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, Boolean deleteRunningTasks) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 ProjectInner object if successful. + */ + public ProjectInner update(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).toBlocking().single().body(); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 projectName, ProjectInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, projectName, parameters), serviceCallback); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable updateAsync(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).map(new Func1, ProjectInner>() { + @Override + public ProjectInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable> updateWithServiceResponseAsync(String groupName, String serviceName, String projectName, ProjectInner 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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); + } + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProjectInner> 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/QuotaImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/QuotaImpl.java new file mode 100644 index 000000000000..2f5f61fba839 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/QuotaImpl.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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Quota; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.QuotaName; + +class QuotaImpl extends WrapperImpl implements Quota { + private final DataMigrationManager manager; + + QuotaImpl(QuotaInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + + + @Override + public Double currentValue() { + return this.inner().currentValue(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Double limit() { + return this.inner().limit(); + } + + @Override + public QuotaName name() { + return this.inner().name(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/QuotaInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/QuotaInner.java new file mode 100644 index 000000000000..8d3de71e113f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/QuotaInner.java @@ -0,0 +1,150 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.QuotaName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a quota for or usage details about a resource. + */ +public class QuotaInner { + /** + * The current value of the quota. If null or missing, the current value + * cannot be determined in the context of the request. + */ + @JsonProperty(value = "currentValue") + private Double currentValue; + + /** + * The resource ID of the quota object. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The maximum value of the quota. If null or missing, the quota has no + * maximum, in which case it merely tracks usage. + */ + @JsonProperty(value = "limit") + private Double limit; + + /** + * The name of the quota. + */ + @JsonProperty(value = "name") + private QuotaName name; + + /** + * The unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Get the current value of the quota. If null or missing, the current value cannot be determined in the context of the request. + * + * @return the currentValue value + */ + public Double currentValue() { + return this.currentValue; + } + + /** + * Set the current value of the quota. If null or missing, the current value cannot be determined in the context of the request. + * + * @param currentValue the currentValue value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withCurrentValue(Double currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the resource ID of the quota object. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the resource ID of the quota object. + * + * @param id the id value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the maximum value of the quota. If null or missing, the quota has no maximum, in which case it merely tracks usage. + * + * @return the limit value + */ + public Double limit() { + return this.limit; + } + + /** + * Set the maximum value of the quota. If null or missing, the quota has no maximum, in which case it merely tracks usage. + * + * @param limit the limit value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withLimit(Double limit) { + this.limit = limit; + return this; + } + + /** + * Get the name of the quota. + * + * @return the name value + */ + public QuotaName name() { + return this.name; + } + + /** + * Set the name of the quota. + * + * @param name the name value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withName(QuotaName name) { + this.name = name; + return this; + } + + /** + * Get the unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + * + * @param unit the unit value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withUnit(String unit) { + this.unit = unit; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkuImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkuImpl.java new file mode 100644 index 000000000000..a0c8a6490ac2 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkuImpl.java @@ -0,0 +1,91 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSku; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkuCapabilities; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkuCapacity; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkuCosts; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkuRestrictions; + +class ResourceSkuImpl extends WrapperImpl implements ResourceSku { + private final DataMigrationManager manager; + ResourceSkuImpl(ResourceSkuInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public List apiVersions() { + return this.inner().apiVersions(); + } + + @Override + public List capabilities() { + return this.inner().capabilities(); + } + + @Override + public ResourceSkuCapacity capacity() { + return this.inner().capacity(); + } + + @Override + public List costs() { + return this.inner().costs(); + } + + @Override + public String family() { + return this.inner().family(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public List locations() { + return this.inner().locations(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public List restrictions() { + return this.inner().restrictions(); + } + + @Override + public String size() { + return this.inner().size(); + } + + @Override + public String tier() { + return this.inner().tier(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkuInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkuInner.java new file mode 100644 index 000000000000..f6938080a361 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkuInner.java @@ -0,0 +1,203 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkuCapacity; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkuCosts; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkuCapabilities; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkuRestrictions; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes an available DMS SKU. + */ +public class ResourceSkuInner { + /** + * The type of resource the SKU applies to. + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /** + * The name of SKU. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Specifies the tier of DMS in a scale set. + */ + @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) + private String tier; + + /** + * The Size of the SKU. + */ + @JsonProperty(value = "size", access = JsonProperty.Access.WRITE_ONLY) + private String size; + + /** + * The Family of this particular SKU. + */ + @JsonProperty(value = "family", access = JsonProperty.Access.WRITE_ONLY) + private String family; + + /** + * The Kind of resources that are supported in this SKU. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private String kind; + + /** + * Not used. + */ + @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuCapacity capacity; + + /** + * The set of locations that the SKU is available. + */ + @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) + private List locations; + + /** + * The api versions that support this SKU. + */ + @JsonProperty(value = "apiVersions", access = JsonProperty.Access.WRITE_ONLY) + private List apiVersions; + + /** + * Metadata for retrieving price info. + */ + @JsonProperty(value = "costs", access = JsonProperty.Access.WRITE_ONLY) + private List costs; + + /** + * A name value pair to describe the capability. + */ + @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) + private List capabilities; + + /** + * The restrictions because of which SKU cannot be used. This is empty if + * there are no restrictions. + */ + @JsonProperty(value = "restrictions", access = JsonProperty.Access.WRITE_ONLY) + private List restrictions; + + /** + * Get the type of resource the SKU applies to. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the name of SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get specifies the tier of DMS in a scale set. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Get the Size of the SKU. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Get the Family of this particular SKU. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Get the Kind of resources that are supported in this SKU. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Get not used. + * + * @return the capacity value + */ + public ResourceSkuCapacity capacity() { + return this.capacity; + } + + /** + * Get the set of locations that the SKU is available. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Get the api versions that support this SKU. + * + * @return the apiVersions value + */ + public List apiVersions() { + return this.apiVersions; + } + + /** + * Get metadata for retrieving price info. + * + * @return the costs value + */ + public List costs() { + return this.costs; + } + + /** + * Get a name value pair to describe the capability. + * + * @return the capabilities value + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Get the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * + * @return the restrictions value + */ + public List restrictions() { + return this.restrictions; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkusImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkusImpl.java new file mode 100644 index 000000000000..a9a34b39dcf3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkusImpl.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. + * abc + */ + +package com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkus; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSku; + +class ResourceSkusImpl extends WrapperImpl implements ResourceSkus { + private final DataMigrationManager manager; + + ResourceSkusImpl(DataMigrationManager manager) { + super(manager.inner().resourceSkus()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + ResourceSkusInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceSku call(ResourceSkuInner inner) { + return new ResourceSkuImpl(inner, manager()); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkusInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkusInner.java new file mode 100644 index 000000000000..c5ffa3a98c1f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ResourceSkusInner.java @@ -0,0 +1,297 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_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.azuredatabasemigrationservice.v2017_11_15_preview.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +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 ResourceSkus. + */ +public class ResourceSkusInner { + /** The Retrofit service to perform REST calls. */ + private ResourceSkusService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of ResourceSkusInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ResourceSkusInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(ResourceSkusService.class); + this.client = client; + } + + /** + * The interface defining all the services for ResourceSkus to be + * used by Retrofit to perform actually REST calls. + */ + interface ResourceSkusService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkus list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/skus") + Observable> list(@Path("subscriptionId") String subscriptionId, @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.azuredatabasemigrationservice.v2017_11_15_preview.ResourceSkus listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceSkuInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceSkuInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceSkuInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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(), this.client.apiVersion(), 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); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> 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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> 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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceSkuInner> 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServiceOperationImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServiceOperationImpl.java new file mode 100644 index 000000000000..06c8fef2eeca --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServiceOperationImpl.java @@ -0,0 +1,37 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ServiceOperation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ServiceOperationDisplay; + +class ServiceOperationImpl extends WrapperImpl implements ServiceOperation { + private final DataMigrationManager manager; + ServiceOperationImpl(ServiceOperationInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ServiceOperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServiceOperationInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServiceOperationInner.java new file mode 100644 index 000000000000..4561d24c7a4c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServiceOperationInner.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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ServiceOperationDisplay; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of an action supported by the Data Migration Service. + */ +public class ServiceOperationInner { + /** + * The fully qualified action name, e.g. + * Microsoft.DataMigration/services/read. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized display text. + */ + @JsonProperty(value = "display") + private ServiceOperationDisplay display; + + /** + * Get the fully qualified action name, e.g. Microsoft.DataMigration/services/read. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the fully qualified action name, e.g. Microsoft.DataMigration/services/read. + * + * @param name the name value to set + * @return the ServiceOperationInner object itself. + */ + public ServiceOperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized display text. + * + * @return the display value + */ + public ServiceOperationDisplay display() { + return this.display; + } + + /** + * Set localized display text. + * + * @param display the display value to set + * @return the ServiceOperationInner object itself. + */ + public ServiceOperationInner withDisplay(ServiceOperationDisplay display) { + this.display = display; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServicesImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServicesImpl.java new file mode 100644 index 000000000000..7727bbc168f9 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServicesImpl.java @@ -0,0 +1,212 @@ +/** + * 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. + * def + */ + +package com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Services; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.DataMigrationService; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.DataMigrationServiceStatusResponse; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.NameAvailabilityResponse; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.NameAvailabilityRequest; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.AvailableServiceSku; + +class ServicesImpl extends GroupableResourcesCoreImpl implements Services { + protected ServicesImpl(DataMigrationManager manager) { + super(manager.inner().services(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ServicesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ServicesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + ServicesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ServicesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataMigrationService call(DataMigrationServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ServicesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ServicesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataMigrationService call(DataMigrationServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public DataMigrationServiceImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable checkStatusAsync(String groupName, String serviceName) { + ServicesInner client = this.inner(); + return client.checkStatusAsync(groupName, serviceName) + .map(new Func1() { + @Override + public DataMigrationServiceStatusResponse call(DataMigrationServiceStatusResponseInner inner) { + return new DataMigrationServiceStatusResponseImpl(inner, manager()); + } + }); + } + + @Override + public Completable startAsync(String groupName, String serviceName) { + ServicesInner client = this.inner(); + return client.startAsync(groupName, serviceName).toCompletable(); + } + + @Override + public Completable stopAsync(String groupName, String serviceName) { + ServicesInner client = this.inner(); + return client.stopAsync(groupName, serviceName).toCompletable(); + } + + @Override + public Observable checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters) { + ServicesInner client = this.inner(); + return client.checkChildrenNameAvailabilityAsync(groupName, serviceName, parameters) + .map(new Func1() { + @Override + public NameAvailabilityResponse call(NameAvailabilityResponseInner inner) { + return new NameAvailabilityResponseImpl(inner, manager()); + } + }); + } + + @Override + protected DataMigrationServiceImpl wrapModel(DataMigrationServiceInner inner) { + return new DataMigrationServiceImpl(inner.name(), inner, manager()); + } + + @Override + protected DataMigrationServiceImpl wrapModel(String name) { + return new DataMigrationServiceImpl(name, new DataMigrationServiceInner(), this.manager()); + } + + private AvailableServiceSkuImpl wrapAvailableServiceSkuModel(AvailableServiceSkuInner inner) { + return new AvailableServiceSkuImpl(inner, manager()); + } + + @Override + public Observable listSkusAsync(final String groupName, final String serviceName) { + ServicesInner client = this.inner(); + return client.listSkusAsync(groupName, serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AvailableServiceSku call(AvailableServiceSkuInner inner) { + return wrapAvailableServiceSkuModel(inner); + } + }); + } + + @Override + public Observable checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters) { + ServicesInner client = this.inner(); + return client.checkNameAvailabilityAsync(location, parameters) + .map(new Func1() { + @Override + public NameAvailabilityResponse call(NameAvailabilityResponseInner inner) { + return new NameAvailabilityResponseImpl(inner, manager()); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServicesInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServicesInner.java new file mode 100644 index 000000000000..bc7d8790b660 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/ServicesInner.java @@ -0,0 +1,2240 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ApiErrorException; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.NameAvailabilityRequest; +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 Services. + */ +public class ServicesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ServicesService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of ServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServicesInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(ServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Services to be + * used by Retrofit to perform actually REST calls. + */ + interface ServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Services createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2017_11_15_preview.Services beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2017_11_15_preview.Services getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2017_11_15_preview.Services beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2017_11_15_preview.Services checkStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkStatus") + Observable> checkStatus(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services start" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start") + Observable> start(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services beginStart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start") + Observable> beginStart(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services stop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop") + Observable> stop(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services beginStop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop") + Observable> beginStop(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services listSkus" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus") + Observable> listSkus(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services checkChildrenNameAvailability" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability") + Observable> checkChildrenNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Body NameAvailabilityRequest parameters, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services") + Observable> list(@Path("subscriptionId") String subscriptionId, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Body NameAvailabilityRequest parameters, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services listSkusNext" }) + @GET + Observable> listSkusNext(@Url String nextUrl, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @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.azuredatabasemigrationservice.v2017_11_15_preview.Services listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner createOrUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().last().body(); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 createOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner beginCreateOrUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().single().body(); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 beginCreateOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable beginCreateOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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.beginCreateOrUpdate(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The GET method retrieves information about a service instance. + * + * @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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner getByResourceGroup(String groupName, String serviceName) { + return getByResourceGroupWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The GET method retrieves information about a service instance. + * + * @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 getByResourceGroupAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The GET method retrieves information about a service instance. + * + * @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 DataMigrationServiceInner object + */ + public Observable getByResourceGroupAsync(String groupName, String serviceName) { + return getByResourceGroupWithServiceResponseAsync(groupName, serviceName).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The GET method retrieves information about a service instance. + * + * @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 DataMigrationServiceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String groupName, 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."); + } + return service.getByResourceGroup(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(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 DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public void delete(String groupName, String serviceName) { + deleteWithServiceResponseAsync(groupName, serviceName).toBlocking().last().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 deleteAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public Observable deleteAsync(String groupName, String serviceName) { + return deleteWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public Observable> deleteWithServiceResponseAsync(String groupName, 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 Boolean deleteRunningTasks = null; + Observable> observable = service.delete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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, Boolean deleteRunningTasks) { + deleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).toBlocking().last().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param deleteRunningTasks Delete the resource even if it contains running tasks + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks) { + return deleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param deleteRunningTasks Delete the resource even if it contains running tasks + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public void beginDelete(String groupName, String serviceName) { + beginDeleteWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 beginDeleteAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String groupName, String serviceName) { + return beginDeleteWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String groupName, 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 Boolean deleteRunningTasks = null; + return service.beginDelete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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 beginDelete(String groupName, String serviceName, Boolean deleteRunningTasks) { + beginDeleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).toBlocking().single().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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 beginDeleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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 beginDeleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks) { + return beginDeleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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> beginDeleteWithServiceResponseAsync(String groupName, String serviceName, 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner update(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().last().body(); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 updateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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); + Observable> observable = service.update(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner beginUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginUpdateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().single().body(); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 beginUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable beginUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginUpdateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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.beginUpdate(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 DataMigrationServiceStatusResponseInner object if successful. + */ + public DataMigrationServiceStatusResponseInner checkStatus(String groupName, String serviceName) { + return checkStatusWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 checkStatusAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkStatusWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 DataMigrationServiceStatusResponseInner object + */ + public Observable checkStatusAsync(String groupName, String serviceName) { + return checkStatusWithServiceResponseAsync(groupName, serviceName).map(new Func1, DataMigrationServiceStatusResponseInner>() { + @Override + public DataMigrationServiceStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 DataMigrationServiceStatusResponseInner object + */ + public Observable> checkStatusWithServiceResponseAsync(String groupName, 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."); + } + return service.checkStatus(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkStatusDelegate(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); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public void start(String groupName, String serviceName) { + startWithServiceResponseAsync(groupName, serviceName).toBlocking().last().body(); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 startAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public Observable startAsync(String groupName, String serviceName) { + return startWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public Observable> startWithServiceResponseAsync(String groupName, 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."); + } + Observable> observable = service.start(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public void beginStart(String groupName, String serviceName) { + beginStartWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 beginStartAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStartAsync(String groupName, String serviceName) { + return beginStartWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStartWithServiceResponseAsync(String groupName, 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."); + } + return service.beginStart(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public void stop(String groupName, String serviceName) { + stopWithServiceResponseAsync(groupName, serviceName).toBlocking().last().body(); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 stopAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public Observable stopAsync(String groupName, String serviceName) { + return stopWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public Observable> stopWithServiceResponseAsync(String groupName, 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."); + } + Observable> observable = service.stop(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public void beginStop(String groupName, String serviceName) { + beginStopWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 beginStopAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStopAsync(String groupName, String serviceName) { + return beginStopWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStopWithServiceResponseAsync(String groupName, 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."); + } + return service.beginStop(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object if successful. + */ + public PagedList listSkus(final String groupName, final String serviceName) { + ServiceResponse> response = listSkusSinglePageAsync(groupName, serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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> listSkusAsync(final String groupName, final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSkusSinglePageAsync(groupName, serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable> listSkusAsync(final String groupName, final String serviceName) { + return listSkusWithServiceResponseAsync(groupName, serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable>> listSkusWithServiceResponseAsync(final String groupName, final String serviceName) { + return listSkusSinglePageAsync(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(listSkusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + ServiceResponse> * @param groupName Name of the resource group + ServiceResponse> * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableServiceSkuInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSkusSinglePageAsync(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."); + } + return service.listSkus(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSkusDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSkusDelegate(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); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @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 NameAvailabilityResponseInner object if successful. + */ + public NameAvailabilityResponseInner checkChildrenNameAvailability(String groupName, String serviceName, NameAvailabilityRequest parameters) { + return checkChildrenNameAvailabilityWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().single().body(); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @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 checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkChildrenNameAvailabilityWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters) { + return checkChildrenNameAvailabilityWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, NameAvailabilityResponseInner>() { + @Override + public NameAvailabilityResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable> checkChildrenNameAvailabilityWithServiceResponseAsync(String groupName, String serviceName, NameAvailabilityRequest 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.checkChildrenNameAvailability(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkChildrenNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkChildrenNameAvailabilityDelegate(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 services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @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<DataMigrationServiceInner> object if successful. + */ + public PagedList listByResourceGroup(final String groupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(groupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @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> listByResourceGroupAsync(final String groupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(groupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable> listByResourceGroupAsync(final String groupName) { + return listByResourceGroupWithServiceResponseAsync(groupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String groupName) { + return listByResourceGroupSinglePageAsync(groupName) + .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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + ServiceResponse> * @param groupName Name of the resource group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String groupName) { + 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(this.client.subscriptionId(), groupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(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); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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(), this.client.apiVersion(), 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); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @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 NameAvailabilityResponseInner object if successful. + */ + public NameAvailabilityResponseInner checkNameAvailability(String location, NameAvailabilityRequest parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).toBlocking().single().body(); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @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 checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, parameters), serviceCallback); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).map(new Func1, NameAvailabilityResponseInner>() { + @Override + public NameAvailabilityResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String location, NameAvailabilityRequest parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.checkNameAvailability(this.client.subscriptionId(), location, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(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 compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object if successful. + */ + public PagedList listSkusNext(final String nextPageLink) { + ServiceResponse> response = listSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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> listSkusNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSkusNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable> listSkusNextAsync(final String nextPageLink) { + return listSkusNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable>> listSkusNextWithServiceResponseAsync(final String nextPageLink) { + return listSkusNextSinglePageAsync(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(listSkusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableServiceSkuInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSkusNextSinglePageAsync(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.listSkusNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSkusNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSkusNextDelegate(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); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @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<DataMigrationServiceInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @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<DataMigrationServiceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @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<DataMigrationServiceInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(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); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> 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 services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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 services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> 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 services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/TasksImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/TasksImpl.java new file mode 100644 index 000000000000..1c21a5d7b2c5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/TasksImpl.java @@ -0,0 +1,93 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Tasks; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.ProjectTask; + +class TasksImpl extends WrapperImpl implements Tasks { + private final DataMigrationManager manager; + + TasksImpl(DataMigrationManager manager) { + super(manager.inner().tasks()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ProjectTaskImpl define(String name) { + return wrapModel(name); + } + + private ProjectTaskImpl wrapModel(ProjectTaskInner inner) { + return new ProjectTaskImpl(inner, manager()); + } + + private ProjectTaskImpl wrapModel(String name) { + return new ProjectTaskImpl(name, this.manager()); + } + + @Override + 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() { + @Override + public ProjectTask call(ProjectTaskInner inner) { + return new ProjectTaskImpl(inner, manager()); + } + }); + } + + @Override + 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>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProjectTask call(ProjectTaskInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + 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() { + @Override + public ProjectTask call(ProjectTaskInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String groupName, String serviceName, String projectName, String taskName) { + TasksInner client = this.inner(); + return client.deleteAsync(groupName, serviceName, projectName, taskName).toCompletable(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/TasksInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/TasksInner.java new file mode 100644 index 000000000000..ff86d6eb789f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/TasksInner.java @@ -0,0 +1,1223 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_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.azuredatabasemigrationservice.v2017_11_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 Tasks. + */ +public class TasksInner { + /** The Retrofit service to perform REST calls. */ + private TasksService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of TasksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public TasksInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(TasksService.class); + this.client = client; + } + + /** + * The interface defining all the services for Tasks to be + * used by Retrofit to perform actually REST calls. + */ + interface TasksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Tasks list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Tasks createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Tasks get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Tasks delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Tasks update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Tasks cancel" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel") + Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2017_11_15_preview.Tasks listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + ServiceResponse> response = listSinglePageAsync(groupName, serviceName, projectName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(groupName, serviceName, projectName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + return listWithServiceResponseAsync(groupName, serviceName, projectName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + return listSinglePageAsync(groupName, serviceName, projectName) + .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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType) { + ServiceResponse> response = listSinglePageAsync(groupName, serviceName, projectName, taskType).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(groupName, serviceName, projectName, taskType), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType) { + return listWithServiceResponseAsync(groupName, serviceName, projectName, taskType) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType) { + return listSinglePageAsync(groupName, serviceName, projectName, 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, String taskName, ProjectTaskInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).toBlocking().single().body(); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, String taskName, ProjectTaskInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters), serviceCallback); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, String taskName, ProjectTaskInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @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 projectName, String taskName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName).toBlocking().single().body(); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, projectName, taskName), serviceCallback); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable getAsync(String groupName, String serviceName, String projectName, String taskName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable> getWithServiceResponseAsync(String groupName, String serviceName, String projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, String expand) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName, expand).toBlocking().single().body(); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, projectName, taskName, expand), serviceCallback); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, String expand) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName, expand).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @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 projectName, String taskName) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName).toBlocking().single().body(); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName), serviceCallback); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String groupName, String serviceName, String projectName, String taskName) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, String projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, Boolean deleteRunningTasks) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks).toBlocking().single().body(); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, Boolean deleteRunningTasks) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, String taskName, ProjectTaskInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).toBlocking().single().body(); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, String taskName, ProjectTaskInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters), serviceCallback); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, String taskName, ProjectTaskInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @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 projectName, String taskName) { + return cancelWithServiceResponseAsync(groupName, serviceName, projectName, taskName).toBlocking().single().body(); + } + + /** + * 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(groupName, serviceName, projectName, taskName), serviceCallback); + } + + /** + * 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable cancelAsync(String groupName, String serviceName, String projectName, String taskName) { + return cancelWithServiceResponseAsync(groupName, serviceName, projectName, taskName).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable> cancelWithServiceResponseAsync(String groupName, String serviceName, String projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/UsagesImpl.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/UsagesImpl.java new file mode 100644 index 000000000000..74a9d65262b6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/UsagesImpl.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Usages; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Quota; + +class UsagesImpl extends WrapperImpl implements Usages { + private final DataMigrationManager manager; + + UsagesImpl(DataMigrationManager manager) { + super(manager.inner().usages()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + private QuotaImpl wrapModel(QuotaInner inner) { + return new QuotaImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String location) { + UsagesInner client = this.inner(); + return client.listAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Quota call(QuotaInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/UsagesInner.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/UsagesInner.java new file mode 100644 index 000000000000..96b586289bc6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/UsagesInner.java @@ -0,0 +1,305 @@ +/** + * 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.azuredatabasemigrationservice.v2017_11_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.azuredatabasemigrationservice.v2017_11_15_preview.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +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 Usages. + */ +public class UsagesInner { + /** The Retrofit service to perform REST calls. */ + private UsagesService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of UsagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public UsagesInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(UsagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Usages to be + * used by Retrofit to perform actually REST calls. + */ + interface UsagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.Usages list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @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.azuredatabasemigrationservice.v2017_11_15_preview.Usages listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @param location The Azure region of the 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<QuotaInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @param location The Azure region of the operation + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<QuotaInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<QuotaInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + ServiceResponse> * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<QuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location 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(), location, this.client.apiVersion(), 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); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @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<QuotaInner> 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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @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<QuotaInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @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<QuotaInner> 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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<QuotaInner> 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/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/package-info.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/package-info.java new file mode 100644 index 000000000000..9cc7606f0a42 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/implementation/package-info.java @@ -0,0 +1,11 @@ +// 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. + +/** + * This package contains the implementation classes for DataMigrationServiceClient. + * Data Migration Client. + */ +package com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview.implementation; diff --git a/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/package-info.java b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/package-info.java new file mode 100644 index 000000000000..ccc9ae1ba6e7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2017_11_15_preview/package-info.java @@ -0,0 +1,11 @@ +// 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. + +/** + * This package contains the classes for DataMigrationServiceClient. + * Data Migration Client. + */ +package com.microsoft.azure.management.azuredatabasemigrationservice.v2017_11_15_preview; diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/pom.xml b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/pom.xml new file mode 100644 index 000000000000..8ecf34adb898 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.azuredatabasemigrationservice.v2018_03_31_preview + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-datamigration + 1.0.0-beta + jar + Microsoft Azure SDK for DataMigration Management + This package contains Microsoft DataMigration Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ApiError.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ApiError.java new file mode 100644 index 000000000000..b04d2188a4e7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ApiError.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error information. + */ +public class ApiError { + /** + * Error information in OData format. + */ + @JsonProperty(value = "error") + private ODataError error; + + /** + * Get error information in OData format. + * + * @return the error value + */ + public ODataError error() { + return this.error; + } + + /** + * Set error information in OData format. + * + * @param error the error value to set + * @return the ApiError object itself. + */ + public ApiError withError(ODataError error) { + this.error = error; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ApiErrorException.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ApiErrorException.java new file mode 100644 index 000000000000..78c416aeaafa --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ApiErrorException.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ApiError information. + */ +public class ApiErrorException extends RestException { + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ApiErrorException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ApiErrorException(final String message, final Response response, final ApiError body) { + super(message, response, body); + } + + @Override + public ApiError body() { + return (ApiError) super.body(); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AuthenticationType.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AuthenticationType.java new file mode 100644 index 000000000000..780b359bdead --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AuthenticationType.java @@ -0,0 +1,50 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AuthenticationType. + */ +public final class AuthenticationType extends ExpandableStringEnum { + /** Static value None for AuthenticationType. */ + public static final AuthenticationType NONE = fromString("None"); + + /** Static value WindowsAuthentication for AuthenticationType. */ + public static final AuthenticationType WINDOWS_AUTHENTICATION = fromString("WindowsAuthentication"); + + /** Static value SqlAuthentication for AuthenticationType. */ + public static final AuthenticationType SQL_AUTHENTICATION = fromString("SqlAuthentication"); + + /** Static value ActiveDirectoryIntegrated for AuthenticationType. */ + public static final AuthenticationType ACTIVE_DIRECTORY_INTEGRATED = fromString("ActiveDirectoryIntegrated"); + + /** Static value ActiveDirectoryPassword for AuthenticationType. */ + public static final AuthenticationType ACTIVE_DIRECTORY_PASSWORD = fromString("ActiveDirectoryPassword"); + + /** + * Creates or finds a AuthenticationType from its string representation. + * @param name a name to look for + * @return the corresponding AuthenticationType + */ + @JsonCreator + public static AuthenticationType fromString(String name) { + return fromString(name, AuthenticationType.class); + } + + /** + * @return known AuthenticationType values + */ + public static Collection values() { + return values(AuthenticationType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSku.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSku.java new file mode 100644 index 000000000000..2e75e643f132 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSku.java @@ -0,0 +1,35 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.AvailableServiceSkuInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationManager; + +/** + * Type representing AvailableServiceSku. + */ +public interface AvailableServiceSku extends HasInner, HasManager { + /** + * @return the capacity value. + */ + AvailableServiceSkuCapacity capacity(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the sku value. + */ + AvailableServiceSkuSku sku(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSkuCapacity.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSkuCapacity.java new file mode 100644 index 000000000000..bba7cb3218fe --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSkuCapacity.java @@ -0,0 +1,122 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A description of the scaling capacities of the SKU. + */ +public class AvailableServiceSkuCapacity { + /** + * The minimum capacity, usually 0 or 1. + */ + @JsonProperty(value = "minimum") + private Integer minimum; + + /** + * The maximum capacity. + */ + @JsonProperty(value = "maximum") + private Integer maximum; + + /** + * The default capacity. + */ + @JsonProperty(value = "default") + private Integer defaultProperty; + + /** + * The scalability approach. Possible values include: 'none', 'manual', + * 'automatic'. + */ + @JsonProperty(value = "scaleType") + private ServiceScalability scaleType; + + /** + * Get the minimum capacity, usually 0 or 1. + * + * @return the minimum value + */ + public Integer minimum() { + return this.minimum; + } + + /** + * Set the minimum capacity, usually 0 or 1. + * + * @param minimum the minimum value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withMinimum(Integer minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the maximum capacity. + * + * @return the maximum value + */ + public Integer maximum() { + return this.maximum; + } + + /** + * Set the maximum capacity. + * + * @param maximum the maximum value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withMaximum(Integer maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get the default capacity. + * + * @return the defaultProperty value + */ + public Integer defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the default capacity. + * + * @param defaultProperty the defaultProperty value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withDefaultProperty(Integer defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the scalability approach. Possible values include: 'none', 'manual', 'automatic'. + * + * @return the scaleType value + */ + public ServiceScalability scaleType() { + return this.scaleType; + } + + /** + * Set the scalability approach. Possible values include: 'none', 'manual', 'automatic'. + * + * @param scaleType the scaleType value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withScaleType(ServiceScalability scaleType) { + this.scaleType = scaleType; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSkuSku.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSkuSku.java new file mode 100644 index 000000000000..ade107c33b09 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/AvailableServiceSkuSku.java @@ -0,0 +1,121 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU name, tier, etc. + */ +public class AvailableServiceSkuSku { + /** + * The name of the SKU. + */ + @JsonProperty(value = "name") + private String name; + + /** + * SKU family. + */ + @JsonProperty(value = "family") + private String family; + + /** + * SKU size. + */ + @JsonProperty(value = "size") + private String size; + + /** + * The tier of the SKU, such as "Free", "Basic", "Standard", or "Premium". + */ + @JsonProperty(value = "tier") + private String tier; + + /** + * Get the name of the SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the SKU. + * + * @param name the name value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get sKU family. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set sKU family. + * + * @param family the family value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get sKU size. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set sKU size. + * + * @param size the size value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the tier of the SKU, such as "Free", "Basic", "Standard", or "Premium". + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier of the SKU, such as "Free", "Basic", "Standard", or "Premium". + * + * @param tier the tier value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withTier(String tier) { + this.tier = tier; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/BlobShare.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/BlobShare.java new file mode 100644 index 000000000000..a7569f528496 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/BlobShare.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Blob container storage information. + */ +public class BlobShare { + /** + * SAS URI of Azure Storage Account Container. + */ + @JsonProperty(value = "sasUri", required = true) + private String sasUri; + + /** + * Get sAS URI of Azure Storage Account Container. + * + * @return the sasUri value + */ + public String sasUri() { + return this.sasUri; + } + + /** + * Set sAS URI of Azure Storage Account Container. + * + * @param sasUri the sasUri value to set + * @return the BlobShare object itself. + */ + public BlobShare withSasUri(String sasUri) { + this.sasUri = sasUri; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskInput.java new file mode 100644 index 000000000000..e113df82329c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskInput.java @@ -0,0 +1,123 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to SQL Server and also + * validates source server requirements. + */ +public class ConnectToSourceSqlServerTaskInput { + /** + * Connection information for Source SQL Server. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Permission group for validations. Possible values include: 'Default', + * 'MigrationFromSqlServerToAzureDB'. + */ + @JsonProperty(value = "checkPermissionsGroup") + private ServerLevelPermissionsGroup checkPermissionsGroup; + + /** + * Flag for whether to collect logins from source server. + */ + @JsonProperty(value = "CollectLogins") + private Boolean collectLogins; + + /** + * Flag for whether to collect agent jobs from source server. + */ + @JsonProperty(value = "CollectAgentJobs") + private Boolean collectAgentJobs; + + /** + * 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 ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get permission group for validations. Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB'. + * + * @return the checkPermissionsGroup value + */ + public ServerLevelPermissionsGroup checkPermissionsGroup() { + return this.checkPermissionsGroup; + } + + /** + * Set permission group for validations. Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB'. + * + * @param checkPermissionsGroup the checkPermissionsGroup value to set + * @return the ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withCheckPermissionsGroup(ServerLevelPermissionsGroup checkPermissionsGroup) { + this.checkPermissionsGroup = checkPermissionsGroup; + return this; + } + + /** + * Get flag for whether to collect logins from source server. + * + * @return the collectLogins value + */ + public Boolean collectLogins() { + return this.collectLogins; + } + + /** + * Set flag for whether to collect logins from source server. + * + * @param collectLogins the collectLogins value to set + * @return the ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withCollectLogins(Boolean collectLogins) { + this.collectLogins = collectLogins; + return this; + } + + /** + * Get flag for whether to collect agent jobs from source server. + * + * @return the collectAgentJobs value + */ + public Boolean collectAgentJobs() { + return this.collectAgentJobs; + } + + /** + * Set flag for whether to collect agent jobs from source server. + * + * @param collectAgentJobs the collectAgentJobs value to set + * @return the ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withCollectAgentJobs(Boolean collectAgentJobs) { + this.collectAgentJobs = collectAgentJobs; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutput.java new file mode 100644 index 000000000000..47223c9ba175 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutput.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.azuredatabasemigrationservice.v2018_03_31_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 validates connection to SQL Server and also + * validates source server requirements. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ConnectToSourceSqlServerTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AgentJobLevelOutput", value = ConnectToSourceSqlServerTaskOutputAgentJobLevel.class), + @JsonSubTypes.Type(name = "LoginLevelOutput", value = ConnectToSourceSqlServerTaskOutputLoginLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = ConnectToSourceSqlServerTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "TaskLevelOutput", value = ConnectToSourceSqlServerTaskOutputTaskLevel.class) +}) +public class ConnectToSourceSqlServerTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java new file mode 100644 index 000000000000..3af427751108 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java @@ -0,0 +1,113 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * AgentJob 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") +@JsonTypeName("AgentJobLevelOutput") +public class ConnectToSourceSqlServerTaskOutputAgentJobLevel extends ConnectToSourceSqlServerTaskOutput { + /** + * AgentJob name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The type of AgentJob. + */ + @JsonProperty(value = "jobCategory", access = JsonProperty.Access.WRITE_ONLY) + private String jobCategory; + + /** + * The state of the original AgentJob. + */ + @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEnabled; + + /** + * The owner of the AgentJob. + */ + @JsonProperty(value = "jobOwner", access = JsonProperty.Access.WRITE_ONLY) + private String jobOwner; + + /** + * UTC Date and time when the AgentJob was last executed. + */ + @JsonProperty(value = "lastExecutedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastExecutedOn; + + /** + * Information about eligiblity of agent job for migration. + */ + @JsonProperty(value = "migrationEligibility", access = JsonProperty.Access.WRITE_ONLY) + private MigrationEligibilityInfo migrationEligibility; + + /** + * Get agentJob name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the type of AgentJob. + * + * @return the jobCategory value + */ + public String jobCategory() { + return this.jobCategory; + } + + /** + * Get the state of the original AgentJob. + * + * @return the isEnabled value + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * Get the owner of the AgentJob. + * + * @return the jobOwner value + */ + public String jobOwner() { + return this.jobOwner; + } + + /** + * Get uTC Date and time when the AgentJob was last executed. + * + * @return the lastExecutedOn value + */ + public DateTime lastExecutedOn() { + return this.lastExecutedOn; + } + + /** + * Get information about eligiblity of agent job for migration. + * + * @return the migrationEligibility value + */ + public MigrationEligibilityInfo migrationEligibility() { + return this.migrationEligibility; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..60572d70e4d1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java @@ -0,0 +1,102 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * 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") +@JsonTypeName("DatabaseLevelOutput") +public class ConnectToSourceSqlServerTaskOutputDatabaseLevel extends ConnectToSourceSqlServerTaskOutput { + /** + * Database name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Size of the file in megabytes. + */ + @JsonProperty(value = "sizeMB", access = JsonProperty.Access.WRITE_ONLY) + private Double sizeMB; + + /** + * The list of database files. + */ + @JsonProperty(value = "databaseFiles", access = JsonProperty.Access.WRITE_ONLY) + private List databaseFiles; + + /** + * SQL Server compatibility level of database. Possible values include: + * 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', + * 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + */ + @JsonProperty(value = "compatibilityLevel", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseCompatLevel compatibilityLevel; + + /** + * State of the database. Possible values include: 'Online', 'Restoring', + * 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', + * 'Copying', 'OfflineSecondary'. + */ + @JsonProperty(value = "databaseState", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseState databaseState; + + /** + * Get database name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get size of the file in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + + /** + * Get the list of database files. + * + * @return the databaseFiles value + */ + public List databaseFiles() { + return this.databaseFiles; + } + + /** + * Get sQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + * + * @return the compatibilityLevel value + */ + public DatabaseCompatLevel compatibilityLevel() { + return this.compatibilityLevel; + } + + /** + * Get state of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'. + * + * @return the databaseState value + */ + public DatabaseState databaseState() { + return this.databaseState; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java new file mode 100644 index 000000000000..cd3290d8f7b0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java @@ -0,0 +1,99 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * 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") +@JsonTypeName("LoginLevelOutput") +public class ConnectToSourceSqlServerTaskOutputLoginLevel extends ConnectToSourceSqlServerTaskOutput { + /** + * Login name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The type of login. Possible values include: 'WindowsUser', + * 'WindowsGroup', 'SqlLogin', 'Certificate', 'AsymmetricKey', + * 'ExternalUser', 'ExternalGroup'. + */ + @JsonProperty(value = "loginType", access = JsonProperty.Access.WRITE_ONLY) + private LoginType loginType; + + /** + * The default database for the login. + */ + @JsonProperty(value = "defaultDatabase", access = JsonProperty.Access.WRITE_ONLY) + private String defaultDatabase; + + /** + * The state of the login. + */ + @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEnabled; + + /** + * Information about eligiblity of login for migration. + */ + @JsonProperty(value = "migrationEligibility", access = JsonProperty.Access.WRITE_ONLY) + private MigrationEligibilityInfo migrationEligibility; + + /** + * Get login name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the type of login. Possible values include: 'WindowsUser', 'WindowsGroup', 'SqlLogin', 'Certificate', 'AsymmetricKey', 'ExternalUser', 'ExternalGroup'. + * + * @return the loginType value + */ + public LoginType loginType() { + return this.loginType; + } + + /** + * Get the default database for the login. + * + * @return the defaultDatabase value + */ + public String defaultDatabase() { + return this.defaultDatabase; + } + + /** + * Get the state of the login. + * + * @return the isEnabled value + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * Get information about eligiblity of login for migration. + * + * @return the migrationEligibility value + */ + public MigrationEligibilityInfo migrationEligibility() { + return this.migrationEligibility; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java new file mode 100644 index 000000000000..94c441018a21 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java @@ -0,0 +1,114 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * 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") +@JsonTypeName("TaskLevelOutput") +public class ConnectToSourceSqlServerTaskOutputTaskLevel extends ConnectToSourceSqlServerTaskOutput { + /** + * Source databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * Source logins as a map from login name to login id. + */ + @JsonProperty(value = "Logins", access = JsonProperty.Access.WRITE_ONLY) + private Map logins; + + /** + * Source agent jobs as a map from agent job name to id. + */ + @JsonProperty(value = "AgentJobs", access = JsonProperty.Access.WRITE_ONLY) + private Map agentJobs; + + /** + * 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; + + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get source databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * Get source logins as a map from login name to login id. + * + * @return the logins value + */ + public Map logins() { + return this.logins; + } + + /** + * Get source agent jobs as a map from agent job name to id. + * + * @return the agentJobs value + */ + public Map agentJobs() { + return this.agentJobs; + } + + /** + * 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 validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskProperties.java new file mode 100644 index 000000000000..ca98a69f79fc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToSourceSqlServerTaskProperties.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.azuredatabasemigrationservice.v2018_03_31_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 SQL Server and also + * validates source server requirements. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ConnectToSource.SqlServer") +public class ConnectToSourceSqlServerTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToSourceSqlServerTaskInput 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 ConnectToSourceSqlServerTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToSourceSqlServerTaskProperties object itself. + */ + public ConnectToSourceSqlServerTaskProperties withInput(ConnectToSourceSqlServerTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskInput.java new file mode 100644 index 000000000000..1a2c196f8f1d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskInput.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to SQL DB and target server + * requirements. + */ +public class ConnectToTargetSqlDbTaskInput { + /** + * Connection information for target SQL DB. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Get connection information for target SQL DB. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target SQL DB. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ConnectToTargetSqlDbTaskInput object itself. + */ + public ConnectToTargetSqlDbTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskOutput.java new file mode 100644 index 000000000000..b600b4ac7c24 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskOutput.java @@ -0,0 +1,79 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the task that validates connection to SQL DB and target server + * requirements. + */ +public class ConnectToTargetSqlDbTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Source databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * Version of the target server. + */ + @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; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get source databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * Get version of the target server. + * + * @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; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskProperties.java new file mode 100644 index 000000000000..e5ca7a832423 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlDbTaskProperties.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.azuredatabasemigrationservice.v2018_03_31_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 SQL DB and target + * server requirements. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ConnectToTarget.SqlDb") +public class ConnectToTargetSqlDbTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToTargetSqlDbTaskInput 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 ConnectToTargetSqlDbTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToTargetSqlDbTaskProperties object itself. + */ + public ConnectToTargetSqlDbTaskProperties withInput(ConnectToTargetSqlDbTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskInput.java new file mode 100644 index 000000000000..90c274511125 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskInput.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to Azure SQL Database Managed + * Instance. + */ +public class ConnectToTargetSqlMITaskInput { + /** + * Connection information for target SQL Server. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Get connection information for target SQL Server. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target SQL Server. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ConnectToTargetSqlMITaskInput object itself. + */ + public ConnectToTargetSqlMITaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskOutput.java new file mode 100644 index 000000000000..8940be530da4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskOutput.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.azuredatabasemigrationservice.v2018_03_31_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 ConnectToTargetSqlMITaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * 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; + + /** + * List of logins on the target server. + */ + @JsonProperty(value = "Logins", access = JsonProperty.Access.WRITE_ONLY) + private List logins; + + /** + * List of agent jobs on the target server. + */ + @JsonProperty(value = "AgentJobs", access = JsonProperty.Access.WRITE_ONLY) + private List agentJobs; + + /** + * Validation errors. + */ + @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 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 list of logins on the target server. + * + * @return the logins value + */ + public List logins() { + return this.logins; + } + + /** + * Get list of agent jobs on the target server. + * + * @return the agentJobs value + */ + public List agentJobs() { + return this.agentJobs; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskProperties.java new file mode 100644 index 000000000000..49c0ea4cefd5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectToTargetSqlMITaskProperties.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.azuredatabasemigrationservice.v2018_03_31_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") +@JsonTypeName("ConnectToTarget.AzureSqlDbMI") +public class ConnectToTargetSqlMITaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToTargetSqlMITaskInput 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 ConnectToTargetSqlMITaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToTargetSqlMITaskProperties object itself. + */ + public ConnectToTargetSqlMITaskProperties withInput(ConnectToTargetSqlMITaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectionInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectionInfo.java new file mode 100644 index 000000000000..99aee0c7bfcc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ConnectionInfo.java @@ -0,0 +1,84 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_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; + +/** + * Defines the connection properties of a server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Unknown") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI", value = MigrateSqlServerSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class) +}) +public class ConnectionInfo { + /** + * User name. + */ + @JsonProperty(value = "userName") + private String userName; + + /** + * Password credential. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get user name. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Set user name. + * + * @param userName the userName value to set + * @return the ConnectionInfo object itself. + */ + public ConnectionInfo withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get password credential. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set password credential. + * + * @param password the password value to set + * @return the ConnectionInfo object itself. + */ + public ConnectionInfo withPassword(String password) { + this.password = password; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataIntegrityValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataIntegrityValidationResult.java new file mode 100644 index 000000000000..e3b0ee50eb3f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataIntegrityValidationResult.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results for checksum based Data Integrity validation results. + */ +public class DataIntegrityValidationResult { + /** + * List of failed table names of source and target pair. + */ + @JsonProperty(value = "failedObjects") + private Map failedObjects; + + /** + * List of errors that happened while performing data integrity validation. + */ + @JsonProperty(value = "validationErrors") + private ValidationError validationErrors; + + /** + * Get list of failed table names of source and target pair. + * + * @return the failedObjects value + */ + public Map failedObjects() { + return this.failedObjects; + } + + /** + * Set list of failed table names of source and target pair. + * + * @param failedObjects the failedObjects value to set + * @return the DataIntegrityValidationResult object itself. + */ + public DataIntegrityValidationResult withFailedObjects(Map failedObjects) { + this.failedObjects = failedObjects; + return this; + } + + /** + * Get list of errors that happened while performing data integrity validation. + * + * @return the validationErrors value + */ + public ValidationError validationErrors() { + return this.validationErrors; + } + + /** + * Set list of errors that happened while performing data integrity validation. + * + * @param validationErrors the validationErrors value to set + * @return the DataIntegrityValidationResult object itself. + */ + public DataIntegrityValidationResult withValidationErrors(ValidationError validationErrors) { + this.validationErrors = validationErrors; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataItemMigrationSummaryResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataItemMigrationSummaryResult.java new file mode 100644 index 000000000000..a98e538e782c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataItemMigrationSummaryResult.java @@ -0,0 +1,155 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Basic summary of a data item migration. + */ +public class DataItemMigrationSummaryResult { + /** + * Name of the item. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * 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 state of migration. Possible values include: 'None', + * 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Number of items. + */ + @JsonProperty(value = "itemsCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCount; + + /** + * Number of successfully completed items. + */ + @JsonProperty(value = "itemsCompletedCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCompletedCount; + + /** + * Wildcard string prefix to use for querying all errors of the item. + */ + @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String errorPrefix; + + /** + * Wildcard string prefix to use for querying all sub-tem results of the + * item. + */ + @JsonProperty(value = "resultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String resultPrefix; + + /** + * Get name of the item. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * 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 state of migration. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get number of items. + * + * @return the itemsCount value + */ + public Long itemsCount() { + return this.itemsCount; + } + + /** + * Get number of successfully completed items. + * + * @return the itemsCompletedCount value + */ + public Long itemsCompletedCount() { + return this.itemsCompletedCount; + } + + /** + * Get wildcard string prefix to use for querying all errors of the item. + * + * @return the errorPrefix value + */ + public String errorPrefix() { + return this.errorPrefix; + } + + /** + * Get wildcard string prefix to use for querying all sub-tem results of the item. + * + * @return the resultPrefix value + */ + public String resultPrefix() { + return this.resultPrefix; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationError.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationError.java new file mode 100644 index 000000000000..10c90b0402c8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationError.java @@ -0,0 +1,58 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration Task errors. + */ +public class DataMigrationError { + /** + * Error description. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Type of error. Possible values include: 'Default', 'Warning', 'Error'. + */ + @JsonProperty(value = "type") + private ErrorType type; + + /** + * Get error description. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get type of error. Possible values include: 'Default', 'Warning', 'Error'. + * + * @return the type value + */ + public ErrorType type() { + return this.type; + } + + /** + * Set type of error. Possible values include: 'Default', 'Warning', 'Error'. + * + * @param type the type value to set + * @return the DataMigrationError object itself. + */ + public DataMigrationError withType(ErrorType type) { + this.type = type; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationProjectMetadata.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationProjectMetadata.java new file mode 100644 index 000000000000..df459a2c4de6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationProjectMetadata.java @@ -0,0 +1,138 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Common metadata for migration projects. + */ +public class DataMigrationProjectMetadata { + /** + * Source server name. + */ + @JsonProperty(value = "sourceServerName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerName; + + /** + * Source server port number. + */ + @JsonProperty(value = "sourceServerPort", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerPort; + + /** + * Source username. + */ + @JsonProperty(value = "sourceUsername", access = JsonProperty.Access.WRITE_ONLY) + private String sourceUsername; + + /** + * Target server name. + */ + @JsonProperty(value = "targetServerName", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerName; + + /** + * Target username. + */ + @JsonProperty(value = "targetUsername", access = JsonProperty.Access.WRITE_ONLY) + private String targetUsername; + + /** + * Target database name. + */ + @JsonProperty(value = "targetDbName", access = JsonProperty.Access.WRITE_ONLY) + private String targetDbName; + + /** + * Whether target connection is Windows authentication. + */ + @JsonProperty(value = "targetUsingWinAuth", access = JsonProperty.Access.WRITE_ONLY) + private Boolean targetUsingWinAuth; + + /** + * List of tables selected for migration. + */ + @JsonProperty(value = "selectedMigrationTables", access = JsonProperty.Access.WRITE_ONLY) + private List selectedMigrationTables; + + /** + * Get source server name. + * + * @return the sourceServerName value + */ + public String sourceServerName() { + return this.sourceServerName; + } + + /** + * Get source server port number. + * + * @return the sourceServerPort value + */ + public String sourceServerPort() { + return this.sourceServerPort; + } + + /** + * Get source username. + * + * @return the sourceUsername value + */ + public String sourceUsername() { + return this.sourceUsername; + } + + /** + * Get target server name. + * + * @return the targetServerName value + */ + public String targetServerName() { + return this.targetServerName; + } + + /** + * Get target username. + * + * @return the targetUsername value + */ + public String targetUsername() { + return this.targetUsername; + } + + /** + * Get target database name. + * + * @return the targetDbName value + */ + public String targetDbName() { + return this.targetDbName; + } + + /** + * Get whether target connection is Windows authentication. + * + * @return the targetUsingWinAuth value + */ + public Boolean targetUsingWinAuth() { + return this.targetUsingWinAuth; + } + + /** + * Get list of tables selected for migration. + * + * @return the selectedMigrationTables value + */ + public List selectedMigrationTables() { + return this.selectedMigrationTables; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationService.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationService.java new file mode 100644 index 000000000000..36352b2dd516 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationService.java @@ -0,0 +1,206 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +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.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationServiceInner; + +/** + * Type representing DataMigrationService. + */ +public interface DataMigrationService extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the provisioningState value. + */ + ServiceProvisioningState provisioningState(); + + /** + * @return the publicKey value. + */ + String publicKey(); + + /** + * @return the sku value. + */ + ServiceSku sku(); + + /** + * @return the virtualSubnetId value. + */ + String virtualSubnetId(); + + /** + * The entirety of the DataMigrationService definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithVirtualSubnetId, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataMigrationService definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataMigrationService definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the DataMigrationService definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the datamigrationservice definition allowing to specify VirtualSubnetId. + */ + interface WithVirtualSubnetId { + /** + * Specifies virtualSubnetId. + * @param virtualSubnetId The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined + * @return the next definition stage +*/ + WithCreate withVirtualSubnetId(String virtualSubnetId); + } + + /** + * The stage of the datamigrationservice definition allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag HTTP strong entity tag value. Ignored if submitted + * @return the next definition stage + */ + WithCreate withEtag(String etag); + } + + /** + * The stage of the datamigrationservice definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind The resource kind. Only 'vm' (the default) is supported + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the datamigrationservice definition allowing to specify PublicKey. + */ + interface WithPublicKey { + /** + * Specifies publicKey. + * @param publicKey The public key of the service, used to encrypt secrets sent to the service + * @return the next definition stage + */ + WithCreate withPublicKey(String publicKey); + } + + /** + * The stage of the datamigrationservice definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Service SKU + * @return the next definition stage + */ + WithCreate withSku(ServiceSku sku); + } + + /** + * 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, Resource.DefinitionWithTags, DefinitionStages.WithEtag, DefinitionStages.WithKind, DefinitionStages.WithPublicKey, DefinitionStages.WithSku { + } + } + /** + * The template for a DataMigrationService update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithEtag, UpdateStages.WithKind, UpdateStages.WithPublicKey, UpdateStages.WithSku { + } + + /** + * Grouping of DataMigrationService update stages. + */ + interface UpdateStages { + /** + * The stage of the datamigrationservice update allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag HTTP strong entity tag value. Ignored if submitted + * @return the next update stage + */ + Update withEtag(String etag); + } + + /** + * The stage of the datamigrationservice update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind The resource kind. Only 'vm' (the default) is supported + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the datamigrationservice update allowing to specify PublicKey. + */ + interface WithPublicKey { + /** + * Specifies publicKey. + * @param publicKey The public key of the service, used to encrypt secrets sent to the service + * @return the next update stage + */ + Update withPublicKey(String publicKey); + } + + /** + * The stage of the datamigrationservice update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Service SKU + * @return the next update stage + */ + Update withSku(ServiceSku sku); + } + + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationServiceStatusResponse.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationServiceStatusResponse.java new file mode 100644 index 000000000000..cade794d590b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DataMigrationServiceStatusResponse.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationServiceStatusResponseInner; +import java.util.List; + +/** + * Type representing DataMigrationServiceStatusResponse. + */ +public interface DataMigrationServiceStatusResponse extends HasInner, HasManager { + /** + * @return the agentVersion value. + */ + String agentVersion(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the supportedTaskTypes value. + */ + List supportedTaskTypes(); + + /** + * @return the vmSize value. + */ + String vmSize(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Database.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Database.java new file mode 100644 index 000000000000..86f287584be7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Database.java @@ -0,0 +1,463 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about a single database. + */ +public class Database { + /** + * Unique identifier for the database. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Name of the database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * SQL Server compatibility level of database. Possible values include: + * 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', + * 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + */ + @JsonProperty(value = "compatibilityLevel") + private DatabaseCompatLevel compatibilityLevel; + + /** + * Collation name of the database. + */ + @JsonProperty(value = "collation") + private String collation; + + /** + * Name of the server. + */ + @JsonProperty(value = "serverName") + private String serverName; + + /** + * Fully qualified name. + */ + @JsonProperty(value = "fqdn") + private String fqdn; + + /** + * Install id of the database. + */ + @JsonProperty(value = "installId") + private String installId; + + /** + * Version of the server. + */ + @JsonProperty(value = "serverVersion") + private String serverVersion; + + /** + * Edition of the server. + */ + @JsonProperty(value = "serverEdition") + private String serverEdition; + + /** + * Product level of the server (RTM, SP, CTP). + */ + @JsonProperty(value = "serverLevel") + private String serverLevel; + + /** + * Default path of the data files. + */ + @JsonProperty(value = "serverDefaultDataPath") + private String serverDefaultDataPath; + + /** + * Default path of the log files. + */ + @JsonProperty(value = "serverDefaultLogPath") + private String serverDefaultLogPath; + + /** + * Default path of the backup folder. + */ + @JsonProperty(value = "serverDefaultBackupPath") + private String serverDefaultBackupPath; + + /** + * Number of cores on the server. + */ + @JsonProperty(value = "serverCoreCount") + private Integer serverCoreCount; + + /** + * Number of cores on the server that have VISIBLE ONLINE status. + */ + @JsonProperty(value = "serverVisibleOnlineCoreCount") + private Integer serverVisibleOnlineCoreCount; + + /** + * State of the database. Possible values include: 'Online', 'Restoring', + * 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', + * 'Copying', 'OfflineSecondary'. + */ + @JsonProperty(value = "databaseState") + private DatabaseState databaseState; + + /** + * The unique Server Id. + */ + @JsonProperty(value = "serverId") + private String serverId; + + /** + * Get unique identifier for the database. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique identifier for the database. + * + * @param id the id value to set + * @return the Database object itself. + */ + public Database withId(String id) { + this.id = id; + return this; + } + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the Database object itself. + */ + public Database withName(String name) { + this.name = name; + return this; + } + + /** + * Get sQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + * + * @return the compatibilityLevel value + */ + public DatabaseCompatLevel compatibilityLevel() { + return this.compatibilityLevel; + } + + /** + * Set sQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + * + * @param compatibilityLevel the compatibilityLevel value to set + * @return the Database object itself. + */ + public Database withCompatibilityLevel(DatabaseCompatLevel compatibilityLevel) { + this.compatibilityLevel = compatibilityLevel; + return this; + } + + /** + * Get collation name of the database. + * + * @return the collation value + */ + public String collation() { + return this.collation; + } + + /** + * Set collation name of the database. + * + * @param collation the collation value to set + * @return the Database object itself. + */ + public Database withCollation(String collation) { + this.collation = collation; + return this; + } + + /** + * Get name of the server. + * + * @return the serverName value + */ + public String serverName() { + return this.serverName; + } + + /** + * Set name of the server. + * + * @param serverName the serverName value to set + * @return the Database object itself. + */ + public Database withServerName(String serverName) { + this.serverName = serverName; + return this; + } + + /** + * Get fully qualified name. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set fully qualified name. + * + * @param fqdn the fqdn value to set + * @return the Database object itself. + */ + public Database withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get install id of the database. + * + * @return the installId value + */ + public String installId() { + return this.installId; + } + + /** + * Set install id of the database. + * + * @param installId the installId value to set + * @return the Database object itself. + */ + public Database withInstallId(String installId) { + this.installId = installId; + return this; + } + + /** + * Get version of the server. + * + * @return the serverVersion value + */ + public String serverVersion() { + return this.serverVersion; + } + + /** + * Set version of the server. + * + * @param serverVersion the serverVersion value to set + * @return the Database object itself. + */ + public Database withServerVersion(String serverVersion) { + this.serverVersion = serverVersion; + return this; + } + + /** + * Get edition of the server. + * + * @return the serverEdition value + */ + public String serverEdition() { + return this.serverEdition; + } + + /** + * Set edition of the server. + * + * @param serverEdition the serverEdition value to set + * @return the Database object itself. + */ + public Database withServerEdition(String serverEdition) { + this.serverEdition = serverEdition; + return this; + } + + /** + * Get product level of the server (RTM, SP, CTP). + * + * @return the serverLevel value + */ + public String serverLevel() { + return this.serverLevel; + } + + /** + * Set product level of the server (RTM, SP, CTP). + * + * @param serverLevel the serverLevel value to set + * @return the Database object itself. + */ + public Database withServerLevel(String serverLevel) { + this.serverLevel = serverLevel; + return this; + } + + /** + * Get default path of the data files. + * + * @return the serverDefaultDataPath value + */ + public String serverDefaultDataPath() { + return this.serverDefaultDataPath; + } + + /** + * Set default path of the data files. + * + * @param serverDefaultDataPath the serverDefaultDataPath value to set + * @return the Database object itself. + */ + public Database withServerDefaultDataPath(String serverDefaultDataPath) { + this.serverDefaultDataPath = serverDefaultDataPath; + return this; + } + + /** + * Get default path of the log files. + * + * @return the serverDefaultLogPath value + */ + public String serverDefaultLogPath() { + return this.serverDefaultLogPath; + } + + /** + * Set default path of the log files. + * + * @param serverDefaultLogPath the serverDefaultLogPath value to set + * @return the Database object itself. + */ + public Database withServerDefaultLogPath(String serverDefaultLogPath) { + this.serverDefaultLogPath = serverDefaultLogPath; + return this; + } + + /** + * Get default path of the backup folder. + * + * @return the serverDefaultBackupPath value + */ + public String serverDefaultBackupPath() { + return this.serverDefaultBackupPath; + } + + /** + * Set default path of the backup folder. + * + * @param serverDefaultBackupPath the serverDefaultBackupPath value to set + * @return the Database object itself. + */ + public Database withServerDefaultBackupPath(String serverDefaultBackupPath) { + this.serverDefaultBackupPath = serverDefaultBackupPath; + return this; + } + + /** + * Get number of cores on the server. + * + * @return the serverCoreCount value + */ + public Integer serverCoreCount() { + return this.serverCoreCount; + } + + /** + * Set number of cores on the server. + * + * @param serverCoreCount the serverCoreCount value to set + * @return the Database object itself. + */ + public Database withServerCoreCount(Integer serverCoreCount) { + this.serverCoreCount = serverCoreCount; + return this; + } + + /** + * Get number of cores on the server that have VISIBLE ONLINE status. + * + * @return the serverVisibleOnlineCoreCount value + */ + public Integer serverVisibleOnlineCoreCount() { + return this.serverVisibleOnlineCoreCount; + } + + /** + * Set number of cores on the server that have VISIBLE ONLINE status. + * + * @param serverVisibleOnlineCoreCount the serverVisibleOnlineCoreCount value to set + * @return the Database object itself. + */ + public Database withServerVisibleOnlineCoreCount(Integer serverVisibleOnlineCoreCount) { + this.serverVisibleOnlineCoreCount = serverVisibleOnlineCoreCount; + return this; + } + + /** + * Get state of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'. + * + * @return the databaseState value + */ + public DatabaseState databaseState() { + return this.databaseState; + } + + /** + * Set state of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'. + * + * @param databaseState the databaseState value to set + * @return the Database object itself. + */ + public Database withDatabaseState(DatabaseState databaseState) { + this.databaseState = databaseState; + return this; + } + + /** + * Get the unique Server Id. + * + * @return the serverId value + */ + public String serverId() { + return this.serverId; + } + + /** + * Set the unique Server Id. + * + * @param serverId the serverId value to set + * @return the Database object itself. + */ + public Database withServerId(String serverId) { + this.serverId = serverId; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseCompatLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseCompatLevel.java new file mode 100644 index 000000000000..52b00c7405c1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseCompatLevel.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabaseCompatLevel. + */ +public final class DatabaseCompatLevel extends ExpandableStringEnum { + /** Static value CompatLevel80 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL80 = fromString("CompatLevel80"); + + /** Static value CompatLevel90 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL90 = fromString("CompatLevel90"); + + /** Static value CompatLevel100 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL100 = fromString("CompatLevel100"); + + /** Static value CompatLevel110 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL110 = fromString("CompatLevel110"); + + /** Static value CompatLevel120 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL120 = fromString("CompatLevel120"); + + /** Static value CompatLevel130 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL130 = fromString("CompatLevel130"); + + /** Static value CompatLevel140 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL140 = fromString("CompatLevel140"); + + /** + * Creates or finds a DatabaseCompatLevel from its string representation. + * @param name a name to look for + * @return the corresponding DatabaseCompatLevel + */ + @JsonCreator + public static DatabaseCompatLevel fromString(String name) { + return fromString(name, DatabaseCompatLevel.class); + } + + /** + * @return known DatabaseCompatLevel values + */ + public static Collection values() { + return values(DatabaseCompatLevel.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileInfo.java new file mode 100644 index 000000000000..4ccb35c56b69 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileInfo.java @@ -0,0 +1,200 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database file specific information. + */ +public class DatabaseFileInfo { + /** + * Name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * Unique identifier for database file. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Logical name of the file. + */ + @JsonProperty(value = "logicalName") + private String logicalName; + + /** + * Operating-system full path of the file. + */ + @JsonProperty(value = "physicalFullName") + private String physicalFullName; + + /** + * Suggested full path of the file for restoring. + */ + @JsonProperty(value = "restoreFullName") + private String restoreFullName; + + /** + * Database file type. Possible values include: 'Rows', 'Log', + * 'Filestream', 'NotSupported', 'Fulltext'. + */ + @JsonProperty(value = "fileType") + private DatabaseFileType fileType; + + /** + * Size of the file in megabytes. + */ + @JsonProperty(value = "sizeMB") + private Double sizeMB; + + /** + * Get name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set name of the database. + * + * @param databaseName the databaseName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get unique identifier for database file. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique identifier for database file. + * + * @param id the id value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withId(String id) { + this.id = id; + return this; + } + + /** + * Get logical name of the file. + * + * @return the logicalName value + */ + public String logicalName() { + return this.logicalName; + } + + /** + * Set logical name of the file. + * + * @param logicalName the logicalName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withLogicalName(String logicalName) { + this.logicalName = logicalName; + return this; + } + + /** + * Get operating-system full path of the file. + * + * @return the physicalFullName value + */ + public String physicalFullName() { + return this.physicalFullName; + } + + /** + * Set operating-system full path of the file. + * + * @param physicalFullName the physicalFullName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withPhysicalFullName(String physicalFullName) { + this.physicalFullName = physicalFullName; + return this; + } + + /** + * Get suggested full path of the file for restoring. + * + * @return the restoreFullName value + */ + public String restoreFullName() { + return this.restoreFullName; + } + + /** + * Set suggested full path of the file for restoring. + * + * @param restoreFullName the restoreFullName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withRestoreFullName(String restoreFullName) { + this.restoreFullName = restoreFullName; + return this; + } + + /** + * Get database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @return the fileType value + */ + public DatabaseFileType fileType() { + return this.fileType; + } + + /** + * Set database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @param fileType the fileType value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withFileType(DatabaseFileType fileType) { + this.fileType = fileType; + return this; + } + + /** + * Get size of the file in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + + /** + * Set size of the file in megabytes. + * + * @param sizeMB the sizeMB value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withSizeMB(Double sizeMB) { + this.sizeMB = sizeMB; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileInput.java new file mode 100644 index 000000000000..da2158237799 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileInput.java @@ -0,0 +1,148 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database file specific information for input. + */ +public class DatabaseFileInput { + /** + * Unique identifier for database file. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Logical name of the file. + */ + @JsonProperty(value = "logicalName") + private String logicalName; + + /** + * Operating-system full path of the file. + */ + @JsonProperty(value = "physicalFullName") + private String physicalFullName; + + /** + * Suggested full path of the file for restoring. + */ + @JsonProperty(value = "restoreFullName") + private String restoreFullName; + + /** + * Database file type. Possible values include: 'Rows', 'Log', + * 'Filestream', 'NotSupported', 'Fulltext'. + */ + @JsonProperty(value = "fileType") + private DatabaseFileType fileType; + + /** + * Get unique identifier for database file. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique identifier for database file. + * + * @param id the id value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withId(String id) { + this.id = id; + return this; + } + + /** + * Get logical name of the file. + * + * @return the logicalName value + */ + public String logicalName() { + return this.logicalName; + } + + /** + * Set logical name of the file. + * + * @param logicalName the logicalName value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withLogicalName(String logicalName) { + this.logicalName = logicalName; + return this; + } + + /** + * Get operating-system full path of the file. + * + * @return the physicalFullName value + */ + public String physicalFullName() { + return this.physicalFullName; + } + + /** + * Set operating-system full path of the file. + * + * @param physicalFullName the physicalFullName value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withPhysicalFullName(String physicalFullName) { + this.physicalFullName = physicalFullName; + return this; + } + + /** + * Get suggested full path of the file for restoring. + * + * @return the restoreFullName value + */ + public String restoreFullName() { + return this.restoreFullName; + } + + /** + * Set suggested full path of the file for restoring. + * + * @param restoreFullName the restoreFullName value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withRestoreFullName(String restoreFullName) { + this.restoreFullName = restoreFullName; + return this; + } + + /** + * Get database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @return the fileType value + */ + public DatabaseFileType fileType() { + return this.fileType; + } + + /** + * Set database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @param fileType the fileType value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withFileType(DatabaseFileType fileType) { + this.fileType = fileType; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileType.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileType.java new file mode 100644 index 000000000000..87a4d9800a81 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseFileType.java @@ -0,0 +1,50 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabaseFileType. + */ +public final class DatabaseFileType extends ExpandableStringEnum { + /** Static value Rows for DatabaseFileType. */ + public static final DatabaseFileType ROWS = fromString("Rows"); + + /** Static value Log for DatabaseFileType. */ + public static final DatabaseFileType LOG = fromString("Log"); + + /** Static value Filestream for DatabaseFileType. */ + public static final DatabaseFileType FILESTREAM = fromString("Filestream"); + + /** Static value NotSupported for DatabaseFileType. */ + public static final DatabaseFileType NOT_SUPPORTED = fromString("NotSupported"); + + /** Static value Fulltext for DatabaseFileType. */ + public static final DatabaseFileType FULLTEXT = fromString("Fulltext"); + + /** + * Creates or finds a DatabaseFileType from its string representation. + * @param name a name to look for + * @return the corresponding DatabaseFileType + */ + @JsonCreator + public static DatabaseFileType fromString(String name) { + return fromString(name, DatabaseFileType.class); + } + + /** + * @return known DatabaseFileType values + */ + public static Collection values() { + return values(DatabaseFileType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseInfo.java new file mode 100644 index 000000000000..03affa8c820d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseInfo.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Project Database Details. + */ +public class DatabaseInfo { + /** + * Name of the database. + */ + @JsonProperty(value = "sourceDatabaseName", required = true) + private String sourceDatabaseName; + + /** + * Get name of the database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Set name of the database. + * + * @param sourceDatabaseName the sourceDatabaseName value to set + * @return the DatabaseInfo object itself. + */ + public DatabaseInfo withSourceDatabaseName(String sourceDatabaseName) { + this.sourceDatabaseName = sourceDatabaseName; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseMigrationStage.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseMigrationStage.java new file mode 100644 index 000000000000..c51fb51b1d5f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseMigrationStage.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabaseMigrationStage. + */ +public final class DatabaseMigrationStage extends ExpandableStringEnum { + /** Static value None for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage NONE = fromString("None"); + + /** Static value Initialize for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage INITIALIZE = fromString("Initialize"); + + /** Static value Backup for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage BACKUP = fromString("Backup"); + + /** Static value FileCopy for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage FILE_COPY = fromString("FileCopy"); + + /** Static value Restore for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage RESTORE = fromString("Restore"); + + /** Static value Completed for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage COMPLETED = fromString("Completed"); + + /** + * Creates or finds a DatabaseMigrationStage from its string representation. + * @param name a name to look for + * @return the corresponding DatabaseMigrationStage + */ + @JsonCreator + public static DatabaseMigrationStage fromString(String name) { + return fromString(name, DatabaseMigrationStage.class); + } + + /** + * @return known DatabaseMigrationStage values + */ + public static Collection values() { + return values(DatabaseMigrationStage.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseObjectName.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseObjectName.java new file mode 100644 index 000000000000..bfb5a1c36744 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseObjectName.java @@ -0,0 +1,89 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A representation of the name of an object in a database. + */ +public class DatabaseObjectName { + /** + * The unescaped name of the database containing the object. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * The unescaped name of the object. + */ + @JsonProperty(value = "objectName", access = JsonProperty.Access.WRITE_ONLY) + private String objectName; + + /** + * The unescaped name of the schema containing the object. + */ + @JsonProperty(value = "schemaName", access = JsonProperty.Access.WRITE_ONLY) + private String schemaName; + + /** + * Type of the object in the database. Possible values include: + * 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + */ + @JsonProperty(value = "objectType") + private ObjectType objectType; + + /** + * Get the unescaped name of the database containing the object. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Get the unescaped name of the object. + * + * @return the objectName value + */ + public String objectName() { + return this.objectName; + } + + /** + * Get the unescaped name of the schema containing the object. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Get type of the object in the database. Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @return the objectType value + */ + public ObjectType objectType() { + return this.objectType; + } + + /** + * Set type of the object in the database. Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @param objectType the objectType value to set + * @return the DatabaseObjectName object itself. + */ + public DatabaseObjectName withObjectType(ObjectType objectType) { + this.objectType = objectType; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseState.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseState.java new file mode 100644 index 000000000000..22dba20312cb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseState.java @@ -0,0 +1,62 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabaseState. + */ +public final class DatabaseState extends ExpandableStringEnum { + /** Static value Online for DatabaseState. */ + public static final DatabaseState ONLINE = fromString("Online"); + + /** Static value Restoring for DatabaseState. */ + public static final DatabaseState RESTORING = fromString("Restoring"); + + /** Static value Recovering for DatabaseState. */ + public static final DatabaseState RECOVERING = fromString("Recovering"); + + /** Static value RecoveryPending for DatabaseState. */ + public static final DatabaseState RECOVERY_PENDING = fromString("RecoveryPending"); + + /** Static value Suspect for DatabaseState. */ + public static final DatabaseState SUSPECT = fromString("Suspect"); + + /** Static value Emergency for DatabaseState. */ + public static final DatabaseState EMERGENCY = fromString("Emergency"); + + /** Static value Offline for DatabaseState. */ + public static final DatabaseState OFFLINE = fromString("Offline"); + + /** Static value Copying for DatabaseState. */ + public static final DatabaseState COPYING = fromString("Copying"); + + /** Static value OfflineSecondary for DatabaseState. */ + public static final DatabaseState OFFLINE_SECONDARY = fromString("OfflineSecondary"); + + /** + * Creates or finds a DatabaseState from its string representation. + * @param name a name to look for + * @return the corresponding DatabaseState + */ + @JsonCreator + public static DatabaseState fromString(String name) { + return fromString(name, DatabaseState.class); + } + + /** + * @return known DatabaseState values + */ + public static Collection values() { + return values(DatabaseState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseSummaryResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseSummaryResult.java new file mode 100644 index 000000000000..c5c75ae32379 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseSummaryResult.java @@ -0,0 +1,32 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Summary of database results in the migration. + */ +public class DatabaseSummaryResult extends DataItemMigrationSummaryResult { + /** + * Size of the database in megabytes. + */ + @JsonProperty(value = "sizeMB", access = JsonProperty.Access.WRITE_ONLY) + private Double sizeMB; + + /** + * Get size of the database in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseTable.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseTable.java new file mode 100644 index 000000000000..1fcec9402dfb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/DatabaseTable.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Table properties. + */ +public class DatabaseTable { + /** + * Indicates whether table is empty or not. + */ + @JsonProperty(value = "hasRows", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasRows; + + /** + * Schema-qualified name of the table. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Get indicates whether table is empty or not. + * + * @return the hasRows value + */ + public Boolean hasRows() { + return this.hasRows; + } + + /** + * Get schema-qualified name of the table. + * + * @return the name value + */ + public String name() { + return this.name; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ErrorType.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ErrorType.java new file mode 100644 index 000000000000..dfc5b712ecfb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ErrorType.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ErrorType. + */ +public final class ErrorType extends ExpandableStringEnum { + /** Static value Default for ErrorType. */ + public static final ErrorType DEFAULT = fromString("Default"); + + /** Static value Warning for ErrorType. */ + public static final ErrorType WARNING = fromString("Warning"); + + /** Static value Error for ErrorType. */ + public static final ErrorType ERROR = fromString("Error"); + + /** + * Creates or finds a ErrorType from its string representation. + * @param name a name to look for + * @return the corresponding ErrorType + */ + @JsonCreator + public static ErrorType fromString(String name) { + return fromString(name, ErrorType.class); + } + + /** + * @return known ErrorType values + */ + public static Collection values() { + return values(ErrorType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ExecutionStatistics.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ExecutionStatistics.java new file mode 100644 index 000000000000..53c3a39ea0bd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ExecutionStatistics.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description about the errors happen while performing migration validation. + */ +public class ExecutionStatistics { + /** + * No. of query executions. + */ + @JsonProperty(value = "executionCount") + private Long executionCount; + + /** + * CPU Time in millisecond(s) for the query execution. + */ + @JsonProperty(value = "cpuTimeMs") + private Double cpuTimeMs; + + /** + * Time taken in millisecond(s) for executing the query. + */ + @JsonProperty(value = "elapsedTimeMs") + private Double elapsedTimeMs; + + /** + * Dictionary of sql query execution wait types and the respective + * statistics. + */ + @JsonProperty(value = "waitStats") + private Map waitStats; + + /** + * Indicates whether the query resulted in an error. + */ + @JsonProperty(value = "hasErrors") + private Boolean hasErrors; + + /** + * List of sql Errors. + */ + @JsonProperty(value = "sqlErrors") + private List sqlErrors; + + /** + * Get no. of query executions. + * + * @return the executionCount value + */ + public Long executionCount() { + return this.executionCount; + } + + /** + * Set no. of query executions. + * + * @param executionCount the executionCount value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withExecutionCount(Long executionCount) { + this.executionCount = executionCount; + return this; + } + + /** + * Get cPU Time in millisecond(s) for the query execution. + * + * @return the cpuTimeMs value + */ + public Double cpuTimeMs() { + return this.cpuTimeMs; + } + + /** + * Set cPU Time in millisecond(s) for the query execution. + * + * @param cpuTimeMs the cpuTimeMs value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withCpuTimeMs(Double cpuTimeMs) { + this.cpuTimeMs = cpuTimeMs; + return this; + } + + /** + * Get time taken in millisecond(s) for executing the query. + * + * @return the elapsedTimeMs value + */ + public Double elapsedTimeMs() { + return this.elapsedTimeMs; + } + + /** + * Set time taken in millisecond(s) for executing the query. + * + * @param elapsedTimeMs the elapsedTimeMs value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withElapsedTimeMs(Double elapsedTimeMs) { + this.elapsedTimeMs = elapsedTimeMs; + return this; + } + + /** + * Get dictionary of sql query execution wait types and the respective statistics. + * + * @return the waitStats value + */ + public Map waitStats() { + return this.waitStats; + } + + /** + * Set dictionary of sql query execution wait types and the respective statistics. + * + * @param waitStats the waitStats value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withWaitStats(Map waitStats) { + this.waitStats = waitStats; + return this; + } + + /** + * Get indicates whether the query resulted in an error. + * + * @return the hasErrors value + */ + public Boolean hasErrors() { + return this.hasErrors; + } + + /** + * Set indicates whether the query resulted in an error. + * + * @param hasErrors the hasErrors value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withHasErrors(Boolean hasErrors) { + this.hasErrors = hasErrors; + return this; + } + + /** + * Get list of sql Errors. + * + * @return the sqlErrors value + */ + public List sqlErrors() { + return this.sqlErrors; + } + + /** + * Set list of sql Errors. + * + * @param sqlErrors the sqlErrors value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withSqlErrors(List sqlErrors) { + this.sqlErrors = sqlErrors; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/FileShare.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/FileShare.java new file mode 100644 index 000000000000..41391b29eb87 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/FileShare.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * File share information with Path, Username, and Password. + */ +public class FileShare { + /** + * User name credential to connect to the share location. + */ + @JsonProperty(value = "userName") + private String userName; + + /** + * Password credential used to connect to the share location. + */ + @JsonProperty(value = "password") + private String password; + + /** + * The folder path for this share. + */ + @JsonProperty(value = "path", required = true) + private String path; + + /** + * Get user name credential to connect to the share location. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Set user name credential to connect to the share location. + * + * @param userName the userName value to set + * @return the FileShare object itself. + */ + public FileShare withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get password credential used to connect to the share location. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set password credential used to connect to the share location. + * + * @param password the password value to set + * @return the FileShare object itself. + */ + public FileShare withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the folder path for this share. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set the folder path for this share. + * + * @param path the path value to set + * @return the FileShare object itself. + */ + public FileShare withPath(String path) { + this.path = path; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskInput.java new file mode 100644 index 000000000000..36dbbe3103d1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskInput.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that collects user tables for the given list of + * databases. + */ +public class GetUserTablesSqlTaskInput { + /** + * Connection information for SQL Server. + */ + @JsonProperty(value = "connectionInfo", required = true) + private SqlConnectionInfo connectionInfo; + + /** + * List of database names to collect tables for. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Get connection information for SQL Server. + * + * @return the connectionInfo value + */ + public SqlConnectionInfo connectionInfo() { + return this.connectionInfo; + } + + /** + * Set connection information for SQL Server. + * + * @param connectionInfo the connectionInfo value to set + * @return the GetUserTablesSqlTaskInput object itself. + */ + public GetUserTablesSqlTaskInput withConnectionInfo(SqlConnectionInfo connectionInfo) { + this.connectionInfo = connectionInfo; + return this; + } + + /** + * Get list of database names to collect tables for. + * + * @return the selectedDatabases value + */ + public List selectedDatabases() { + return this.selectedDatabases; + } + + /** + * Set list of database names to collect tables for. + * + * @param selectedDatabases the selectedDatabases value to set + * @return the GetUserTablesSqlTaskInput object itself. + */ + public GetUserTablesSqlTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskOutput.java new file mode 100644 index 000000000000..baf0a73de79f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskOutput.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output of the task that collects user tables for the given list of + * databases. + */ +public class GetUserTablesSqlTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Mapping from database name to list of tables. + */ + @JsonProperty(value = "databasesToTables", access = JsonProperty.Access.WRITE_ONLY) + private Map> databasesToTables; + + /** + * Validation errors. + */ + @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 mapping from database name to list of tables. + * + * @return the databasesToTables value + */ + public Map> databasesToTables() { + return this.databasesToTables; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskProperties.java new file mode 100644 index 000000000000..24503113ab12 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/GetUserTablesSqlTaskProperties.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.azuredatabasemigrationservice.v2018_03_31_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") +@JsonTypeName("GetUserTables.Sql") +public class GetUserTablesSqlTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private GetUserTablesSqlTaskInput 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 GetUserTablesSqlTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the GetUserTablesSqlTaskProperties object itself. + */ + public GetUserTablesSqlTaskProperties withInput(GetUserTablesSqlTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/LoginMigrationStage.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/LoginMigrationStage.java new file mode 100644 index 000000000000..eb446bd8dab9 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/LoginMigrationStage.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for LoginMigrationStage. + */ +public enum LoginMigrationStage { + /** Enum value None. */ + NONE("None"), + + /** Enum value Initialize. */ + INITIALIZE("Initialize"), + + /** Enum value LoginMigration. */ + LOGIN_MIGRATION("LoginMigration"), + + /** Enum value EstablishUserMapping. */ + ESTABLISH_USER_MAPPING("EstablishUserMapping"), + + /** Enum value AssignRoleMembership. */ + ASSIGN_ROLE_MEMBERSHIP("AssignRoleMembership"), + + /** Enum value AssignRoleOwnership. */ + ASSIGN_ROLE_OWNERSHIP("AssignRoleOwnership"), + + /** Enum value EstablishServerPermissions. */ + ESTABLISH_SERVER_PERMISSIONS("EstablishServerPermissions"), + + /** Enum value EstablishObjectPermissions. */ + ESTABLISH_OBJECT_PERMISSIONS("EstablishObjectPermissions"), + + /** Enum value Completed. */ + COMPLETED("Completed"); + + /** The actual serialized value for a LoginMigrationStage instance. */ + private String value; + + LoginMigrationStage(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a LoginMigrationStage instance. + * + * @param value the serialized value to parse. + * @return the parsed LoginMigrationStage object, or null if unable to parse. + */ + @JsonCreator + public static LoginMigrationStage fromString(String value) { + LoginMigrationStage[] items = LoginMigrationStage.values(); + for (LoginMigrationStage item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/LoginType.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/LoginType.java new file mode 100644 index 000000000000..04998a8e9a89 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/LoginType.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for LoginType. + */ +public enum LoginType { + /** Enum value WindowsUser. */ + WINDOWS_USER("WindowsUser"), + + /** Enum value WindowsGroup. */ + WINDOWS_GROUP("WindowsGroup"), + + /** Enum value SqlLogin. */ + SQL_LOGIN("SqlLogin"), + + /** Enum value Certificate. */ + CERTIFICATE("Certificate"), + + /** Enum value AsymmetricKey. */ + ASYMMETRIC_KEY("AsymmetricKey"), + + /** Enum value ExternalUser. */ + EXTERNAL_USER("ExternalUser"), + + /** Enum value ExternalGroup. */ + EXTERNAL_GROUP("ExternalGroup"); + + /** The actual serialized value for a LoginType instance. */ + private String value; + + LoginType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a LoginType instance. + * + * @param value the serialized value to parse. + * @return the parsed LoginType object, or null if unable to parse. + */ + @JsonCreator + public static LoginType fromString(String value) { + LoginType[] items = LoginType.values(); + for (LoginType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbDatabaseInput.java new file mode 100644 index 000000000000..7757da3649b4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbDatabaseInput.java @@ -0,0 +1,123 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for SQL to Azure SQL DB migration task inputs. + */ +public class MigrateSqlServerSqlDbDatabaseInput { + /** + * Name of the database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Name of target database. Note: Target database will be truncated before + * starting migration. + */ + @JsonProperty(value = "targetDatabaseName") + private String targetDatabaseName; + + /** + * Whether to set database read only before migration. + */ + @JsonProperty(value = "makeSourceDbReadOnly") + private Boolean makeSourceDbReadOnly; + + /** + * Mapping of source to target tables. + */ + @JsonProperty(value = "tableMap") + private Map tableMap; + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withName(String name) { + this.name = name; + 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 MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withTargetDatabaseName(String targetDatabaseName) { + this.targetDatabaseName = targetDatabaseName; + return this; + } + + /** + * Get whether to set database read only before migration. + * + * @return the makeSourceDbReadOnly value + */ + public Boolean makeSourceDbReadOnly() { + return this.makeSourceDbReadOnly; + } + + /** + * Set whether to set database read only before migration. + * + * @param makeSourceDbReadOnly the makeSourceDbReadOnly value to set + * @return the MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withMakeSourceDbReadOnly(Boolean makeSourceDbReadOnly) { + this.makeSourceDbReadOnly = makeSourceDbReadOnly; + 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 MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withTableMap(Map tableMap) { + this.tableMap = tableMap; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskInput.java new file mode 100644 index 000000000000..b3e4ea38df11 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskInput.java @@ -0,0 +1,85 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that migrates on-prem SQL Server databases to Azure SQL + * Database. + */ +public class MigrateSqlServerSqlDbTaskInput extends SqlMigrationTaskInput { + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Options for enabling various post migration validations. Available + * options, + * 1.) Data Integrity Check: Performs a checksum based comparison on source + * and target tables after the migration to ensure the correctness of the + * data. + * 2.) Schema Validation: Performs a thorough schema comparison between the + * source and target tables and provides a list of differences between the + * source and target database, 3.) Query Analysis: Executes a set of + * queries picked up automatically either from the Query Plan Cache or + * Query Store and execute them and compares the execution time between the + * source and target database. + */ + @JsonProperty(value = "validationOptions") + private MigrationValidationOptions validationOptions; + + /** + * 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 MigrateSqlServerSqlDbTaskInput object itself. + */ + public MigrateSqlServerSqlDbTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + + /** + * Get options for enabling various post migration validations. Available options, + 1.) Data Integrity Check: Performs a checksum based comparison on source and target tables after the migration to ensure the correctness of the data. + 2.) Schema Validation: Performs a thorough schema comparison between the source and target tables and provides a list of differences between the source and target database, 3.) Query Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or Query Store and execute them and compares the execution time between the source and target database. + * + * @return the validationOptions value + */ + public MigrationValidationOptions validationOptions() { + return this.validationOptions; + } + + /** + * Set options for enabling various post migration validations. Available options, + 1.) Data Integrity Check: Performs a checksum based comparison on source and target tables after the migration to ensure the correctness of the data. + 2.) Schema Validation: Performs a thorough schema comparison between the source and target tables and provides a list of differences between the source and target database, 3.) Query Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or Query Store and execute them and compares the execution time between the source and target database. + * + * @param validationOptions the validationOptions value to set + * @return the MigrateSqlServerSqlDbTaskInput object itself. + */ + public MigrateSqlServerSqlDbTaskInput withValidationOptions(MigrationValidationOptions validationOptions) { + this.validationOptions = validationOptions; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutput.java new file mode 100644 index 000000000000..75ba514f5039 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutput.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.azuredatabasemigrationservice.v2018_03_31_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 on-prem SQL Server databases to Azure SQL + * Database. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrateSqlServerSqlDbTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlDbTaskOutputError.class), + @JsonSubTypes.Type(name = "TableLevelOutput", value = MigrateSqlServerSqlDbTaskOutputTableLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlDbTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlDbTaskOutputMigrationLevel.class) +}) +public class MigrateSqlServerSqlDbTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..345abc1e207d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java @@ -0,0 +1,237 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import org.joda.time.DateTime; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlDbTaskOutputDatabaseLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelOutput") +public class MigrateSqlServerSqlDbTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbTaskOutput { + /** + * Name of the item. + */ + @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; + + /** + * 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 stage that this database is in. Possible values include: + * 'None', 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed'. + */ + @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseMigrationStage stage; + + /** + * Status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Number of objects. + */ + @JsonProperty(value = "numberOfObjects", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfObjects; + + /** + * Number of successfully completed objects. + */ + @JsonProperty(value = "numberOfObjectsCompleted", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfObjectsCompleted; + + /** + * Number of database/object errors. + */ + @JsonProperty(value = "errorCount", access = JsonProperty.Access.WRITE_ONLY) + private Long errorCount; + + /** + * Wildcard string prefix to use for querying all errors of the item. + */ + @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String errorPrefix; + + /** + * Wildcard string prefix to use for querying all sub-tem results of the + * item. + */ + @JsonProperty(value = "resultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String resultPrefix; + + /** + * Migration exceptions and warnings. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Summary of object results in the migration. + */ + @JsonProperty(value = "objectSummary", access = JsonProperty.Access.WRITE_ONLY) + private Map objectSummary; + + /** + * Get name of the item. + * + * @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 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 stage that this database is in. Possible values include: 'None', 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed'. + * + * @return the stage value + */ + public DatabaseMigrationStage stage() { + return this.stage; + } + + /** + * Get status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get number of objects. + * + * @return the numberOfObjects value + */ + public Long numberOfObjects() { + return this.numberOfObjects; + } + + /** + * Get number of successfully completed objects. + * + * @return the numberOfObjectsCompleted value + */ + public Long numberOfObjectsCompleted() { + return this.numberOfObjectsCompleted; + } + + /** + * Get number of database/object errors. + * + * @return the errorCount value + */ + public Long errorCount() { + return this.errorCount; + } + + /** + * Get wildcard string prefix to use for querying all errors of the item. + * + * @return the errorPrefix value + */ + public String errorPrefix() { + return this.errorPrefix; + } + + /** + * Get wildcard string prefix to use for querying all sub-tem results of the item. + * + * @return the resultPrefix value + */ + public String resultPrefix() { + return this.resultPrefix; + } + + /** + * Get migration exceptions and warnings. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + + /** + * Get summary of object results in the migration. + * + * @return the objectSummary value + */ + public Map objectSummary() { + return this.objectSummary; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputError.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputError.java new file mode 100644 index 000000000000..445ac7ea5376 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputError.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlDbTaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ErrorOutput") +public class MigrateSqlServerSqlDbTaskOutputError extends MigrateSqlServerSqlDbTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java new file mode 100644 index 000000000000..111731054878 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java @@ -0,0 +1,248 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import org.joda.time.DateTime; +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlDbTaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrationLevelOutput") +public class MigrateSqlServerSqlDbTaskOutputMigrationLevel extends MigrateSqlServerSqlDbTaskOutput { + /** + * 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; + + /** + * Duration of task execution in seconds. + */ + @JsonProperty(value = "durationInSeconds", access = JsonProperty.Access.WRITE_ONLY) + private Long durationInSeconds; + + /** + * 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 status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Selected databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * Summary of database results in the migration. + */ + @JsonProperty(value = "databaseSummary", access = JsonProperty.Access.WRITE_ONLY) + private Map databaseSummary; + + /** + * Migration Report Result, provides unique url for downloading your + * migration report. + */ + @JsonProperty(value = "migrationReportResult") + private MigrationReportResult migrationReportResult; + + /** + * 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; + + /** + * 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 duration of task execution in seconds. + * + * @return the durationInSeconds value + */ + public Long durationInSeconds() { + return this.durationInSeconds; + } + + /** + * 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 status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get selected databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * Get summary of database results in the migration. + * + * @return the databaseSummary value + */ + public Map databaseSummary() { + return this.databaseSummary; + } + + /** + * Get migration Report Result, provides unique url for downloading your migration report. + * + * @return the migrationReportResult value + */ + public MigrationReportResult migrationReportResult() { + return this.migrationReportResult; + } + + /** + * Set migration Report Result, provides unique url for downloading your migration report. + * + * @param migrationReportResult the migrationReportResult value to set + * @return the MigrateSqlServerSqlDbTaskOutputMigrationLevel object itself. + */ + public MigrateSqlServerSqlDbTaskOutputMigrationLevel withMigrationReportResult(MigrationReportResult migrationReportResult) { + this.migrationReportResult = migrationReportResult; + return this; + } + + /** + * 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; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java new file mode 100644 index 000000000000..88b9a44caa5b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java @@ -0,0 +1,159 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_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 MigrateSqlServerSqlDbTaskOutputTableLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("TableLevelOutput") +public class MigrateSqlServerSqlDbTaskOutputTableLevel extends MigrateSqlServerSqlDbTaskOutput { + /** + * Name of the item. + */ + @JsonProperty(value = "objectName", access = JsonProperty.Access.WRITE_ONLY) + private String objectName; + + /** + * 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 state of migration. Possible values include: 'None', + * 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Number of items. + */ + @JsonProperty(value = "itemsCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCount; + + /** + * Number of successfully completed items. + */ + @JsonProperty(value = "itemsCompletedCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCompletedCount; + + /** + * Wildcard string prefix to use for querying all errors of the item. + */ + @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String errorPrefix; + + /** + * Wildcard string prefix to use for querying all sub-tem results of the + * item. + */ + @JsonProperty(value = "resultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String resultPrefix; + + /** + * Get name of the item. + * + * @return the objectName value + */ + public String objectName() { + return this.objectName; + } + + /** + * 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 state of migration. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get number of items. + * + * @return the itemsCount value + */ + public Long itemsCount() { + return this.itemsCount; + } + + /** + * Get number of successfully completed items. + * + * @return the itemsCompletedCount value + */ + public Long itemsCompletedCount() { + return this.itemsCompletedCount; + } + + /** + * Get wildcard string prefix to use for querying all errors of the item. + * + * @return the errorPrefix value + */ + public String errorPrefix() { + return this.errorPrefix; + } + + /** + * Get wildcard string prefix to use for querying all sub-tem results of the item. + * + * @return the resultPrefix value + */ + public String resultPrefix() { + return this.resultPrefix; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskProperties.java new file mode 100644 index 000000000000..40986d36ca66 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlDbTaskProperties.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.azuredatabasemigrationservice.v2018_03_31_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 on-prem SQL Server databases to Azure + * SQL Database. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Migrate.SqlServer.SqlDb") +public class MigrateSqlServerSqlDbTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateSqlServerSqlDbTaskInput 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 MigrateSqlServerSqlDbTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateSqlServerSqlDbTaskProperties object itself. + */ + public MigrateSqlServerSqlDbTaskProperties withInput(MigrateSqlServerSqlDbTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMIDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMIDatabaseInput.java new file mode 100644 index 000000000000..4249d6faf427 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMIDatabaseInput.java @@ -0,0 +1,96 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for SQL to Azure SQL DB Managed Instance + * migration task inputs. + */ +public class MigrateSqlServerSqlMIDatabaseInput { + /** + * Name of the database. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Name of the database at destination. + */ + @JsonProperty(value = "restoreDatabaseName", required = true) + private String restoreDatabaseName; + + /** + * Backup file share information for backing up this database. + */ + @JsonProperty(value = "backupFileShare") + private FileShare backupFileShare; + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the MigrateSqlServerSqlMIDatabaseInput object itself. + */ + public MigrateSqlServerSqlMIDatabaseInput withName(String name) { + this.name = name; + return this; + } + + /** + * Get name of the database at destination. + * + * @return the restoreDatabaseName value + */ + public String restoreDatabaseName() { + return this.restoreDatabaseName; + } + + /** + * Set name of the database at destination. + * + * @param restoreDatabaseName the restoreDatabaseName value to set + * @return the MigrateSqlServerSqlMIDatabaseInput object itself. + */ + public MigrateSqlServerSqlMIDatabaseInput withRestoreDatabaseName(String restoreDatabaseName) { + this.restoreDatabaseName = restoreDatabaseName; + return this; + } + + /** + * Get backup file share information for backing up this database. + * + * @return the backupFileShare value + */ + public FileShare backupFileShare() { + return this.backupFileShare; + } + + /** + * Set backup file share information for backing up this database. + * + * @param backupFileShare the backupFileShare value to set + * @return the MigrateSqlServerSqlMIDatabaseInput object itself. + */ + public MigrateSqlServerSqlMIDatabaseInput withBackupFileShare(FileShare backupFileShare) { + this.backupFileShare = backupFileShare; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskInput.java new file mode 100644 index 000000000000..105a3cb498bf --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskInput.java @@ -0,0 +1,150 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_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. + */ +public class MigrateSqlServerSqlMITaskInput extends SqlMigrationTaskInput { + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Logins to migrate. + */ + @JsonProperty(value = "selectedLogins") + private List selectedLogins; + + /** + * Agent Jobs to migrate. + */ + @JsonProperty(value = "selectedAgentJobs") + private List selectedAgentJobs; + + /** + * Backup file share information for all selected databases. + */ + @JsonProperty(value = "backupFileShare") + private FileShare backupFileShare; + + /** + * SAS URI of Azure Storage Account Container to be used for storing backup + * files. + */ + @JsonProperty(value = "backupBlobShare", required = true) + private BlobShare backupBlobShare; + + /** + * 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 MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + + /** + * Get logins to migrate. + * + * @return the selectedLogins value + */ + public List selectedLogins() { + return this.selectedLogins; + } + + /** + * Set logins to migrate. + * + * @param selectedLogins the selectedLogins value to set + * @return the MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withSelectedLogins(List selectedLogins) { + this.selectedLogins = selectedLogins; + return this; + } + + /** + * Get agent Jobs to migrate. + * + * @return the selectedAgentJobs value + */ + public List selectedAgentJobs() { + return this.selectedAgentJobs; + } + + /** + * Set agent Jobs to migrate. + * + * @param selectedAgentJobs the selectedAgentJobs value to set + * @return the MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withSelectedAgentJobs(List selectedAgentJobs) { + this.selectedAgentJobs = selectedAgentJobs; + 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 MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withBackupFileShare(FileShare backupFileShare) { + this.backupFileShare = backupFileShare; + return this; + } + + /** + * Get sAS URI of Azure Storage Account Container to be used for storing backup files. + * + * @return the backupBlobShare value + */ + public BlobShare backupBlobShare() { + return this.backupBlobShare; + } + + /** + * Set sAS URI of Azure Storage Account Container to be used for storing backup files. + * + * @param backupBlobShare the backupBlobShare value to set + * @return the MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withBackupBlobShare(BlobShare backupBlobShare) { + this.backupBlobShare = backupBlobShare; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutput.java new file mode 100644 index 000000000000..09faad931edd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutput.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.azuredatabasemigrationservice.v2018_03_31_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. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrateSqlServerSqlMITaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlMITaskOutputError.class), + @JsonSubTypes.Type(name = "LoginLevelOutput", value = MigrateSqlServerSqlMITaskOutputLoginLevel.class), + @JsonSubTypes.Type(name = "AgentJobLevelOutput", value = MigrateSqlServerSqlMITaskOutputAgentJobLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlMITaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlMITaskOutputMigrationLevel.class) +}) +public class MigrateSqlServerSqlMITaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java new file mode 100644 index 000000000000..a53bbf732818 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java @@ -0,0 +1,129 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_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 MigrateSqlServerSqlMITaskOutputAgentJobLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("AgentJobLevelOutput") +public class MigrateSqlServerSqlMITaskOutputAgentJobLevel extends MigrateSqlServerSqlMITaskOutput { + /** + * AgentJob name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The state of the original AgentJob. + */ + @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEnabled; + + /** + * 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; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Migration errors and warnings per job. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Get agentJob name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the state of the original AgentJob. + * + * @return the isEnabled value + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * 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 migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get migration errors and warnings per job. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..de5ae179b058 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.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.azuredatabasemigrationservice.v2018_03_31_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 MigrateSqlServerSqlMITaskOutputDatabaseLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelOutput") +public class MigrateSqlServerSqlMITaskOutputDatabaseLevel extends MigrateSqlServerSqlMITaskOutput { + /** + * Name of the database. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * Size of the database in megabytes. + */ + @JsonProperty(value = "sizeMB", access = JsonProperty.Access.WRITE_ONLY) + private Double sizeMB; + + /** + * 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; + + /** + * Current stage of migration. Possible values include: 'None', + * 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed'. + */ + @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseMigrationStage 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 database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Get size of the database in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + + /** + * 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 current stage of migration. Possible values include: 'None', 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed'. + * + * @return the stage value + */ + public DatabaseMigrationStage 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputError.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputError.java new file mode 100644 index 000000000000..758b96158c6d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputError.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlMITaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ErrorOutput") +public class MigrateSqlServerSqlMITaskOutputError extends MigrateSqlServerSqlMITaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java new file mode 100644 index 000000000000..56eb09af7204 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java @@ -0,0 +1,132 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_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 MigrateSqlServerSqlMITaskOutputLoginLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("LoginLevelOutput") +public class MigrateSqlServerSqlMITaskOutputLoginLevel extends MigrateSqlServerSqlMITaskOutput { + /** + * Login name. + */ + @JsonProperty(value = "loginName", access = JsonProperty.Access.WRITE_ONLY) + private String loginName; + + /** + * Current state of login. Possible values include: 'None', 'InProgress', + * 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Current stage of login. Possible values include: 'None', 'Initialize', + * 'LoginMigration', 'EstablishUserMapping', 'AssignRoleMembership', + * 'AssignRoleOwnership', 'EstablishServerPermissions', + * 'EstablishObjectPermissions', 'Completed'. + */ + @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) + private LoginMigrationStage stage; + + /** + * Login migration start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Login migration end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Login migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Login migration errors and warnings per login. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Get login name. + * + * @return the loginName value + */ + public String loginName() { + return this.loginName; + } + + /** + * Get current state of login. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get current stage of login. Possible values include: 'None', 'Initialize', 'LoginMigration', 'EstablishUserMapping', 'AssignRoleMembership', 'AssignRoleOwnership', 'EstablishServerPermissions', 'EstablishObjectPermissions', 'Completed'. + * + * @return the stage value + */ + public LoginMigrationStage stage() { + return this.stage; + } + + /** + * Get login migration start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get login migration end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get login migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get login migration errors and warnings per login. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java new file mode 100644 index 000000000000..3854e58226e4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java @@ -0,0 +1,252 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import org.joda.time.DateTime; +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlMITaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrationLevelOutput") +public class MigrateSqlServerSqlMITaskOutputMigrationLevel extends MigrateSqlServerSqlMITaskOutput { + /** + * 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; + + /** + * 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; + + /** + * Selected agent jobs as a map from name to id. + */ + @JsonProperty(value = "agentJobs", access = JsonProperty.Access.WRITE_ONLY) + private Map agentJobs; + + /** + * Selected logins as a map from name to id. + */ + @JsonProperty(value = "logins", access = JsonProperty.Access.WRITE_ONLY) + private Map logins; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Map of server role migration results. + */ + @JsonProperty(value = "serverRoleResults", access = JsonProperty.Access.WRITE_ONLY) + private Map serverRoleResults; + + /** + * Map of users to database name of orphaned users. + */ + @JsonProperty(value = "orphanedUsers", access = JsonProperty.Access.WRITE_ONLY) + private Map orphanedUsers; + + /** + * Selected databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * 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; + + /** + * 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 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 selected agent jobs as a map from name to id. + * + * @return the agentJobs value + */ + public Map agentJobs() { + return this.agentJobs; + } + + /** + * Get selected logins as a map from name to id. + * + * @return the logins value + */ + public Map logins() { + return this.logins; + } + + /** + * Get migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get map of server role migration results. + * + * @return the serverRoleResults value + */ + public Map serverRoleResults() { + return this.serverRoleResults; + } + + /** + * Get map of users to database name of orphaned users. + * + * @return the orphanedUsers value + */ + public Map orphanedUsers() { + return this.orphanedUsers; + } + + /** + * Get selected databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * 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; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskProperties.java new file mode 100644 index 000000000000..4c13cd2ce9d8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlMITaskProperties.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.azuredatabasemigrationservice.v2018_03_31_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. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Migrate.SqlServer.AzureSqlDbMI") +public class MigrateSqlServerSqlMITaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateSqlServerSqlMITaskInput 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 MigrateSqlServerSqlMITaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateSqlServerSqlMITaskProperties object itself. + */ + public MigrateSqlServerSqlMITaskProperties withInput(MigrateSqlServerSqlMITaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlServerDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlServerDatabaseInput.java new file mode 100644 index 000000000000..7139c79fd744 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrateSqlServerSqlServerDatabaseInput.java @@ -0,0 +1,122 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for SQL to SQL migration task inputs. + */ +public class MigrateSqlServerSqlServerDatabaseInput { + /** + * Name of the database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Name of the database at destination. + */ + @JsonProperty(value = "restoreDatabaseName") + private String restoreDatabaseName; + + /** + * Backup file share information for this database. + */ + @JsonProperty(value = "backupFileShare") + private FileShare backupFileShare; + + /** + * The list of database files. + */ + @JsonProperty(value = "databaseFiles") + private List databaseFiles; + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the MigrateSqlServerSqlServerDatabaseInput object itself. + */ + public MigrateSqlServerSqlServerDatabaseInput withName(String name) { + this.name = name; + return this; + } + + /** + * Get name of the database at destination. + * + * @return the restoreDatabaseName value + */ + public String restoreDatabaseName() { + return this.restoreDatabaseName; + } + + /** + * Set name of the database at destination. + * + * @param restoreDatabaseName the restoreDatabaseName value to set + * @return the MigrateSqlServerSqlServerDatabaseInput object itself. + */ + public MigrateSqlServerSqlServerDatabaseInput withRestoreDatabaseName(String restoreDatabaseName) { + this.restoreDatabaseName = restoreDatabaseName; + return this; + } + + /** + * Get backup file share information for this database. + * + * @return the backupFileShare value + */ + public FileShare backupFileShare() { + return this.backupFileShare; + } + + /** + * Set backup file share information for this database. + * + * @param backupFileShare the backupFileShare value to set + * @return the MigrateSqlServerSqlServerDatabaseInput object itself. + */ + public MigrateSqlServerSqlServerDatabaseInput withBackupFileShare(FileShare backupFileShare) { + this.backupFileShare = backupFileShare; + return this; + } + + /** + * Get the list of database files. + * + * @return the databaseFiles value + */ + public List databaseFiles() { + return this.databaseFiles; + } + + /** + * Set the list of database files. + * + * @param databaseFiles the databaseFiles value to set + * @return the MigrateSqlServerSqlServerDatabaseInput object itself. + */ + public MigrateSqlServerSqlServerDatabaseInput withDatabaseFiles(List databaseFiles) { + this.databaseFiles = databaseFiles; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationEligibilityInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationEligibilityInfo.java new file mode 100644 index 000000000000..ef8c07fab1bc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationEligibilityInfo.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about migration eligibility of a server object. + */ +public class MigrationEligibilityInfo { + /** + * Whether object is eligible for migration or not. + */ + @JsonProperty(value = "isEligibileForMigration", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEligibileForMigration; + + /** + * Information about eligibility failure for the server object. + */ + @JsonProperty(value = "validationMessages", access = JsonProperty.Access.WRITE_ONLY) + private List validationMessages; + + /** + * Get whether object is eligible for migration or not. + * + * @return the isEligibileForMigration value + */ + public Boolean isEligibileForMigration() { + return this.isEligibileForMigration; + } + + /** + * Get information about eligibility failure for the server object. + * + * @return the validationMessages value + */ + public List validationMessages() { + return this.validationMessages; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationReportResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationReportResult.java new file mode 100644 index 000000000000..1f726f8e9c5c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationReportResult.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration validation report result, contains the url for downloading the + * generated report. + */ +public class MigrationReportResult { + /** + * Migration validation result identifier. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The url of the report. + */ + @JsonProperty(value = "reportUrl") + private String reportUrl; + + /** + * Get migration validation result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set migration validation result identifier. + * + * @param id the id value to set + * @return the MigrationReportResult object itself. + */ + public MigrationReportResult withId(String id) { + this.id = id; + return this; + } + + /** + * Get the url of the report. + * + * @return the reportUrl value + */ + public String reportUrl() { + return this.reportUrl; + } + + /** + * Set the url of the report. + * + * @param reportUrl the reportUrl value to set + * @return the MigrationReportResult object itself. + */ + public MigrationReportResult withReportUrl(String reportUrl) { + this.reportUrl = reportUrl; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationState.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationState.java new file mode 100644 index 000000000000..08e99eb1f92f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationState.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MigrationState. + */ +public final class MigrationState extends ExpandableStringEnum { + /** Static value None for MigrationState. */ + public static final MigrationState NONE = fromString("None"); + + /** Static value InProgress for MigrationState. */ + public static final MigrationState IN_PROGRESS = fromString("InProgress"); + + /** Static value Failed for MigrationState. */ + public static final MigrationState FAILED = fromString("Failed"); + + /** Static value Warning for MigrationState. */ + public static final MigrationState WARNING = fromString("Warning"); + + /** Static value Completed for MigrationState. */ + public static final MigrationState COMPLETED = fromString("Completed"); + + /** Static value Skipped for MigrationState. */ + public static final MigrationState SKIPPED = fromString("Skipped"); + + /** Static value Stopped for MigrationState. */ + public static final MigrationState STOPPED = fromString("Stopped"); + + /** + * Creates or finds a MigrationState from its string representation. + * @param name a name to look for + * @return the corresponding MigrationState + */ + @JsonCreator + public static MigrationState fromString(String name) { + return fromString(name, MigrationState.class); + } + + /** + * @return known MigrationState values + */ + public static Collection values() { + return values(MigrationState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationStatus.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationStatus.java new file mode 100644 index 000000000000..f628323e1060 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationStatus.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MigrationStatus. + */ +public final class MigrationStatus extends ExpandableStringEnum { + /** Static value Default for MigrationStatus. */ + public static final MigrationStatus DEFAULT = fromString("Default"); + + /** Static value Connecting for MigrationStatus. */ + public static final MigrationStatus CONNECTING = fromString("Connecting"); + + /** Static value SourceAndTargetSelected for MigrationStatus. */ + public static final MigrationStatus SOURCE_AND_TARGET_SELECTED = fromString("SourceAndTargetSelected"); + + /** Static value SelectLogins for MigrationStatus. */ + public static final MigrationStatus SELECT_LOGINS = fromString("SelectLogins"); + + /** Static value Configured for MigrationStatus. */ + public static final MigrationStatus CONFIGURED = fromString("Configured"); + + /** Static value Running for MigrationStatus. */ + public static final MigrationStatus RUNNING = fromString("Running"); + + /** Static value Error for MigrationStatus. */ + public static final MigrationStatus ERROR = fromString("Error"); + + /** Static value Stopped for MigrationStatus. */ + public static final MigrationStatus STOPPED = fromString("Stopped"); + + /** Static value Completed for MigrationStatus. */ + public static final MigrationStatus COMPLETED = fromString("Completed"); + + /** Static value CompletedWithWarnings for MigrationStatus. */ + public static final MigrationStatus COMPLETED_WITH_WARNINGS = fromString("CompletedWithWarnings"); + + /** + * Creates or finds a MigrationStatus from its string representation. + * @param name a name to look for + * @return the corresponding MigrationStatus + */ + @JsonCreator + public static MigrationStatus fromString(String name) { + return fromString(name, MigrationStatus.class); + } + + /** + * @return known MigrationStatus values + */ + public static Collection values() { + return values(MigrationStatus.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationTableMetadata.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationTableMetadata.java new file mode 100644 index 000000000000..43709d2e4039 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationTableMetadata.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metadata for tables selected in migration project. + */ +public class MigrationTableMetadata { + /** + * Source table name. + */ + @JsonProperty(value = "sourceTableName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceTableName; + + /** + * Target table name. + */ + @JsonProperty(value = "targetTableName", access = JsonProperty.Access.WRITE_ONLY) + private String targetTableName; + + /** + * Get source table name. + * + * @return the sourceTableName value + */ + public String sourceTableName() { + return this.sourceTableName; + } + + /** + * Get target table name. + * + * @return the targetTableName value + */ + public String targetTableName() { + return this.targetTableName; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationDatabaseLevelResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationDatabaseLevelResult.java new file mode 100644 index 000000000000..c627b563ad3d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationDatabaseLevelResult.java @@ -0,0 +1,172 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database level validation results. + */ +public class MigrationValidationDatabaseLevelResult { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Migration Identifier. + */ + @JsonProperty(value = "migrationId", access = JsonProperty.Access.WRITE_ONLY) + private String migrationId; + + /** + * Name of the source database. + */ + @JsonProperty(value = "sourceDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceDatabaseName; + + /** + * Name of the target database. + */ + @JsonProperty(value = "targetDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String targetDatabaseName; + + /** + * Validation start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Validation end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Provides data integrity validation result between the source and target + * tables that are migrated. + */ + @JsonProperty(value = "dataIntegrityValidationResult", access = JsonProperty.Access.WRITE_ONLY) + private DataIntegrityValidationResult dataIntegrityValidationResult; + + /** + * Provides schema comparison result between source and target database. + */ + @JsonProperty(value = "schemaValidationResult", access = JsonProperty.Access.WRITE_ONLY) + private SchemaComparisonValidationResult schemaValidationResult; + + /** + * Results of some of the query execution result between source and target + * database. + */ + @JsonProperty(value = "queryAnalysisValidationResult", access = JsonProperty.Access.WRITE_ONLY) + private QueryAnalysisValidationResult queryAnalysisValidationResult; + + /** + * Current status of validation at the database level. Possible values + * include: 'Default', 'NotStarted', 'Initialized', 'InProgress', + * 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get migration Identifier. + * + * @return the migrationId value + */ + public String migrationId() { + return this.migrationId; + } + + /** + * Get name of the source database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Get name of the target database. + * + * @return the targetDatabaseName value + */ + public String targetDatabaseName() { + return this.targetDatabaseName; + } + + /** + * Get validation start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get validation end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get provides data integrity validation result between the source and target tables that are migrated. + * + * @return the dataIntegrityValidationResult value + */ + public DataIntegrityValidationResult dataIntegrityValidationResult() { + return this.dataIntegrityValidationResult; + } + + /** + * Get provides schema comparison result between source and target database. + * + * @return the schemaValidationResult value + */ + public SchemaComparisonValidationResult schemaValidationResult() { + return this.schemaValidationResult; + } + + /** + * Get results of some of the query execution result between source and target database. + * + * @return the queryAnalysisValidationResult value + */ + public QueryAnalysisValidationResult queryAnalysisValidationResult() { + return this.queryAnalysisValidationResult; + } + + /** + * Get current status of validation at the database level. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationDatabaseSummaryResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationDatabaseSummaryResult.java new file mode 100644 index 000000000000..ac4dfb48973c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationDatabaseSummaryResult.java @@ -0,0 +1,125 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration Validation Database level summary result. + */ +public class MigrationValidationDatabaseSummaryResult { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Migration Identifier. + */ + @JsonProperty(value = "migrationId", access = JsonProperty.Access.WRITE_ONLY) + private String migrationId; + + /** + * Name of the source database. + */ + @JsonProperty(value = "sourceDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceDatabaseName; + + /** + * Name of the target database. + */ + @JsonProperty(value = "targetDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String targetDatabaseName; + + /** + * Validation start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Validation end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Current status of validation at the database level. Possible values + * include: 'Default', 'NotStarted', 'Initialized', 'InProgress', + * 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get migration Identifier. + * + * @return the migrationId value + */ + public String migrationId() { + return this.migrationId; + } + + /** + * Get name of the source database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Get name of the target database. + * + * @return the targetDatabaseName value + */ + public String targetDatabaseName() { + return this.targetDatabaseName; + } + + /** + * Get validation start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get validation end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get current status of validation at the database level. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationOptions.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationOptions.java new file mode 100644 index 000000000000..1f4b5b7ce658 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationOptions.java @@ -0,0 +1,99 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Types of validations to run after the migration. + */ +public class MigrationValidationOptions { + /** + * Allows to compare the schema information between source and target. + */ + @JsonProperty(value = "enableSchemaValidation") + private Boolean enableSchemaValidation; + + /** + * Allows to perform a checksum based data integrity validation between + * source and target for the selected database / tables . + */ + @JsonProperty(value = "enableDataIntegrityValidation") + private Boolean enableDataIntegrityValidation; + + /** + * Allows to perform a quick and intelligent query analysis by retrieving + * queries from the source database and executes them in the target. The + * result will have execution statistics for executions in source and + * target databases for the extracted queries. + */ + @JsonProperty(value = "enableQueryAnalysisValidation") + private Boolean enableQueryAnalysisValidation; + + /** + * Get allows to compare the schema information between source and target. + * + * @return the enableSchemaValidation value + */ + public Boolean enableSchemaValidation() { + return this.enableSchemaValidation; + } + + /** + * Set allows to compare the schema information between source and target. + * + * @param enableSchemaValidation the enableSchemaValidation value to set + * @return the MigrationValidationOptions object itself. + */ + public MigrationValidationOptions withEnableSchemaValidation(Boolean enableSchemaValidation) { + this.enableSchemaValidation = enableSchemaValidation; + return this; + } + + /** + * Get allows to perform a checksum based data integrity validation between source and target for the selected database / tables . + * + * @return the enableDataIntegrityValidation value + */ + public Boolean enableDataIntegrityValidation() { + return this.enableDataIntegrityValidation; + } + + /** + * Set allows to perform a checksum based data integrity validation between source and target for the selected database / tables . + * + * @param enableDataIntegrityValidation the enableDataIntegrityValidation value to set + * @return the MigrationValidationOptions object itself. + */ + public MigrationValidationOptions withEnableDataIntegrityValidation(Boolean enableDataIntegrityValidation) { + this.enableDataIntegrityValidation = enableDataIntegrityValidation; + return this; + } + + /** + * Get allows to perform a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries. + * + * @return the enableQueryAnalysisValidation value + */ + public Boolean enableQueryAnalysisValidation() { + return this.enableQueryAnalysisValidation; + } + + /** + * Set allows to perform a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries. + * + * @param enableQueryAnalysisValidation the enableQueryAnalysisValidation value to set + * @return the MigrationValidationOptions object itself. + */ + public MigrationValidationOptions withEnableQueryAnalysisValidation(Boolean enableQueryAnalysisValidation) { + this.enableQueryAnalysisValidation = enableQueryAnalysisValidation; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationResult.java new file mode 100644 index 000000000000..b750eccf5e6b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/MigrationValidationResult.java @@ -0,0 +1,92 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration Validation Result. + */ +public class MigrationValidationResult { + /** + * Migration validation result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Migration Identifier. + */ + @JsonProperty(value = "migrationId", access = JsonProperty.Access.WRITE_ONLY) + private String migrationId; + + /** + * Validation summary results for each database. + */ + @JsonProperty(value = "summaryResults") + private Map summaryResults; + + /** + * Current status of validation at the migration level. Status from the + * database validation result status will be aggregated here. Possible + * values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', + * 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get migration validation result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get migration Identifier. + * + * @return the migrationId value + */ + public String migrationId() { + return this.migrationId; + } + + /** + * Get validation summary results for each database. + * + * @return the summaryResults value + */ + public Map summaryResults() { + return this.summaryResults; + } + + /** + * Set validation summary results for each database. + * + * @param summaryResults the summaryResults value to set + * @return the MigrationValidationResult object itself. + */ + public MigrationValidationResult withSummaryResults(Map summaryResults) { + this.summaryResults = summaryResults; + return this; + } + + /** + * Get current status of validation at the migration level. Status from the database validation result status will be aggregated here. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameAvailabilityRequest.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameAvailabilityRequest.java new file mode 100644 index 000000000000..141d9e53789a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameAvailabilityRequest.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A resource type and proposed name. + */ +public class NameAvailabilityRequest { + /** + * The proposed resource name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The resource type chain (e.g. virtualMachines/extensions). + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the proposed resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the proposed resource name. + * + * @param name the name value to set + * @return the NameAvailabilityRequest object itself. + */ + public NameAvailabilityRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource type chain (e.g. virtualMachines/extensions). + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the resource type chain (e.g. virtualMachines/extensions). + * + * @param type the type value to set + * @return the NameAvailabilityRequest object itself. + */ + public NameAvailabilityRequest withType(String type) { + this.type = type; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameAvailabilityResponse.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameAvailabilityResponse.java new file mode 100644 index 000000000000..0fb2e17799b6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameAvailabilityResponse.java @@ -0,0 +1,35 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.NameAvailabilityResponseInner; + +/** + * Type representing NameAvailabilityResponse. + */ +public interface NameAvailabilityResponse extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + NameCheckFailureReason reason(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameCheckFailureReason.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameCheckFailureReason.java new file mode 100644 index 000000000000..ba67edf393ac --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/NameCheckFailureReason.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for NameCheckFailureReason. + */ +public final class NameCheckFailureReason extends ExpandableStringEnum { + /** Static value AlreadyExists for NameCheckFailureReason. */ + public static final NameCheckFailureReason ALREADY_EXISTS = fromString("AlreadyExists"); + + /** Static value Invalid for NameCheckFailureReason. */ + public static final NameCheckFailureReason INVALID = fromString("Invalid"); + + /** + * Creates or finds a NameCheckFailureReason from its string representation. + * @param name a name to look for + * @return the corresponding NameCheckFailureReason + */ + @JsonCreator + public static NameCheckFailureReason fromString(String name) { + return fromString(name, NameCheckFailureReason.class); + } + + /** + * @return known NameCheckFailureReason values + */ + public static Collection values() { + return values(NameCheckFailureReason.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ODataError.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ODataError.java new file mode 100644 index 000000000000..b4698e513c29 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ODataError.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error information in OData format. + */ +public class ODataError { + /** + * The machine-readable description of the error, such as 'InvalidRequest' + * or 'InternalServerError'. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The human-readable description of the error. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Inner errors that caused this error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get the machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError'. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError'. + * + * @param code the code value to set + * @return the ODataError object itself. + */ + public ODataError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the human-readable description of the error. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the human-readable description of the error. + * + * @param message the message value to set + * @return the ODataError object itself. + */ + public ODataError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get inner errors that caused this error. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set inner errors that caused this error. + * + * @param details the details value to set + * @return the ODataError object itself. + */ + public ODataError withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ObjectType.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ObjectType.java new file mode 100644 index 000000000000..2df6f85cbe85 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ObjectType.java @@ -0,0 +1,50 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ObjectType. + */ +public final class ObjectType extends ExpandableStringEnum { + /** Static value StoredProcedures for ObjectType. */ + public static final ObjectType STORED_PROCEDURES = fromString("StoredProcedures"); + + /** Static value Table for ObjectType. */ + public static final ObjectType TABLE = fromString("Table"); + + /** Static value User for ObjectType. */ + public static final ObjectType USER = fromString("User"); + + /** Static value View for ObjectType. */ + public static final ObjectType VIEW = fromString("View"); + + /** Static value Function for ObjectType. */ + public static final ObjectType FUNCTION = fromString("Function"); + + /** + * Creates or finds a ObjectType from its string representation. + * @param name a name to look for + * @return the corresponding ObjectType + */ + @JsonCreator + public static ObjectType fromString(String name) { + return fromString(name, ObjectType.class); + } + + /** + * @return known ObjectType values + */ + public static Collection values() { + return values(ObjectType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Operations.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Operations.java new file mode 100644 index 000000000000..768b2197cef0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Operations.java @@ -0,0 +1,28 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Project.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Project.java new file mode 100644 index 000000000000..2f39c48468f6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Project.java @@ -0,0 +1,268 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.ProjectInner; +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.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationManager; +import java.util.Map; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing Project. + */ +public interface Project extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the creationTime value. + */ + DateTime creationTime(); + + /** + * @return the databasesInfo value. + */ + List databasesInfo(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProjectProvisioningState provisioningState(); + + /** + * @return the sourceConnectionInfo value. + */ + ConnectionInfo sourceConnectionInfo(); + + /** + * @return the sourcePlatform value. + */ + ProjectSourcePlatform sourcePlatform(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the targetConnectionInfo value. + */ + ConnectionInfo targetConnectionInfo(); + + /** + * @return the targetPlatform value. + */ + ProjectTargetPlatform targetPlatform(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the Project definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithService, DefinitionStages.WithLocation, DefinitionStages.WithSourcePlatform, DefinitionStages.WithTargetPlatform, DefinitionStages.WithCreate { + } + + /** + * Grouping of Project definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Project definition. + */ + interface Blank extends WithService { + } + + /** + * The stage of the project 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 + */ + WithLocation withExistingService(String groupName, String serviceName); + } + + /** + * The stage of the project definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next definition stage + */ + WithSourcePlatform withLocation(String location); + } + + /** + * The stage of the project definition allowing to specify SourcePlatform. + */ + interface WithSourcePlatform { + /** + * Specifies sourcePlatform. + * @param sourcePlatform Source platform for the project. Possible values include: 'SQL', 'Unknown' + * @return the next definition stage + */ + WithTargetPlatform withSourcePlatform(ProjectSourcePlatform sourcePlatform); + } + + /** + * The stage of the project definition allowing to specify TargetPlatform. + */ + interface WithTargetPlatform { + /** + * Specifies targetPlatform. + * @param targetPlatform Target platform for the project. Possible values include: 'SQLDB', 'SQLMI', 'Unknown' + * @return the next definition stage + */ + WithCreate withTargetPlatform(ProjectTargetPlatform targetPlatform); + } + + /** + * The stage of the project definition allowing to specify DatabasesInfo. + */ + interface WithDatabasesInfo { + /** + * Specifies databasesInfo. + * @param databasesInfo List of DatabaseInfo + * @return the next definition stage + */ + WithCreate withDatabasesInfo(List databasesInfo); + } + + /** + * The stage of the project definition allowing to specify SourceConnectionInfo. + */ + interface WithSourceConnectionInfo { + /** + * Specifies sourceConnectionInfo. + * @param sourceConnectionInfo Information for connecting to source + * @return the next definition stage + */ + WithCreate withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo); + } + + /** + * The stage of the project definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the project definition allowing to specify TargetConnectionInfo. + */ + interface WithTargetConnectionInfo { + /** + * Specifies targetConnectionInfo. + * @param targetConnectionInfo Information for connecting to target + * @return the next definition stage + */ + WithCreate withTargetConnectionInfo(ConnectionInfo targetConnectionInfo); + } + + /** + * 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.WithDatabasesInfo, DefinitionStages.WithSourceConnectionInfo, DefinitionStages.WithTags, DefinitionStages.WithTargetConnectionInfo { + } + } + /** + * The template for a Project update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithDatabasesInfo, UpdateStages.WithSourceConnectionInfo, UpdateStages.WithTags, UpdateStages.WithTargetConnectionInfo { + } + + /** + * Grouping of Project update stages. + */ + interface UpdateStages { + /** + * The stage of the project update allowing to specify DatabasesInfo. + */ + interface WithDatabasesInfo { + /** + * Specifies databasesInfo. + * @param databasesInfo List of DatabaseInfo + * @return the next update stage + */ + Update withDatabasesInfo(List databasesInfo); + } + + /** + * The stage of the project update allowing to specify SourceConnectionInfo. + */ + interface WithSourceConnectionInfo { + /** + * Specifies sourceConnectionInfo. + * @param sourceConnectionInfo Information for connecting to source + * @return the next update stage + */ + Update withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo); + } + + /** + * The stage of the project update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next update stage + */ + Update withTags(Map tags); + } + + /** + * The stage of the project update allowing to specify TargetConnectionInfo. + */ + interface WithTargetConnectionInfo { + /** + * Specifies targetConnectionInfo. + * @param targetConnectionInfo Information for connecting to target + * @return the next update stage + */ + Update withTargetConnectionInfo(ConnectionInfo targetConnectionInfo); + } + + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectProvisioningState.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectProvisioningState.java new file mode 100644 index 000000000000..6f018c2a7653 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectProvisioningState.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProjectProvisioningState. + */ +public final class ProjectProvisioningState extends ExpandableStringEnum { + /** Static value Deleting for ProjectProvisioningState. */ + public static final ProjectProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for ProjectProvisioningState. */ + public static final ProjectProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Creates or finds a ProjectProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ProjectProvisioningState + */ + @JsonCreator + public static ProjectProvisioningState fromString(String name) { + return fromString(name, ProjectProvisioningState.class); + } + + /** + * @return known ProjectProvisioningState values + */ + public static Collection values() { + return values(ProjectProvisioningState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectSourcePlatform.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectSourcePlatform.java new file mode 100644 index 000000000000..9233f76477d0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectSourcePlatform.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProjectSourcePlatform. + */ +public final class ProjectSourcePlatform extends ExpandableStringEnum { + /** Static value SQL for ProjectSourcePlatform. */ + public static final ProjectSourcePlatform SQL = fromString("SQL"); + + /** Static value Unknown for ProjectSourcePlatform. */ + public static final ProjectSourcePlatform UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a ProjectSourcePlatform from its string representation. + * @param name a name to look for + * @return the corresponding ProjectSourcePlatform + */ + @JsonCreator + public static ProjectSourcePlatform fromString(String name) { + return fromString(name, ProjectSourcePlatform.class); + } + + /** + * @return known ProjectSourcePlatform values + */ + public static Collection values() { + return values(ProjectSourcePlatform.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTargetPlatform.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTargetPlatform.java new file mode 100644 index 000000000000..a03dbe37abaf --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTargetPlatform.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProjectTargetPlatform. + */ +public final class ProjectTargetPlatform extends ExpandableStringEnum { + /** Static value SQLDB for ProjectTargetPlatform. */ + public static final ProjectTargetPlatform SQLDB = fromString("SQLDB"); + + /** Static value SQLMI for ProjectTargetPlatform. */ + public static final ProjectTargetPlatform SQLMI = fromString("SQLMI"); + + /** Static value Unknown for ProjectTargetPlatform. */ + public static final ProjectTargetPlatform UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a ProjectTargetPlatform from its string representation. + * @param name a name to look for + * @return the corresponding ProjectTargetPlatform + */ + @JsonCreator + public static ProjectTargetPlatform fromString(String name) { + return fromString(name, ProjectTargetPlatform.class); + } + + /** + * @return known ProjectTargetPlatform values + */ + public static Collection values() { + return values(ProjectTargetPlatform.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTask.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTask.java new file mode 100644 index 000000000000..cf9da4b3c7c8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTask.java @@ -0,0 +1,147 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_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.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationManager; + +/** + * Type representing ProjectTask. + */ +public interface ProjectTask 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 ProjectTask definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProject, DefinitionStages.WithCreate { + } + + /** + * Grouping of ProjectTask definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ProjectTask definition. + */ + interface Blank extends WithProject { + } + + /** + * The stage of the projecttask definition allowing to specify Project. + */ + interface WithProject { + /** + * Specifies groupName, serviceName, projectName. + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @return the next definition stage + */ + WithCreate withExistingProject(String groupName, String serviceName, String projectName); + } + + /** + * The stage of the projecttask 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 projecttask 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 ProjectTask update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithEtag, UpdateStages.WithProperties { + } + + /** + * Grouping of ProjectTask update stages. + */ + interface UpdateStages { + /** + * The stage of the projecttask 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 projecttask 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTaskProperties.java new file mode 100644 index 000000000000..4f3d81ee82fd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ProjectTaskProperties.java @@ -0,0 +1,66 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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") +@JsonTypeName("Unknown") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI", value = MigrateSqlServerSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class) +}) +public class ProjectTaskProperties { + /** + * Array of errors. This is ignored if submitted. + */ + @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; + + /** + * The state of the task. This is ignored if submitted. Possible values + * include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + * 'Failed', 'FailedInputValidation', 'Faulted'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private TaskState state; + + /** + * Get array of errors. This is ignored if submitted. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + + /** + * Get the state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted'. + * + * @return the state value + */ + public TaskState state() { + return this.state; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Projects.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Projects.java new file mode 100644 index 000000000000..e5088563bce3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Projects.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.ProjectsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Projects. + */ +public interface Projects extends SupportsCreating, HasInner { + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String groupName, String serviceName, String projectName); + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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 project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String groupName, String serviceName, String projectName); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QueryAnalysisValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QueryAnalysisValidationResult.java new file mode 100644 index 000000000000..53ee02c9a47c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QueryAnalysisValidationResult.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results for query analysis comparison between the source and target. + */ +public class QueryAnalysisValidationResult { + /** + * List of queries executed and it's execution results in source and + * target. + */ + @JsonProperty(value = "queryResults") + private QueryExecutionResult queryResults; + + /** + * Errors that are part of the execution. + */ + @JsonProperty(value = "validationErrors") + private ValidationError validationErrors; + + /** + * Get list of queries executed and it's execution results in source and target. + * + * @return the queryResults value + */ + public QueryExecutionResult queryResults() { + return this.queryResults; + } + + /** + * Set list of queries executed and it's execution results in source and target. + * + * @param queryResults the queryResults value to set + * @return the QueryAnalysisValidationResult object itself. + */ + public QueryAnalysisValidationResult withQueryResults(QueryExecutionResult queryResults) { + this.queryResults = queryResults; + return this; + } + + /** + * Get errors that are part of the execution. + * + * @return the validationErrors value + */ + public ValidationError validationErrors() { + return this.validationErrors; + } + + /** + * Set errors that are part of the execution. + * + * @param validationErrors the validationErrors value to set + * @return the QueryAnalysisValidationResult object itself. + */ + public QueryAnalysisValidationResult withValidationErrors(ValidationError validationErrors) { + this.validationErrors = validationErrors; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QueryExecutionResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QueryExecutionResult.java new file mode 100644 index 000000000000..b927146a8b90 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QueryExecutionResult.java @@ -0,0 +1,121 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes query analysis results for execution in source and target. + */ +public class QueryExecutionResult { + /** + * Query text retrieved from the source server. + */ + @JsonProperty(value = "queryText") + private String queryText; + + /** + * Total no. of statements in the batch. + */ + @JsonProperty(value = "statementsInBatch") + private Long statementsInBatch; + + /** + * Query analysis result from the source. + */ + @JsonProperty(value = "sourceResult") + private ExecutionStatistics sourceResult; + + /** + * Query analysis result from the target. + */ + @JsonProperty(value = "targetResult") + private ExecutionStatistics targetResult; + + /** + * Get query text retrieved from the source server. + * + * @return the queryText value + */ + public String queryText() { + return this.queryText; + } + + /** + * Set query text retrieved from the source server. + * + * @param queryText the queryText value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withQueryText(String queryText) { + this.queryText = queryText; + return this; + } + + /** + * Get total no. of statements in the batch. + * + * @return the statementsInBatch value + */ + public Long statementsInBatch() { + return this.statementsInBatch; + } + + /** + * Set total no. of statements in the batch. + * + * @param statementsInBatch the statementsInBatch value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withStatementsInBatch(Long statementsInBatch) { + this.statementsInBatch = statementsInBatch; + return this; + } + + /** + * Get query analysis result from the source. + * + * @return the sourceResult value + */ + public ExecutionStatistics sourceResult() { + return this.sourceResult; + } + + /** + * Set query analysis result from the source. + * + * @param sourceResult the sourceResult value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withSourceResult(ExecutionStatistics sourceResult) { + this.sourceResult = sourceResult; + return this; + } + + /** + * Get query analysis result from the target. + * + * @return the targetResult value + */ + public ExecutionStatistics targetResult() { + return this.targetResult; + } + + /** + * Set query analysis result from the target. + * + * @param targetResult the targetResult value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withTargetResult(ExecutionStatistics targetResult) { + this.targetResult = targetResult; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Quota.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Quota.java new file mode 100644 index 000000000000..244d77d5e66b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Quota.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.QuotaInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationManager; + +/** + * Type representing Quota. + */ +public interface Quota extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + Double currentValue(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the limit value. + */ + Double limit(); + + /** + * @return the name value. + */ + QuotaName name(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QuotaName.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QuotaName.java new file mode 100644 index 000000000000..9af3c41013f4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/QuotaName.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The name of the quota. + */ +public class QuotaName { + /** + * The localized name of the quota. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * The unlocalized name (or ID) of the quota. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the localized name of the quota. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set the localized name of the quota. + * + * @param localizedValue the localizedValue value to set + * @return the QuotaName object itself. + */ + public QuotaName withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + + /** + * Get the unlocalized name (or ID) of the quota. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the unlocalized name (or ID) of the quota. + * + * @param value the value value to set + * @return the QuotaName object itself. + */ + public QuotaName withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ReportableException.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ReportableException.java new file mode 100644 index 000000000000..55460906308f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ReportableException.java @@ -0,0 +1,147 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Exception object for all custom exceptions. + */ +public class ReportableException { + /** + * Error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The path to the file where exception occurred. + */ + @JsonProperty(value = "filePath") + private String filePath; + + /** + * The line number where exception occurred. + */ + @JsonProperty(value = "lineNumber") + private String lineNumber; + + /** + * Coded numerical value that is assigned to a specific exception. + */ + @JsonProperty(value = "hResult") + private Integer hResult; + + /** + * Stack trace. + */ + @JsonProperty(value = "stackTrace") + private String stackTrace; + + /** + * Get error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set error message. + * + * @param message the message value to set + * @return the ReportableException object itself. + */ + public ReportableException withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the path to the file where exception occurred. + * + * @return the filePath value + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the path to the file where exception occurred. + * + * @param filePath the filePath value to set + * @return the ReportableException object itself. + */ + public ReportableException withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get the line number where exception occurred. + * + * @return the lineNumber value + */ + public String lineNumber() { + return this.lineNumber; + } + + /** + * Set the line number where exception occurred. + * + * @param lineNumber the lineNumber value to set + * @return the ReportableException object itself. + */ + public ReportableException withLineNumber(String lineNumber) { + this.lineNumber = lineNumber; + return this; + } + + /** + * Get coded numerical value that is assigned to a specific exception. + * + * @return the hResult value + */ + public Integer hResult() { + return this.hResult; + } + + /** + * Set coded numerical value that is assigned to a specific exception. + * + * @param hResult the hResult value to set + * @return the ReportableException object itself. + */ + public ReportableException withHResult(Integer hResult) { + this.hResult = hResult; + return this; + } + + /** + * Get stack trace. + * + * @return the stackTrace value + */ + public String stackTrace() { + return this.stackTrace; + } + + /** + * Set stack trace. + * + * @param stackTrace the stackTrace value to set + * @return the ReportableException object itself. + */ + public ReportableException withStackTrace(String stackTrace) { + this.stackTrace = stackTrace; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSku.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSku.java new file mode 100644 index 000000000000..d5c2d6fdc2ca --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSku.java @@ -0,0 +1,81 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.ResourceSkuInner; +import java.util.List; + +/** + * Type representing ResourceSku. + */ +public interface ResourceSku extends HasInner, HasManager { + /** + * @return the apiVersions value. + */ + List apiVersions(); + + /** + * @return the capabilities value. + */ + List capabilities(); + + /** + * @return the capacity value. + */ + ResourceSkuCapacity capacity(); + + /** + * @return the costs value. + */ + List costs(); + + /** + * @return the family value. + */ + String family(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the locations value. + */ + List locations(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the restrictions value. + */ + List restrictions(); + + /** + * @return the size value. + */ + String size(); + + /** + * @return the tier value. + */ + String tier(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapabilities.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapabilities.java new file mode 100644 index 000000000000..7adeb2b6e6a6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapabilities.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes The SKU capabilites object. + */ +public class ResourceSkuCapabilities { + /** + * An invariant to describe the feature. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * An invariant if the feature is measured by quantity. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** + * Get an invariant to describe the feature. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get an invariant if the feature is measured by quantity. + * + * @return the value value + */ + public String value() { + return this.value; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapacity.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapacity.java new file mode 100644 index 000000000000..1749216b0156 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapacity.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes scaling information of a SKU. + */ +public class ResourceSkuCapacity { + /** + * The minimum capacity. + */ + @JsonProperty(value = "minimum", access = JsonProperty.Access.WRITE_ONLY) + private Long minimum; + + /** + * The maximum capacity. + */ + @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY) + private Long maximum; + + /** + * The default capacity. + */ + @JsonProperty(value = "default", access = JsonProperty.Access.WRITE_ONLY) + private Long defaultProperty; + + /** + * The scale type applicable to the SKU. Possible values include: + * 'Automatic', 'Manual', 'None'. + */ + @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuCapacityScaleType scaleType; + + /** + * Get the minimum capacity. + * + * @return the minimum value + */ + public Long minimum() { + return this.minimum; + } + + /** + * Get the maximum capacity. + * + * @return the maximum value + */ + public Long maximum() { + return this.maximum; + } + + /** + * Get the default capacity. + * + * @return the defaultProperty value + */ + public Long defaultProperty() { + return this.defaultProperty; + } + + /** + * Get the scale type applicable to the SKU. Possible values include: 'Automatic', 'Manual', 'None'. + * + * @return the scaleType value + */ + public ResourceSkuCapacityScaleType scaleType() { + return this.scaleType; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapacityScaleType.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapacityScaleType.java new file mode 100644 index 000000000000..9f3b233a251b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCapacityScaleType.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ResourceSkuCapacityScaleType. + */ +public final class ResourceSkuCapacityScaleType extends ExpandableStringEnum { + /** Static value Automatic for ResourceSkuCapacityScaleType. */ + public static final ResourceSkuCapacityScaleType AUTOMATIC = fromString("Automatic"); + + /** Static value Manual for ResourceSkuCapacityScaleType. */ + public static final ResourceSkuCapacityScaleType MANUAL = fromString("Manual"); + + /** Static value None for ResourceSkuCapacityScaleType. */ + public static final ResourceSkuCapacityScaleType NONE = fromString("None"); + + /** + * Creates or finds a ResourceSkuCapacityScaleType from its string representation. + * @param name a name to look for + * @return the corresponding ResourceSkuCapacityScaleType + */ + @JsonCreator + public static ResourceSkuCapacityScaleType fromString(String name) { + return fromString(name, ResourceSkuCapacityScaleType.class); + } + + /** + * @return known ResourceSkuCapacityScaleType values + */ + public static Collection values() { + return values(ResourceSkuCapacityScaleType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCosts.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCosts.java new file mode 100644 index 000000000000..1a1e08230372 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuCosts.java @@ -0,0 +1,62 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes metadata for retrieving price info. + */ +public class ResourceSkuCosts { + /** + * Used for querying price from commerce. + */ + @JsonProperty(value = "meterID", access = JsonProperty.Access.WRITE_ONLY) + private String meterID; + + /** + * The multiplier is needed to extend the base metered cost. + */ + @JsonProperty(value = "quantity", access = JsonProperty.Access.WRITE_ONLY) + private Long quantity; + + /** + * An invariant to show the extended unit. + */ + @JsonProperty(value = "extendedUnit", access = JsonProperty.Access.WRITE_ONLY) + private String extendedUnit; + + /** + * Get used for querying price from commerce. + * + * @return the meterID value + */ + public String meterID() { + return this.meterID; + } + + /** + * Get the multiplier is needed to extend the base metered cost. + * + * @return the quantity value + */ + public Long quantity() { + return this.quantity; + } + + /** + * Get an invariant to show the extended unit. + * + * @return the extendedUnit value + */ + public String extendedUnit() { + return this.extendedUnit; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictions.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictions.java new file mode 100644 index 000000000000..78581554c4eb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictions.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes scaling information of a SKU. + */ +public class ResourceSkuRestrictions { + /** + * The type of restrictions. Possible values include: 'location'. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuRestrictionsType type; + + /** + * The value of restrictions. If the restriction type is set to location. + * This would be different locations where the SKU is restricted. + */ + @JsonProperty(value = "values", access = JsonProperty.Access.WRITE_ONLY) + private List values; + + /** + * The reason code for restriction. Possible values include: 'QuotaId', + * 'NotAvailableForSubscription'. + */ + @JsonProperty(value = "reasonCode", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuRestrictionsReasonCode reasonCode; + + /** + * Get the type of restrictions. Possible values include: 'location'. + * + * @return the type value + */ + public ResourceSkuRestrictionsType type() { + return this.type; + } + + /** + * Get the value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Get the reason code for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. + * + * @return the reasonCode value + */ + public ResourceSkuRestrictionsReasonCode reasonCode() { + return this.reasonCode; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictionsReasonCode.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictionsReasonCode.java new file mode 100644 index 000000000000..3ac780cbdf22 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictionsReasonCode.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ResourceSkuRestrictionsReasonCode. + */ +public final class ResourceSkuRestrictionsReasonCode extends ExpandableStringEnum { + /** Static value QuotaId for ResourceSkuRestrictionsReasonCode. */ + public static final ResourceSkuRestrictionsReasonCode QUOTA_ID = fromString("QuotaId"); + + /** Static value NotAvailableForSubscription for ResourceSkuRestrictionsReasonCode. */ + public static final ResourceSkuRestrictionsReasonCode NOT_AVAILABLE_FOR_SUBSCRIPTION = fromString("NotAvailableForSubscription"); + + /** + * Creates or finds a ResourceSkuRestrictionsReasonCode from its string representation. + * @param name a name to look for + * @return the corresponding ResourceSkuRestrictionsReasonCode + */ + @JsonCreator + public static ResourceSkuRestrictionsReasonCode fromString(String name) { + return fromString(name, ResourceSkuRestrictionsReasonCode.class); + } + + /** + * @return known ResourceSkuRestrictionsReasonCode values + */ + public static Collection values() { + return values(ResourceSkuRestrictionsReasonCode.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictionsType.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictionsType.java new file mode 100644 index 000000000000..4cfcac710822 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkuRestrictionsType.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ResourceSkuRestrictionsType. + */ +public final class ResourceSkuRestrictionsType extends ExpandableStringEnum { + /** Static value location for ResourceSkuRestrictionsType. */ + public static final ResourceSkuRestrictionsType LOCATION = fromString("location"); + + /** + * Creates or finds a ResourceSkuRestrictionsType from its string representation. + * @param name a name to look for + * @return the corresponding ResourceSkuRestrictionsType + */ + @JsonCreator + public static ResourceSkuRestrictionsType fromString(String name) { + return fromString(name, ResourceSkuRestrictionsType.class); + } + + /** + * @return known ResourceSkuRestrictionsType values + */ + public static Collection values() { + return values(ResourceSkuRestrictionsType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkus.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkus.java new file mode 100644 index 000000000000..af1d95314722 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ResourceSkus.java @@ -0,0 +1,28 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.ResourceSkusInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ResourceSkus. + */ +public interface ResourceSkus extends HasInner { + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SchemaComparisonValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SchemaComparisonValidationResult.java new file mode 100644 index 000000000000..f28e52f341c1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SchemaComparisonValidationResult.java @@ -0,0 +1,122 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results for schema comparison between the source and target. + */ +public class SchemaComparisonValidationResult { + /** + * List of schema differences between the source and target databases. + */ + @JsonProperty(value = "schemaDifferences") + private SchemaComparisonValidationResultType schemaDifferences; + + /** + * List of errors that happened while performing schema compare validation. + */ + @JsonProperty(value = "validationErrors") + private ValidationError validationErrors; + + /** + * Count of source database objects. + */ + @JsonProperty(value = "sourceDatabaseObjectCount") + private Map sourceDatabaseObjectCount; + + /** + * Count of target database objects. + */ + @JsonProperty(value = "targetDatabaseObjectCount") + private Map targetDatabaseObjectCount; + + /** + * Get list of schema differences between the source and target databases. + * + * @return the schemaDifferences value + */ + public SchemaComparisonValidationResultType schemaDifferences() { + return this.schemaDifferences; + } + + /** + * Set list of schema differences between the source and target databases. + * + * @param schemaDifferences the schemaDifferences value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withSchemaDifferences(SchemaComparisonValidationResultType schemaDifferences) { + this.schemaDifferences = schemaDifferences; + return this; + } + + /** + * Get list of errors that happened while performing schema compare validation. + * + * @return the validationErrors value + */ + public ValidationError validationErrors() { + return this.validationErrors; + } + + /** + * Set list of errors that happened while performing schema compare validation. + * + * @param validationErrors the validationErrors value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withValidationErrors(ValidationError validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + /** + * Get count of source database objects. + * + * @return the sourceDatabaseObjectCount value + */ + public Map sourceDatabaseObjectCount() { + return this.sourceDatabaseObjectCount; + } + + /** + * Set count of source database objects. + * + * @param sourceDatabaseObjectCount the sourceDatabaseObjectCount value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withSourceDatabaseObjectCount(Map sourceDatabaseObjectCount) { + this.sourceDatabaseObjectCount = sourceDatabaseObjectCount; + return this; + } + + /** + * Get count of target database objects. + * + * @return the targetDatabaseObjectCount value + */ + public Map targetDatabaseObjectCount() { + return this.targetDatabaseObjectCount; + } + + /** + * Set count of target database objects. + * + * @param targetDatabaseObjectCount the targetDatabaseObjectCount value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withTargetDatabaseObjectCount(Map targetDatabaseObjectCount) { + this.targetDatabaseObjectCount = targetDatabaseObjectCount; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SchemaComparisonValidationResultType.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SchemaComparisonValidationResultType.java new file mode 100644 index 000000000000..5423c60b2a21 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SchemaComparisonValidationResultType.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description about the errors happen while performing migration validation. + */ +public class SchemaComparisonValidationResultType { + /** + * Name of the object that has the difference. + */ + @JsonProperty(value = "objectName") + private String objectName; + + /** + * Type of the object that has the difference. e.g + * (Table/View/StoredProcedure). Possible values include: + * 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + */ + @JsonProperty(value = "objectType") + private ObjectType objectType; + + /** + * Update action type with respect to target. Possible values include: + * 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget'. + */ + @JsonProperty(value = "updateAction") + private UpdateActionType updateAction; + + /** + * Get name of the object that has the difference. + * + * @return the objectName value + */ + public String objectName() { + return this.objectName; + } + + /** + * Set name of the object that has the difference. + * + * @param objectName the objectName value to set + * @return the SchemaComparisonValidationResultType object itself. + */ + public SchemaComparisonValidationResultType withObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @return the objectType value + */ + public ObjectType objectType() { + return this.objectType; + } + + /** + * Set type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @param objectType the objectType value to set + * @return the SchemaComparisonValidationResultType object itself. + */ + public SchemaComparisonValidationResultType withObjectType(ObjectType objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget'. + * + * @return the updateAction value + */ + public UpdateActionType updateAction() { + return this.updateAction; + } + + /** + * Set update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget'. + * + * @param updateAction the updateAction value to set + * @return the SchemaComparisonValidationResultType object itself. + */ + public SchemaComparisonValidationResultType withUpdateAction(UpdateActionType updateAction) { + this.updateAction = updateAction; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServerLevelPermissionsGroup.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServerLevelPermissionsGroup.java new file mode 100644 index 000000000000..f0d1d27098ac --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServerLevelPermissionsGroup.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ServerLevelPermissionsGroup. + */ +public final class ServerLevelPermissionsGroup extends ExpandableStringEnum { + /** Static value Default for ServerLevelPermissionsGroup. */ + public static final ServerLevelPermissionsGroup DEFAULT = fromString("Default"); + + /** Static value MigrationFromSqlServerToAzureDB for ServerLevelPermissionsGroup. */ + public static final ServerLevelPermissionsGroup MIGRATION_FROM_SQL_SERVER_TO_AZURE_DB = fromString("MigrationFromSqlServerToAzureDB"); + + /** + * Creates or finds a ServerLevelPermissionsGroup from its string representation. + * @param name a name to look for + * @return the corresponding ServerLevelPermissionsGroup + */ + @JsonCreator + public static ServerLevelPermissionsGroup fromString(String name) { + return fromString(name, ServerLevelPermissionsGroup.class); + } + + /** + * @return known ServerLevelPermissionsGroup values + */ + public static Collection values() { + return values(ServerLevelPermissionsGroup.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceOperation.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceOperation.java new file mode 100644 index 000000000000..ab45cd6fcbf2 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceOperation.java @@ -0,0 +1,30 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.ServiceOperationInner; + +/** + * Type representing ServiceOperation. + */ +public interface ServiceOperation extends HasInner, HasManager { + /** + * @return the display value. + */ + ServiceOperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceOperationDisplay.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceOperationDisplay.java new file mode 100644 index 000000000000..df94fec33a49 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceOperationDisplay.java @@ -0,0 +1,121 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Localized display text. + */ +public class ServiceOperationDisplay { + /** + * The localized resource provider name. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The localized resource type name. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * The localized operation name. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The localized operation description. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the localized resource provider name. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the localized resource provider name. + * + * @param provider the provider value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the localized resource type name. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set the localized resource type name. + * + * @param resource the resource value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the localized operation name. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set the localized operation name. + * + * @param operation the operation value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the localized operation description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the localized operation description. + * + * @param description the description value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceProvisioningState.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceProvisioningState.java new file mode 100644 index 000000000000..84f5936cf4d5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceProvisioningState.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ServiceProvisioningState. + */ +public final class ServiceProvisioningState extends ExpandableStringEnum { + /** Static value Accepted for ServiceProvisioningState. */ + public static final ServiceProvisioningState ACCEPTED = fromString("Accepted"); + + /** Static value Deleting for ServiceProvisioningState. */ + public static final ServiceProvisioningState DELETING = fromString("Deleting"); + + /** Static value Deploying for ServiceProvisioningState. */ + public static final ServiceProvisioningState DEPLOYING = fromString("Deploying"); + + /** Static value Stopped for ServiceProvisioningState. */ + public static final ServiceProvisioningState STOPPED = fromString("Stopped"); + + /** Static value Stopping for ServiceProvisioningState. */ + public static final ServiceProvisioningState STOPPING = fromString("Stopping"); + + /** Static value Starting for ServiceProvisioningState. */ + public static final ServiceProvisioningState STARTING = fromString("Starting"); + + /** Static value FailedToStart for ServiceProvisioningState. */ + public static final ServiceProvisioningState FAILED_TO_START = fromString("FailedToStart"); + + /** Static value FailedToStop for ServiceProvisioningState. */ + public static final ServiceProvisioningState FAILED_TO_STOP = fromString("FailedToStop"); + + /** Static value Succeeded for ServiceProvisioningState. */ + public static final ServiceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ServiceProvisioningState. */ + public static final ServiceProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a ServiceProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ServiceProvisioningState + */ + @JsonCreator + public static ServiceProvisioningState fromString(String name) { + return fromString(name, ServiceProvisioningState.class); + } + + /** + * @return known ServiceProvisioningState values + */ + public static Collection values() { + return values(ServiceProvisioningState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceScalability.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceScalability.java new file mode 100644 index 000000000000..5ed85edde05e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceScalability.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ServiceScalability. + */ +public final class ServiceScalability extends ExpandableStringEnum { + /** Static value none for ServiceScalability. */ + public static final ServiceScalability NONE = fromString("none"); + + /** Static value manual for ServiceScalability. */ + public static final ServiceScalability MANUAL = fromString("manual"); + + /** Static value automatic for ServiceScalability. */ + public static final ServiceScalability AUTOMATIC = fromString("automatic"); + + /** + * Creates or finds a ServiceScalability from its string representation. + * @param name a name to look for + * @return the corresponding ServiceScalability + */ + @JsonCreator + public static ServiceScalability fromString(String name) { + return fromString(name, ServiceScalability.class); + } + + /** + * @return known ServiceScalability values + */ + public static Collection values() { + return values(ServiceScalability.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceSku.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceSku.java new file mode 100644 index 000000000000..a1ebe1cb5890 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ServiceSku.java @@ -0,0 +1,150 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An Azure SKU instance. + */ +public class ServiceSku { + /** + * The unique name of the SKU, such as 'P3'. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The tier of the SKU, such as 'Free', 'Basic', 'Standard', or 'Premium'. + */ + @JsonProperty(value = "tier") + private String tier; + + /** + * The SKU family, used when the service has multiple performance classes + * within a tier, such as 'A', 'D', etc. for virtual machines. + */ + @JsonProperty(value = "family") + private String family; + + /** + * The size of the SKU, used when the name alone does not denote a service + * size or when a SKU has multiple performance classes within a family, + * e.g. 'A1' for virtual machines. + */ + @JsonProperty(value = "size") + private String size; + + /** + * The capacity of the SKU, if it supports scaling. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Get the unique name of the SKU, such as 'P3'. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the SKU, such as 'P3'. + * + * @param name the name value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier of the SKU, such as 'Free', 'Basic', 'Standard', or 'Premium'. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier of the SKU, such as 'Free', 'Basic', 'Standard', or 'Premium'. + * + * @param tier the tier value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get the SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set the SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines. + * + * @param family the family value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set the size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines. + * + * @param size the size value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the capacity of the SKU, if it supports scaling. + * + * @return the capacity value + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity of the SKU, if it supports scaling. + * + * @param capacity the capacity value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Services.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Services.java new file mode 100644 index 000000000000..13bcb5b48eab --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Services.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.ServicesInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.AvailableServiceSku; + +/** + * Type representing Services. + */ +public interface Services extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Check service health status. + * The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 checkStatusAsync(String groupName, String serviceName); + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + Completable startAsync(String groupName, String serviceName); + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + Completable stopAsync(String groupName, String serviceName); + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters); + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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 listSkusAsync(final String groupName, final String serviceName); + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Severity.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Severity.java new file mode 100644 index 000000000000..62eb7c3a57a0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Severity.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Severity. + */ +public final class Severity extends ExpandableStringEnum { + /** Static value Message for Severity. */ + public static final Severity MESSAGE = fromString("Message"); + + /** Static value Warning for Severity. */ + public static final Severity WARNING = fromString("Warning"); + + /** Static value Error for Severity. */ + public static final Severity ERROR = fromString("Error"); + + /** + * Creates or finds a Severity from its string representation. + * @param name a name to look for + * @return the corresponding Severity + */ + @JsonCreator + public static Severity fromString(String name) { + return fromString(name, Severity.class); + } + + /** + * @return known Severity values + */ + public static Collection values() { + return values(Severity.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SqlConnectionInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SqlConnectionInfo.java new file mode 100644 index 000000000000..81747283d0e6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SqlConnectionInfo.java @@ -0,0 +1,154 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Information for connecting to SQL database server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("SqlConnectionInfo") +public class SqlConnectionInfo extends ConnectionInfo { + /** + * Data source in the format + * Protocol:MachineName\SQLServerInstanceName,PortNumber. + */ + @JsonProperty(value = "dataSource", required = true) + private String dataSource; + + /** + * Authentication type to use for connection. Possible values include: + * 'None', 'WindowsAuthentication', 'SqlAuthentication', + * 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. + */ + @JsonProperty(value = "authentication") + private AuthenticationType authentication; + + /** + * Whether to encrypt the connection. + */ + @JsonProperty(value = "encryptConnection") + private Boolean encryptConnection; + + /** + * Additional connection settings. + */ + @JsonProperty(value = "additionalSettings") + private String additionalSettings; + + /** + * Whether to trust the server certificate. + */ + @JsonProperty(value = "trustServerCertificate") + private Boolean trustServerCertificate; + + /** + * Get data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber. + * + * @return the dataSource value + */ + public String dataSource() { + return this.dataSource; + } + + /** + * Set data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber. + * + * @param dataSource the dataSource value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withDataSource(String dataSource) { + this.dataSource = dataSource; + return this; + } + + /** + * Get authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SqlAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. + * + * @return the authentication value + */ + public AuthenticationType authentication() { + return this.authentication; + } + + /** + * Set authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SqlAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. + * + * @param authentication the authentication value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withAuthentication(AuthenticationType authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get whether to encrypt the connection. + * + * @return the encryptConnection value + */ + public Boolean encryptConnection() { + return this.encryptConnection; + } + + /** + * Set whether to encrypt the connection. + * + * @param encryptConnection the encryptConnection value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withEncryptConnection(Boolean encryptConnection) { + this.encryptConnection = encryptConnection; + return this; + } + + /** + * Get additional connection settings. + * + * @return the additionalSettings value + */ + public String additionalSettings() { + return this.additionalSettings; + } + + /** + * Set additional connection settings. + * + * @param additionalSettings the additionalSettings value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withAdditionalSettings(String additionalSettings) { + this.additionalSettings = additionalSettings; + return this; + } + + /** + * Get whether to trust the server certificate. + * + * @return the trustServerCertificate value + */ + public Boolean trustServerCertificate() { + return this.trustServerCertificate; + } + + /** + * Set whether to trust the server certificate. + * + * @param trustServerCertificate the trustServerCertificate value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withTrustServerCertificate(Boolean trustServerCertificate) { + this.trustServerCertificate = trustServerCertificate; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SqlMigrationTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SqlMigrationTaskInput.java new file mode 100644 index 000000000000..d8901b6b2ab6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SqlMigrationTaskInput.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class for migration task input. + */ +public class SqlMigrationTaskInput { + /** + * Information for connecting to source. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Information for connecting to target. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Get information for connecting to source. + * + * @return the sourceConnectionInfo value + */ + public SqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set information for connecting to source. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the SqlMigrationTaskInput object itself. + */ + public SqlMigrationTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get information for connecting to target. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set information for connecting to target. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the SqlMigrationTaskInput object itself. + */ + public SqlMigrationTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/StartMigrationScenarioServerRoleResult.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/StartMigrationScenarioServerRoleResult.java new file mode 100644 index 000000000000..847e2c9128ba --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/StartMigrationScenarioServerRoleResult.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Server role migration result. + */ +public class StartMigrationScenarioServerRoleResult { + /** + * Name of server role. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * 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 exceptions and warnings. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Get name of server role. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * 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 exceptions and warnings. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/TaskState.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/TaskState.java new file mode 100644 index 000000000000..f295e16a8852 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/TaskState.java @@ -0,0 +1,59 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TaskState. + */ +public final class TaskState extends ExpandableStringEnum { + /** Static value Unknown for TaskState. */ + public static final TaskState UNKNOWN = fromString("Unknown"); + + /** Static value Queued for TaskState. */ + public static final TaskState QUEUED = fromString("Queued"); + + /** Static value Running for TaskState. */ + public static final TaskState RUNNING = fromString("Running"); + + /** Static value Canceled for TaskState. */ + public static final TaskState CANCELED = fromString("Canceled"); + + /** Static value Succeeded for TaskState. */ + public static final TaskState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for TaskState. */ + public static final TaskState FAILED = fromString("Failed"); + + /** Static value FailedInputValidation for TaskState. */ + public static final TaskState FAILED_INPUT_VALIDATION = fromString("FailedInputValidation"); + + /** Static value Faulted for TaskState. */ + public static final TaskState FAULTED = fromString("Faulted"); + + /** + * Creates or finds a TaskState from its string representation. + * @param name a name to look for + * @return the corresponding TaskState + */ + @JsonCreator + public static TaskState fromString(String name) { + return fromString(name, TaskState.class); + } + + /** + * @return known TaskState values + */ + public static Collection values() { + return values(TaskState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Tasks.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Tasks.java new file mode 100644 index 000000000000..ab2cf38e0582 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Tasks.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.TasksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Tasks. + */ +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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable cancelAsync(String groupName, String serviceName, String projectName, String taskName); + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String groupName, String serviceName, String projectName, String taskName); + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String groupName, final String serviceName, final String projectName); + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String groupName, String serviceName, String projectName, String taskName); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/UpdateActionType.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/UpdateActionType.java new file mode 100644 index 000000000000..157449a490e9 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/UpdateActionType.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for UpdateActionType. + */ +public final class UpdateActionType extends ExpandableStringEnum { + /** Static value DeletedOnTarget for UpdateActionType. */ + public static final UpdateActionType DELETED_ON_TARGET = fromString("DeletedOnTarget"); + + /** Static value ChangedOnTarget for UpdateActionType. */ + public static final UpdateActionType CHANGED_ON_TARGET = fromString("ChangedOnTarget"); + + /** Static value AddedOnTarget for UpdateActionType. */ + public static final UpdateActionType ADDED_ON_TARGET = fromString("AddedOnTarget"); + + /** + * Creates or finds a UpdateActionType from its string representation. + * @param name a name to look for + * @return the corresponding UpdateActionType + */ + @JsonCreator + public static UpdateActionType fromString(String name) { + return fromString(name, UpdateActionType.class); + } + + /** + * @return known UpdateActionType values + */ + public static Collection values() { + return values(UpdateActionType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Usages.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Usages.java new file mode 100644 index 000000000000..0c30bb018de5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/Usages.java @@ -0,0 +1,29 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation.UsagesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Usages. + */ +public interface Usages extends HasInner { + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskInput.java new file mode 100644 index 000000000000..e56a892f0c4e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskInput.java @@ -0,0 +1,124 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for task that validates migration input for SQL to Azure SQL Managed + * Instance. + */ +public class ValidateMigrationInputSqlServerSqlMITaskInput { + /** + * Information for connecting to target. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * 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; + + /** + * SAS URI of Azure Storage Account Container to be used for storing backup + * files. + */ + @JsonProperty(value = "backupBlobShare", required = true) + private BlobShare backupBlobShare; + + /** + * Get information for connecting to target. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set information for connecting to target. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * 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 ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput 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 ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput withBackupFileShare(FileShare backupFileShare) { + this.backupFileShare = backupFileShare; + return this; + } + + /** + * Get sAS URI of Azure Storage Account Container to be used for storing backup files. + * + * @return the backupBlobShare value + */ + public BlobShare backupBlobShare() { + return this.backupBlobShare; + } + + /** + * Set sAS URI of Azure Storage Account Container to be used for storing backup files. + * + * @param backupBlobShare the backupBlobShare value to set + * @return the ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput withBackupBlobShare(BlobShare backupBlobShare) { + this.backupBlobShare = backupBlobShare; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskOutput.java new file mode 100644 index 000000000000..c9a46392888b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskOutput.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for task that validates migration input for SQL to Azure SQL Managed + * Instance migrations. + */ +public class ValidateMigrationInputSqlServerSqlMITaskOutput { + /** + * Result 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 the RestoreDatabaseName. + */ + @JsonProperty(value = "restoreDatabaseNameErrors", access = JsonProperty.Access.WRITE_ONLY) + private List restoreDatabaseNameErrors; + + /** + * Errors associated with the BackupFolder path. + */ + @JsonProperty(value = "backupFolderErrors", access = JsonProperty.Access.WRITE_ONLY) + private List backupFolderErrors; + + /** + * Errors associated with backup share user name and password credentials. + */ + @JsonProperty(value = "backupShareCredentialsErrors", access = JsonProperty.Access.WRITE_ONLY) + private List backupShareCredentialsErrors; + + /** + * Errors associated with the storage account provided. + */ + @JsonProperty(value = "backupStorageAccountErrors", access = JsonProperty.Access.WRITE_ONLY) + private List backupStorageAccountErrors; + + /** + * Get result 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 the RestoreDatabaseName. + * + * @return the restoreDatabaseNameErrors value + */ + public List restoreDatabaseNameErrors() { + return this.restoreDatabaseNameErrors; + } + + /** + * Get errors associated with the BackupFolder path. + * + * @return the backupFolderErrors value + */ + public List backupFolderErrors() { + return this.backupFolderErrors; + } + + /** + * Get errors associated with backup share user name and password credentials. + * + * @return the backupShareCredentialsErrors value + */ + public List backupShareCredentialsErrors() { + return this.backupShareCredentialsErrors; + } + + /** + * Get errors associated with the storage account provided. + * + * @return the backupStorageAccountErrors value + */ + public List backupStorageAccountErrors() { + return this.backupStorageAccountErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java new file mode 100644 index 000000000000..60dea5b2a34e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.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.azuredatabasemigrationservice.v2018_03_31_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. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ValidateMigrationInput.SqlServer.AzureSqlDbMI") +public class ValidateMigrationInputSqlServerSqlMITaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ValidateMigrationInputSqlServerSqlMITaskInput 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 ValidateMigrationInputSqlServerSqlMITaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ValidateMigrationInputSqlServerSqlMITaskProperties object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskProperties withInput(ValidateMigrationInputSqlServerSqlMITaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidationError.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidationError.java new file mode 100644 index 000000000000..f0c266767002 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidationError.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description about the errors happen while performing migration validation. + */ +public class ValidationError { + /** + * Error Text. + */ + @JsonProperty(value = "text") + private String text; + + /** + * Severity of the error. Possible values include: 'Message', 'Warning', + * 'Error'. + */ + @JsonProperty(value = "severity") + private Severity severity; + + /** + * Get error Text. + * + * @return the text value + */ + public String text() { + return this.text; + } + + /** + * Set error Text. + * + * @param text the text value to set + * @return the ValidationError object itself. + */ + public ValidationError withText(String text) { + this.text = text; + return this; + } + + /** + * Get severity of the error. Possible values include: 'Message', 'Warning', 'Error'. + * + * @return the severity value + */ + public Severity severity() { + return this.severity; + } + + /** + * Set severity of the error. Possible values include: 'Message', 'Warning', 'Error'. + * + * @param severity the severity value to set + * @return the ValidationError object itself. + */ + public ValidationError withSeverity(Severity severity) { + this.severity = severity; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidationStatus.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidationStatus.java new file mode 100644 index 000000000000..58347bb7f349 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/ValidationStatus.java @@ -0,0 +1,59 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ValidationStatus. + */ +public final class ValidationStatus extends ExpandableStringEnum { + /** Static value Default for ValidationStatus. */ + public static final ValidationStatus DEFAULT = fromString("Default"); + + /** Static value NotStarted for ValidationStatus. */ + public static final ValidationStatus NOT_STARTED = fromString("NotStarted"); + + /** Static value Initialized for ValidationStatus. */ + public static final ValidationStatus INITIALIZED = fromString("Initialized"); + + /** Static value InProgress for ValidationStatus. */ + public static final ValidationStatus IN_PROGRESS = fromString("InProgress"); + + /** Static value Completed for ValidationStatus. */ + public static final ValidationStatus COMPLETED = fromString("Completed"); + + /** Static value CompletedWithIssues for ValidationStatus. */ + public static final ValidationStatus COMPLETED_WITH_ISSUES = fromString("CompletedWithIssues"); + + /** Static value Failed for ValidationStatus. */ + public static final ValidationStatus FAILED = fromString("Failed"); + + /** Static value Stopped for ValidationStatus. */ + public static final ValidationStatus STOPPED = fromString("Stopped"); + + /** + * Creates or finds a ValidationStatus from its string representation. + * @param name a name to look for + * @return the corresponding ValidationStatus + */ + @JsonCreator + public static ValidationStatus fromString(String name) { + return fromString(name, ValidationStatus.class); + } + + /** + * @return known ValidationStatus values + */ + public static Collection values() { + return values(ValidationStatus.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/WaitStatistics.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/WaitStatistics.java new file mode 100644 index 000000000000..cbceded127cb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/WaitStatistics.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.azuredatabasemigrationservice.v2018_03_31_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Wait statistics gathered during query batch execution. + */ +public class WaitStatistics { + /** + * Type of the Wait. + */ + @JsonProperty(value = "waitType") + private String waitType; + + /** + * Total wait time in millisecond(s). + */ + @JsonProperty(value = "waitTimeMs") + private Double waitTimeMs; + + /** + * Total no. of waits. + */ + @JsonProperty(value = "waitCount") + private Long waitCount; + + /** + * Get type of the Wait. + * + * @return the waitType value + */ + public String waitType() { + return this.waitType; + } + + /** + * Set type of the Wait. + * + * @param waitType the waitType value to set + * @return the WaitStatistics object itself. + */ + public WaitStatistics withWaitType(String waitType) { + this.waitType = waitType; + return this; + } + + /** + * Get total wait time in millisecond(s). + * + * @return the waitTimeMs value + */ + public Double waitTimeMs() { + return this.waitTimeMs; + } + + /** + * Set total wait time in millisecond(s). + * + * @param waitTimeMs the waitTimeMs value to set + * @return the WaitStatistics object itself. + */ + public WaitStatistics withWaitTimeMs(Double waitTimeMs) { + this.waitTimeMs = waitTimeMs; + return this; + } + + /** + * Get total no. of waits. + * + * @return the waitCount value + */ + public Long waitCount() { + return this.waitCount; + } + + /** + * Set total no. of waits. + * + * @param waitCount the waitCount value to set + * @return the WaitStatistics object itself. + */ + public WaitStatistics withWaitCount(Long waitCount) { + this.waitCount = waitCount; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/AvailableServiceSkuImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/AvailableServiceSkuImpl.java new file mode 100644 index 000000000000..d124522e57bb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/AvailableServiceSkuImpl.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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.AvailableServiceSku; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.AvailableServiceSkuCapacity; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.AvailableServiceSkuSku; + +class AvailableServiceSkuImpl extends WrapperImpl implements AvailableServiceSku { + private final DataMigrationManager manager; + + AvailableServiceSkuImpl(AvailableServiceSkuInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + + + @Override + public AvailableServiceSkuCapacity capacity() { + return this.inner().capacity(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public AvailableServiceSkuSku sku() { + return this.inner().sku(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/AvailableServiceSkuInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/AvailableServiceSkuInner.java new file mode 100644 index 000000000000..c58b0d44fe05 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/AvailableServiceSkuInner.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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.AvailableServiceSkuSku; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.AvailableServiceSkuCapacity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the available service SKU. + */ +public class AvailableServiceSkuInner { + /** + * The resource type, including the provider namespace. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /** + * SKU name, tier, etc. + */ + @JsonProperty(value = "sku") + private AvailableServiceSkuSku sku; + + /** + * A description of the scaling capacities of the SKU. + */ + @JsonProperty(value = "capacity") + private AvailableServiceSkuCapacity capacity; + + /** + * Get the resource type, including the provider namespace. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resource type, including the provider namespace. + * + * @param resourceType the resourceType value to set + * @return the AvailableServiceSkuInner object itself. + */ + public AvailableServiceSkuInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get sKU name, tier, etc. + * + * @return the sku value + */ + public AvailableServiceSkuSku sku() { + return this.sku; + } + + /** + * Set sKU name, tier, etc. + * + * @param sku the sku value to set + * @return the AvailableServiceSkuInner object itself. + */ + public AvailableServiceSkuInner withSku(AvailableServiceSkuSku sku) { + this.sku = sku; + return this; + } + + /** + * Get a description of the scaling capacities of the SKU. + * + * @return the capacity value + */ + public AvailableServiceSkuCapacity capacity() { + return this.capacity; + } + + /** + * Set a description of the scaling capacities of the SKU. + * + * @param capacity the capacity value to set + * @return the AvailableServiceSkuInner object itself. + */ + public AvailableServiceSkuInner withCapacity(AvailableServiceSkuCapacity capacity) { + this.capacity = capacity; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationManager.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationManager.java new file mode 100644 index 000000000000..ad30c8530acf --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationManager.java @@ -0,0 +1,159 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkus; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Services; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Tasks; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Projects; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Usages; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Operations; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure DataMigration resource management. + */ +public final class DataMigrationManager extends ManagerCore { + private ResourceSkus resourceSkus; + private Services services; + private Tasks tasks; + private Projects projects; + private Usages usages; + private Operations operations; + /** + * Get a Configurable instance that can be used to create DataMigrationManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new DataMigrationManager.ConfigurableImpl(); + } + /** + * Creates an instance of DataMigrationManager that exposes DataMigration resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the DataMigrationManager + */ + public static DataMigrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new DataMigrationManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of DataMigrationManager that exposes DataMigration resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the DataMigrationManager + */ + public static DataMigrationManager authenticate(RestClient restClient, String subscriptionId) { + return new DataMigrationManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of DataMigrationManager that exposes DataMigration management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing DataMigration management API entry points that work across subscriptions + */ + DataMigrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage ResourceSkus. + */ + public ResourceSkus resourceSkus() { + if (this.resourceSkus == null) { + this.resourceSkus = new ResourceSkusImpl(this); + } + return this.resourceSkus; + } + + /** + * @return Entry point to manage Services. + */ + public Services services() { + if (this.services == null) { + this.services = new ServicesImpl(this); + } + return this.services; + } + + /** + * @return Entry point to manage Tasks. + */ + public Tasks tasks() { + if (this.tasks == null) { + this.tasks = new TasksImpl(this); + } + return this.tasks; + } + + /** + * @return Entry point to manage Projects. + */ + public Projects projects() { + if (this.projects == null) { + this.projects = new ProjectsImpl(this); + } + return this.projects; + } + + /** + * @return Entry point to manage Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(this); + } + return this.usages; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public DataMigrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return DataMigrationManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private DataMigrationManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new DataMigrationServiceClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceClientImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceClientImpl.java new file mode 100644 index 000000000000..5628818e1167 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceClientImpl.java @@ -0,0 +1,266 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the DataMigrationServiceClientImpl class. + */ +public class DataMigrationServiceClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Version of the API. */ + private String apiVersion; + + /** + * Gets Version of the API. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** Identifier of the subscription. */ + private String subscriptionId; + + /** + * Gets Identifier of the subscription. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Identifier of the subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The ResourceSkusInner object to access its operations. + */ + private ResourceSkusInner resourceSkus; + + /** + * Gets the ResourceSkusInner object to access its operations. + * @return the ResourceSkusInner object. + */ + public ResourceSkusInner resourceSkus() { + return this.resourceSkus; + } + + /** + * The ServicesInner object to access its operations. + */ + private ServicesInner services; + + /** + * Gets the ServicesInner object to access its operations. + * @return the ServicesInner object. + */ + public ServicesInner services() { + return this.services; + } + + /** + * The TasksInner object to access its operations. + */ + private TasksInner tasks; + + /** + * Gets the TasksInner object to access its operations. + * @return the TasksInner object. + */ + public TasksInner tasks() { + return this.tasks; + } + + /** + * The ProjectsInner object to access its operations. + */ + private ProjectsInner projects; + + /** + * Gets the ProjectsInner object to access its operations. + * @return the ProjectsInner object. + */ + public ProjectsInner projects() { + return this.projects; + } + + /** + * The UsagesInner object to access its operations. + */ + private UsagesInner usages; + + /** + * Gets the UsagesInner object to access its operations. + * @return the UsagesInner object. + */ + public UsagesInner usages() { + return this.usages; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * Initializes an instance of DataMigrationServiceClient client. + * + * @param credentials the management credentials for Azure + */ + public DataMigrationServiceClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of DataMigrationServiceClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public DataMigrationServiceClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of DataMigrationServiceClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public DataMigrationServiceClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2018-03-31-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.resourceSkus = new ResourceSkusInner(restClient().retrofit(), this); + this.services = new ServicesInner(restClient().retrofit(), this); + this.tasks = new TasksInner(restClient().retrofit(), this); + this.projects = new ProjectsInner(restClient().retrofit(), this); + this.usages = new UsagesInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "DataMigrationServiceClient", "2018-03-31-preview"); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceImpl.java new file mode 100644 index 000000000000..09db4b085c96 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceImpl.java @@ -0,0 +1,108 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.DataMigrationService; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ServiceProvisioningState; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ServiceSku; + +class DataMigrationServiceImpl extends GroupableResourceCoreImpl implements DataMigrationService, DataMigrationService.Definition, DataMigrationService.Update { + DataMigrationServiceImpl(String name, DataMigrationServiceInner inner, DataMigrationManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ServicesInner client = this.manager().inner().services(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ServicesInner client = this.manager().inner().services(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ServicesInner client = this.manager().inner().services(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public ServiceProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String publicKey() { + return this.inner().publicKey(); + } + + @Override + public ServiceSku sku() { + return this.inner().sku(); + } + + @Override + public String virtualSubnetId() { + return this.inner().virtualSubnetId(); + } + + @Override + public DataMigrationServiceImpl withVirtualSubnetId(String virtualSubnetId) { + this.inner().withVirtualSubnetId(virtualSubnetId); + return this; + } + + @Override + public DataMigrationServiceImpl withEtag(String etag) { + this.inner().withEtag(etag); + return this; + } + + @Override + public DataMigrationServiceImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public DataMigrationServiceImpl withPublicKey(String publicKey) { + this.inner().withPublicKey(publicKey); + return this; + } + + @Override + public DataMigrationServiceImpl withSku(ServiceSku sku) { + this.inner().withSku(sku); + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceInner.java new file mode 100644 index 000000000000..68dcff8f5571 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceInner.java @@ -0,0 +1,171 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ServiceProvisioningState; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ServiceSku; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * A Data Migration Service resource. + */ +@JsonFlatten +public class DataMigrationServiceInner extends Resource { + /** + * HTTP strong entity tag value. Ignored if submitted. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * The resource kind. Only 'vm' (the default) is supported. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * The resource's provisioning state. Possible values include: 'Accepted', + * 'Deleting', 'Deploying', 'Stopped', 'Stopping', 'Starting', + * 'FailedToStart', 'FailedToStop', 'Succeeded', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ServiceProvisioningState provisioningState; + + /** + * The public key of the service, used to encrypt secrets sent to the + * service. + */ + @JsonProperty(value = "properties.publicKey") + private String publicKey; + + /** + * The ID of the Microsoft.Network/virtualNetworks/subnets resource to + * which the service should be joined. + */ + @JsonProperty(value = "properties.virtualSubnetId", required = true) + private String virtualSubnetId; + + /** + * Service SKU. + */ + @JsonProperty(value = "sku") + private ServiceSku sku; + + /** + * Get hTTP strong entity tag value. Ignored if submitted. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set hTTP strong entity tag value. Ignored if submitted. + * + * @param etag the etag value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the resource kind. Only 'vm' (the default) is supported. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set the resource kind. Only 'vm' (the default) is supported. + * + * @param kind the kind value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the resource's provisioning state. Possible values include: 'Accepted', 'Deleting', 'Deploying', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop', 'Succeeded', 'Failed'. + * + * @return the provisioningState value + */ + public ServiceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the public key of the service, used to encrypt secrets sent to the service. + * + * @return the publicKey value + */ + public String publicKey() { + return this.publicKey; + } + + /** + * Set the public key of the service, used to encrypt secrets sent to the service. + * + * @param publicKey the publicKey value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withPublicKey(String publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * Get the ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined. + * + * @return the virtualSubnetId value + */ + public String virtualSubnetId() { + return this.virtualSubnetId; + } + + /** + * Set the ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined. + * + * @param virtualSubnetId the virtualSubnetId value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withVirtualSubnetId(String virtualSubnetId) { + this.virtualSubnetId = virtualSubnetId; + return this; + } + + /** + * Get service SKU. + * + * @return the sku value + */ + public ServiceSku sku() { + return this.sku; + } + + /** + * Set service SKU. + * + * @param sku the sku value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withSku(ServiceSku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceStatusResponseImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceStatusResponseImpl.java new file mode 100644 index 000000000000..a3bbf7a6dffe --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceStatusResponseImpl.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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.DataMigrationServiceStatusResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class DataMigrationServiceStatusResponseImpl extends WrapperImpl implements DataMigrationServiceStatusResponse { + private final DataMigrationManager manager; + DataMigrationServiceStatusResponseImpl(DataMigrationServiceStatusResponseInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public String agentVersion() { + return this.inner().agentVersion(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public List supportedTaskTypes() { + return this.inner().supportedTaskTypes(); + } + + @Override + public String vmSize() { + return this.inner().vmSize(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceStatusResponseInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceStatusResponseInner.java new file mode 100644 index 000000000000..b22ced6d1437 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/DataMigrationServiceStatusResponseInner.java @@ -0,0 +1,124 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Service health status. + */ +public class DataMigrationServiceStatusResponseInner { + /** + * The DMS instance agent version. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * The machine-readable status, such as 'Initializing', 'Offline', + * 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', + * 'FailedToStart', 'FailedToStop' or 'Failed'. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The services virtual machine size, such as 'Standard_D2_v2'. + */ + @JsonProperty(value = "vmSize") + private String vmSize; + + /** + * The list of supported task types. + */ + @JsonProperty(value = "supportedTaskTypes") + private List supportedTaskTypes; + + /** + * Get the DMS instance agent version. + * + * @return the agentVersion value + */ + public String agentVersion() { + return this.agentVersion; + } + + /** + * Set the DMS instance agent version. + * + * @param agentVersion the agentVersion value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get the machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed'. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed'. + * + * @param status the status value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the services virtual machine size, such as 'Standard_D2_v2'. + * + * @return the vmSize value + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set the services virtual machine size, such as 'Standard_D2_v2'. + * + * @param vmSize the vmSize value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withVmSize(String vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the list of supported task types. + * + * @return the supportedTaskTypes value + */ + public List supportedTaskTypes() { + return this.supportedTaskTypes; + } + + /** + * Set the list of supported task types. + * + * @param supportedTaskTypes the supportedTaskTypes value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withSupportedTaskTypes(List supportedTaskTypes) { + this.supportedTaskTypes = supportedTaskTypes; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/IdParsingUtils.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..220ef9f0b8f8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/NameAvailabilityResponseImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/NameAvailabilityResponseImpl.java new file mode 100644 index 000000000000..25fbb9cf1a1a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/NameAvailabilityResponseImpl.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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.NameAvailabilityResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.NameCheckFailureReason; + +class NameAvailabilityResponseImpl extends WrapperImpl implements NameAvailabilityResponse { + private final DataMigrationManager manager; + NameAvailabilityResponseImpl(NameAvailabilityResponseInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public NameCheckFailureReason reason() { + return this.inner().reason(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/NameAvailabilityResponseInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/NameAvailabilityResponseInner.java new file mode 100644 index 000000000000..261c51d3ee72 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/NameAvailabilityResponseInner.java @@ -0,0 +1,99 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.NameCheckFailureReason; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Indicates whether a proposed resource name is available. + */ +public class NameAvailabilityResponseInner { + /** + * If true, the name is valid and available. If false, 'reason' describes + * why not. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /** + * The reason why the name is not available, if nameAvailable is false. + * Possible values include: 'AlreadyExists', 'Invalid'. + */ + @JsonProperty(value = "reason") + private NameCheckFailureReason reason; + + /** + * The localized reason why the name is not available, if nameAvailable is + * false. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get if true, the name is valid and available. If false, 'reason' describes why not. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set if true, the name is valid and available. If false, 'reason' describes why not. + * + * @param nameAvailable the nameAvailable value to set + * @return the NameAvailabilityResponseInner object itself. + */ + public NameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid'. + * + * @return the reason value + */ + public NameCheckFailureReason reason() { + return this.reason; + } + + /** + * Set the reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid'. + * + * @param reason the reason value to set + * @return the NameAvailabilityResponseInner object itself. + */ + public NameAvailabilityResponseInner withReason(NameCheckFailureReason reason) { + this.reason = reason; + return this; + } + + /** + * Get the localized reason why the name is not available, if nameAvailable is false. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the localized reason why the name is not available, if nameAvailable is false. + * + * @param message the message value to set + * @return the NameAvailabilityResponseInner object itself. + */ + public NameAvailabilityResponseInner withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/OperationsImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/OperationsImpl.java new file mode 100644 index 000000000000..a311684ee33f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/OperationsImpl.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. + * abc + */ + +package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ServiceOperation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final DataMigrationManager manager; + + OperationsImpl(DataMigrationManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceOperation call(ServiceOperationInner inner) { + return new ServiceOperationImpl(inner, manager()); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/OperationsInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/OperationsInner.java new file mode 100644 index 000000000000..dbf5c72ab4b4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/OperationsInner.java @@ -0,0 +1,293 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_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.azuredatabasemigrationservice.v2018_03_31_preview.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +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 Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Operations list" }) + @GET("providers/Microsoft.DataMigration/operations") + Observable> list(@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.azuredatabasemigrationservice.v2018_03_31_preview.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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<ServiceOperationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceOperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceOperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceOperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), 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); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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<ServiceOperationInner> 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 available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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 available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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<ServiceOperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + * @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<ServiceOperationInner> 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 available resource provider actions (operations). + * Lists all available actions exposed by the Data Migration Service resource provider. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceOperationInner> 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/PageImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/PageImpl.java new file mode 100644 index 000000000000..5375ed0ef6ec --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectImpl.java new file mode 100644 index 000000000000..0362acb2f38a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectImpl.java @@ -0,0 +1,189 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Project; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.Map; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ProjectSourcePlatform; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ProjectTargetPlatform; +import org.joda.time.DateTime; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ConnectionInfo; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.DatabaseInfo; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ProjectProvisioningState; + +class ProjectImpl extends CreatableUpdatableImpl implements Project, Project.Definition, Project.Update { + private final DataMigrationManager manager; + private String groupName; + private String serviceName; + private String projectName; + + ProjectImpl(String name, DataMigrationManager manager) { + super(name, new ProjectInner()); + this.manager = manager; + // Set resource name + this.projectName = name; + // + } + + ProjectImpl(ProjectInner inner, DataMigrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.projectName = inner.name(); + // set resource ancestor and positional variables + this.groupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "services"); + this.projectName = IdParsingUtils.getValueFromIdByName(inner.id(), "projects"); + // + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ProjectsInner client = this.manager().inner().projects(); + return client.createOrUpdateAsync(this.groupName, this.serviceName, this.projectName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ProjectsInner client = this.manager().inner().projects(); + return client.updateAsync(this.groupName, this.serviceName, this.projectName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ProjectsInner client = this.manager().inner().projects(); + return client.getAsync(this.groupName, this.serviceName, this.projectName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public DateTime creationTime() { + return this.inner().creationTime(); + } + + @Override + public List databasesInfo() { + return this.inner().databasesInfo(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProjectProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public ConnectionInfo sourceConnectionInfo() { + return this.inner().sourceConnectionInfo(); + } + + @Override + public ProjectSourcePlatform sourcePlatform() { + return this.inner().sourcePlatform(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public ConnectionInfo targetConnectionInfo() { + return this.inner().targetConnectionInfo(); + } + + @Override + public ProjectTargetPlatform targetPlatform() { + return this.inner().targetPlatform(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ProjectImpl withExistingService(String groupName, String serviceName) { + this.groupName = groupName; + this.serviceName = serviceName; + return this; + } + + @Override + public ProjectImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public ProjectImpl withSourcePlatform(ProjectSourcePlatform sourcePlatform) { + this.inner().withSourcePlatform(sourcePlatform); + return this; + } + + @Override + public ProjectImpl withTargetPlatform(ProjectTargetPlatform targetPlatform) { + this.inner().withTargetPlatform(targetPlatform); + return this; + } + + @Override + public ProjectImpl withDatabasesInfo(List databasesInfo) { + this.inner().withDatabasesInfo(databasesInfo); + return this; + } + + @Override + public ProjectImpl withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo) { + this.inner().withSourceConnectionInfo(sourceConnectionInfo); + return this; + } + + @Override + public ProjectImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + + @Override + public ProjectImpl withTargetConnectionInfo(ConnectionInfo targetConnectionInfo) { + this.inner().withTargetConnectionInfo(targetConnectionInfo); + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectInner.java new file mode 100644 index 000000000000..90a9f3d6bb9d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectInner.java @@ -0,0 +1,190 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ProjectSourcePlatform; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ProjectTargetPlatform; +import org.joda.time.DateTime; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ConnectionInfo; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.DatabaseInfo; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ProjectProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * A project resource. + */ +@JsonFlatten +public class ProjectInner extends Resource { + /** + * Source platform for the project. Possible values include: 'SQL', + * 'Unknown'. + */ + @JsonProperty(value = "properties.sourcePlatform", required = true) + private ProjectSourcePlatform sourcePlatform; + + /** + * Target platform for the project. Possible values include: 'SQLDB', + * 'SQLMI', 'Unknown'. + */ + @JsonProperty(value = "properties.targetPlatform", required = true) + private ProjectTargetPlatform targetPlatform; + + /** + * UTC Date and time when project was created. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * Information for connecting to source. + */ + @JsonProperty(value = "properties.sourceConnectionInfo") + private ConnectionInfo sourceConnectionInfo; + + /** + * Information for connecting to target. + */ + @JsonProperty(value = "properties.targetConnectionInfo") + private ConnectionInfo targetConnectionInfo; + + /** + * List of DatabaseInfo. + */ + @JsonProperty(value = "properties.databasesInfo") + private List databasesInfo; + + /** + * The project's provisioning state. Possible values include: 'Deleting', + * 'Succeeded'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProjectProvisioningState provisioningState; + + /** + * Get source platform for the project. Possible values include: 'SQL', 'Unknown'. + * + * @return the sourcePlatform value + */ + public ProjectSourcePlatform sourcePlatform() { + return this.sourcePlatform; + } + + /** + * Set source platform for the project. Possible values include: 'SQL', 'Unknown'. + * + * @param sourcePlatform the sourcePlatform value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withSourcePlatform(ProjectSourcePlatform sourcePlatform) { + this.sourcePlatform = sourcePlatform; + return this; + } + + /** + * Get target platform for the project. Possible values include: 'SQLDB', 'SQLMI', 'Unknown'. + * + * @return the targetPlatform value + */ + public ProjectTargetPlatform targetPlatform() { + return this.targetPlatform; + } + + /** + * Set target platform for the project. Possible values include: 'SQLDB', 'SQLMI', 'Unknown'. + * + * @param targetPlatform the targetPlatform value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withTargetPlatform(ProjectTargetPlatform targetPlatform) { + this.targetPlatform = targetPlatform; + return this; + } + + /** + * Get uTC Date and time when project was created. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get information for connecting to source. + * + * @return the sourceConnectionInfo value + */ + public ConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set information for connecting to source. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get information for connecting to target. + * + * @return the targetConnectionInfo value + */ + public ConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set information for connecting to target. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withTargetConnectionInfo(ConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * Get list of DatabaseInfo. + * + * @return the databasesInfo value + */ + public List databasesInfo() { + return this.databasesInfo; + } + + /** + * Set list of DatabaseInfo. + * + * @param databasesInfo the databasesInfo value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withDatabasesInfo(List databasesInfo) { + this.databasesInfo = databasesInfo; + return this; + } + + /** + * Get the project's provisioning state. Possible values include: 'Deleting', 'Succeeded'. + * + * @return the provisioningState value + */ + public ProjectProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectTaskImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectTaskImpl.java new file mode 100644 index 000000000000..e4ff14932cf7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectTaskImpl.java @@ -0,0 +1,120 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ProjectTask; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ProjectTaskProperties; + +class ProjectTaskImpl extends CreatableUpdatableImpl implements ProjectTask, ProjectTask.Definition, ProjectTask.Update { + private final DataMigrationManager manager; + private String groupName; + private String serviceName; + private String projectName; + private String taskName; + + ProjectTaskImpl(String name, DataMigrationManager manager) { + super(name, new ProjectTaskInner()); + this.manager = manager; + // Set resource name + this.taskName = name; + // + } + + ProjectTaskImpl(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.projectName = IdParsingUtils.getValueFromIdByName(inner.id(), "projects"); + this.taskName = IdParsingUtils.getValueFromIdByName(inner.id(), "tasks"); + // + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + 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() { + TasksInner client = this.manager().inner().tasks(); + return client.updateAsync(this.groupName, this.serviceName, this.projectName, this.taskName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + TasksInner client = this.manager().inner().tasks(); + return client.getAsync(this.groupName, this.serviceName, this.projectName, 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 ProjectTaskImpl withExistingProject(String groupName, String serviceName, String projectName) { + this.groupName = groupName; + this.serviceName = serviceName; + this.projectName = projectName; + return this; + } + + @Override + public ProjectTaskImpl withEtag(String etag) { + this.inner().withEtag(etag); + return this; + } + + @Override + public ProjectTaskImpl withProperties(ProjectTaskProperties properties) { + this.inner().withProperties(properties); + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectTaskInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectTaskInner.java new file mode 100644 index 000000000000..70656f369bda --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectTaskInner.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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ProjectTaskProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * A task resource. + */ +public class ProjectTaskInner extends ProxyResource { + /** + * HTTP strong entity tag value. This is ignored if submitted. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * Custom task properties. + */ + @JsonProperty(value = "properties") + private ProjectTaskProperties properties; + + /** + * Get hTTP strong entity tag value. This is ignored if submitted. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set hTTP strong entity tag value. This is ignored if submitted. + * + * @param etag the etag value to set + * @return the ProjectTaskInner object itself. + */ + public ProjectTaskInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get custom task properties. + * + * @return the properties value + */ + public ProjectTaskProperties properties() { + return this.properties; + } + + /** + * Set custom task properties. + * + * @param properties the properties value to set + * @return the ProjectTaskInner object itself. + */ + public ProjectTaskInner withProperties(ProjectTaskProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectsImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectsImpl.java new file mode 100644 index 000000000000..5f520a618a74 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectsImpl.java @@ -0,0 +1,81 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Projects; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Project; + +class ProjectsImpl extends WrapperImpl implements Projects { + private final DataMigrationManager manager; + + ProjectsImpl(DataMigrationManager manager) { + super(manager.inner().projects()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ProjectImpl define(String name) { + return wrapModel(name); + } + + private ProjectImpl wrapModel(ProjectInner inner) { + return new ProjectImpl(inner, manager()); + } + + private ProjectImpl wrapModel(String name) { + return new ProjectImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String groupName, final String serviceName) { + ProjectsInner 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 Project call(ProjectInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String groupName, String serviceName, String projectName) { + ProjectsInner client = this.inner(); + return client.getAsync(groupName, serviceName, projectName) + .map(new Func1() { + @Override + public Project call(ProjectInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String groupName, String serviceName, String projectName) { + ProjectsInner client = this.inner(); + return client.deleteAsync(groupName, serviceName, projectName).toCompletable(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectsInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectsInner.java new file mode 100644 index 000000000000..4c62a5b5a00f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ProjectsInner.java @@ -0,0 +1,834 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_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.azuredatabasemigrationservice.v2018_03_31_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.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 Projects. + */ +public class ProjectsInner { + /** The Retrofit service to perform REST calls. */ + private ProjectsService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of ProjectsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ProjectsInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(ProjectsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Projects to be + * used by Retrofit to perform actually REST calls. + */ + interface ProjectsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Projects list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Projects createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Body ProjectInner 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.azuredatabasemigrationservice.v2018_03_31_preview.Projects get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Projects delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Projects update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Body ProjectInner 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.azuredatabasemigrationservice.v2018_03_31_preview.Projects listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + ServiceResponse> * @param groupName Name of the resource group + ServiceResponse> * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProjectInner> 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."); + } + return service.list(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), 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 project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 ProjectInner object if successful. + */ + public ProjectInner createOrUpdate(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).toBlocking().single().body(); + } + + /** + * Create or update project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 projectName, ProjectInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, parameters), serviceCallback); + } + + /** + * Create or update project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable createOrUpdateAsync(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).map(new Func1, ProjectInner>() { + @Override + public ProjectInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String groupName, String serviceName, String projectName, ProjectInner 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 ProjectInner object if successful. + */ + public ProjectInner get(String groupName, String serviceName, String projectName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName).toBlocking().single().body(); + } + + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, projectName), serviceCallback); + } + + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable getAsync(String groupName, String serviceName, String projectName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName).map(new Func1, ProjectInner>() { + @Override + public ProjectInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable> getWithServiceResponseAsync(String groupName, String serviceName, String projectName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 projectName) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName).toBlocking().single().body(); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName), serviceCallback); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String groupName, String serviceName, String projectName) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, String projectName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, Boolean deleteRunningTasks) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName, deleteRunningTasks).toBlocking().single().body(); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, Boolean deleteRunningTasks) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 ProjectInner object if successful. + */ + public ProjectInner update(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).toBlocking().single().body(); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 projectName, ProjectInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, projectName, parameters), serviceCallback); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable updateAsync(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).map(new Func1, ProjectInner>() { + @Override + public ProjectInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable> updateWithServiceResponseAsync(String groupName, String serviceName, String projectName, ProjectInner 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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); + } + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProjectInner> 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/QuotaImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/QuotaImpl.java new file mode 100644 index 000000000000..85a562561e62 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/QuotaImpl.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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Quota; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.QuotaName; + +class QuotaImpl extends WrapperImpl implements Quota { + private final DataMigrationManager manager; + + QuotaImpl(QuotaInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + + + @Override + public Double currentValue() { + return this.inner().currentValue(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Double limit() { + return this.inner().limit(); + } + + @Override + public QuotaName name() { + return this.inner().name(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/QuotaInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/QuotaInner.java new file mode 100644 index 000000000000..b93bdbd2dc2d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/QuotaInner.java @@ -0,0 +1,150 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.QuotaName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a quota for or usage details about a resource. + */ +public class QuotaInner { + /** + * The current value of the quota. If null or missing, the current value + * cannot be determined in the context of the request. + */ + @JsonProperty(value = "currentValue") + private Double currentValue; + + /** + * The resource ID of the quota object. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The maximum value of the quota. If null or missing, the quota has no + * maximum, in which case it merely tracks usage. + */ + @JsonProperty(value = "limit") + private Double limit; + + /** + * The name of the quota. + */ + @JsonProperty(value = "name") + private QuotaName name; + + /** + * The unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Get the current value of the quota. If null or missing, the current value cannot be determined in the context of the request. + * + * @return the currentValue value + */ + public Double currentValue() { + return this.currentValue; + } + + /** + * Set the current value of the quota. If null or missing, the current value cannot be determined in the context of the request. + * + * @param currentValue the currentValue value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withCurrentValue(Double currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the resource ID of the quota object. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the resource ID of the quota object. + * + * @param id the id value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the maximum value of the quota. If null or missing, the quota has no maximum, in which case it merely tracks usage. + * + * @return the limit value + */ + public Double limit() { + return this.limit; + } + + /** + * Set the maximum value of the quota. If null or missing, the quota has no maximum, in which case it merely tracks usage. + * + * @param limit the limit value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withLimit(Double limit) { + this.limit = limit; + return this; + } + + /** + * Get the name of the quota. + * + * @return the name value + */ + public QuotaName name() { + return this.name; + } + + /** + * Set the name of the quota. + * + * @param name the name value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withName(QuotaName name) { + this.name = name; + return this; + } + + /** + * Get the unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + * + * @param unit the unit value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withUnit(String unit) { + this.unit = unit; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkuImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkuImpl.java new file mode 100644 index 000000000000..f0a13d04f829 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkuImpl.java @@ -0,0 +1,91 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSku; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkuCapabilities; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkuCapacity; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkuCosts; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkuRestrictions; + +class ResourceSkuImpl extends WrapperImpl implements ResourceSku { + private final DataMigrationManager manager; + ResourceSkuImpl(ResourceSkuInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public List apiVersions() { + return this.inner().apiVersions(); + } + + @Override + public List capabilities() { + return this.inner().capabilities(); + } + + @Override + public ResourceSkuCapacity capacity() { + return this.inner().capacity(); + } + + @Override + public List costs() { + return this.inner().costs(); + } + + @Override + public String family() { + return this.inner().family(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public List locations() { + return this.inner().locations(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public List restrictions() { + return this.inner().restrictions(); + } + + @Override + public String size() { + return this.inner().size(); + } + + @Override + public String tier() { + return this.inner().tier(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkuInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkuInner.java new file mode 100644 index 000000000000..3eb4d8692573 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkuInner.java @@ -0,0 +1,203 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkuCapacity; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkuCosts; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkuCapabilities; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkuRestrictions; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes an available DMS SKU. + */ +public class ResourceSkuInner { + /** + * The type of resource the SKU applies to. + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /** + * The name of SKU. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Specifies the tier of DMS in a scale set. + */ + @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) + private String tier; + + /** + * The Size of the SKU. + */ + @JsonProperty(value = "size", access = JsonProperty.Access.WRITE_ONLY) + private String size; + + /** + * The Family of this particular SKU. + */ + @JsonProperty(value = "family", access = JsonProperty.Access.WRITE_ONLY) + private String family; + + /** + * The Kind of resources that are supported in this SKU. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private String kind; + + /** + * Not used. + */ + @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuCapacity capacity; + + /** + * The set of locations that the SKU is available. + */ + @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) + private List locations; + + /** + * The api versions that support this SKU. + */ + @JsonProperty(value = "apiVersions", access = JsonProperty.Access.WRITE_ONLY) + private List apiVersions; + + /** + * Metadata for retrieving price info. + */ + @JsonProperty(value = "costs", access = JsonProperty.Access.WRITE_ONLY) + private List costs; + + /** + * A name value pair to describe the capability. + */ + @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) + private List capabilities; + + /** + * The restrictions because of which SKU cannot be used. This is empty if + * there are no restrictions. + */ + @JsonProperty(value = "restrictions", access = JsonProperty.Access.WRITE_ONLY) + private List restrictions; + + /** + * Get the type of resource the SKU applies to. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the name of SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get specifies the tier of DMS in a scale set. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Get the Size of the SKU. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Get the Family of this particular SKU. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Get the Kind of resources that are supported in this SKU. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Get not used. + * + * @return the capacity value + */ + public ResourceSkuCapacity capacity() { + return this.capacity; + } + + /** + * Get the set of locations that the SKU is available. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Get the api versions that support this SKU. + * + * @return the apiVersions value + */ + public List apiVersions() { + return this.apiVersions; + } + + /** + * Get metadata for retrieving price info. + * + * @return the costs value + */ + public List costs() { + return this.costs; + } + + /** + * Get a name value pair to describe the capability. + * + * @return the capabilities value + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Get the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * + * @return the restrictions value + */ + public List restrictions() { + return this.restrictions; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkusImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkusImpl.java new file mode 100644 index 000000000000..a37a53ab9190 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkusImpl.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. + * abc + */ + +package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkus; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSku; + +class ResourceSkusImpl extends WrapperImpl implements ResourceSkus { + private final DataMigrationManager manager; + + ResourceSkusImpl(DataMigrationManager manager) { + super(manager.inner().resourceSkus()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + ResourceSkusInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceSku call(ResourceSkuInner inner) { + return new ResourceSkuImpl(inner, manager()); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkusInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkusInner.java new file mode 100644 index 000000000000..c5d66823e39b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ResourceSkusInner.java @@ -0,0 +1,297 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_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.azuredatabasemigrationservice.v2018_03_31_preview.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +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 ResourceSkus. + */ +public class ResourceSkusInner { + /** The Retrofit service to perform REST calls. */ + private ResourceSkusService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of ResourceSkusInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ResourceSkusInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(ResourceSkusService.class); + this.client = client; + } + + /** + * The interface defining all the services for ResourceSkus to be + * used by Retrofit to perform actually REST calls. + */ + interface ResourceSkusService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkus list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/skus") + Observable> list(@Path("subscriptionId") String subscriptionId, @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.azuredatabasemigrationservice.v2018_03_31_preview.ResourceSkus listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceSkuInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceSkuInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceSkuInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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(), this.client.apiVersion(), 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); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> 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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> 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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceSkuInner> 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServiceOperationImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServiceOperationImpl.java new file mode 100644 index 000000000000..8ad86a07f72c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServiceOperationImpl.java @@ -0,0 +1,37 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ServiceOperation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ServiceOperationDisplay; + +class ServiceOperationImpl extends WrapperImpl implements ServiceOperation { + private final DataMigrationManager manager; + ServiceOperationImpl(ServiceOperationInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ServiceOperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServiceOperationInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServiceOperationInner.java new file mode 100644 index 000000000000..a37acd9960be --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServiceOperationInner.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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ServiceOperationDisplay; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of an action supported by the Data Migration Service. + */ +public class ServiceOperationInner { + /** + * The fully qualified action name, e.g. + * Microsoft.DataMigration/services/read. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized display text. + */ + @JsonProperty(value = "display") + private ServiceOperationDisplay display; + + /** + * Get the fully qualified action name, e.g. Microsoft.DataMigration/services/read. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the fully qualified action name, e.g. Microsoft.DataMigration/services/read. + * + * @param name the name value to set + * @return the ServiceOperationInner object itself. + */ + public ServiceOperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized display text. + * + * @return the display value + */ + public ServiceOperationDisplay display() { + return this.display; + } + + /** + * Set localized display text. + * + * @param display the display value to set + * @return the ServiceOperationInner object itself. + */ + public ServiceOperationInner withDisplay(ServiceOperationDisplay display) { + this.display = display; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServicesImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServicesImpl.java new file mode 100644 index 000000000000..61e6ceb220a3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServicesImpl.java @@ -0,0 +1,212 @@ +/** + * 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. + * def + */ + +package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Services; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.DataMigrationService; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.DataMigrationServiceStatusResponse; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.NameAvailabilityResponse; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.NameAvailabilityRequest; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.AvailableServiceSku; + +class ServicesImpl extends GroupableResourcesCoreImpl implements Services { + protected ServicesImpl(DataMigrationManager manager) { + super(manager.inner().services(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ServicesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ServicesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + ServicesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ServicesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataMigrationService call(DataMigrationServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ServicesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ServicesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataMigrationService call(DataMigrationServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public DataMigrationServiceImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable checkStatusAsync(String groupName, String serviceName) { + ServicesInner client = this.inner(); + return client.checkStatusAsync(groupName, serviceName) + .map(new Func1() { + @Override + public DataMigrationServiceStatusResponse call(DataMigrationServiceStatusResponseInner inner) { + return new DataMigrationServiceStatusResponseImpl(inner, manager()); + } + }); + } + + @Override + public Completable startAsync(String groupName, String serviceName) { + ServicesInner client = this.inner(); + return client.startAsync(groupName, serviceName).toCompletable(); + } + + @Override + public Completable stopAsync(String groupName, String serviceName) { + ServicesInner client = this.inner(); + return client.stopAsync(groupName, serviceName).toCompletable(); + } + + @Override + public Observable checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters) { + ServicesInner client = this.inner(); + return client.checkChildrenNameAvailabilityAsync(groupName, serviceName, parameters) + .map(new Func1() { + @Override + public NameAvailabilityResponse call(NameAvailabilityResponseInner inner) { + return new NameAvailabilityResponseImpl(inner, manager()); + } + }); + } + + @Override + protected DataMigrationServiceImpl wrapModel(DataMigrationServiceInner inner) { + return new DataMigrationServiceImpl(inner.name(), inner, manager()); + } + + @Override + protected DataMigrationServiceImpl wrapModel(String name) { + return new DataMigrationServiceImpl(name, new DataMigrationServiceInner(), this.manager()); + } + + private AvailableServiceSkuImpl wrapAvailableServiceSkuModel(AvailableServiceSkuInner inner) { + return new AvailableServiceSkuImpl(inner, manager()); + } + + @Override + public Observable listSkusAsync(final String groupName, final String serviceName) { + ServicesInner client = this.inner(); + return client.listSkusAsync(groupName, serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AvailableServiceSku call(AvailableServiceSkuInner inner) { + return wrapAvailableServiceSkuModel(inner); + } + }); + } + + @Override + public Observable checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters) { + ServicesInner client = this.inner(); + return client.checkNameAvailabilityAsync(location, parameters) + .map(new Func1() { + @Override + public NameAvailabilityResponse call(NameAvailabilityResponseInner inner) { + return new NameAvailabilityResponseImpl(inner, manager()); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServicesInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServicesInner.java new file mode 100644 index 000000000000..c720412bc814 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/ServicesInner.java @@ -0,0 +1,2240 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ApiErrorException; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.NameAvailabilityRequest; +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 Services. + */ +public class ServicesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ServicesService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of ServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServicesInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(ServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Services to be + * used by Retrofit to perform actually REST calls. + */ + interface ServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Services createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2018_03_31_preview.Services beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2018_03_31_preview.Services getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2018_03_31_preview.Services beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2018_03_31_preview.Services checkStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkStatus") + Observable> checkStatus(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services start" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start") + Observable> start(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services beginStart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start") + Observable> beginStart(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services stop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop") + Observable> stop(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services beginStop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop") + Observable> beginStop(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services listSkus" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus") + Observable> listSkus(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services checkChildrenNameAvailability" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability") + Observable> checkChildrenNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Body NameAvailabilityRequest parameters, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services") + Observable> list(@Path("subscriptionId") String subscriptionId, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Body NameAvailabilityRequest parameters, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services listSkusNext" }) + @GET + Observable> listSkusNext(@Url String nextUrl, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @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.azuredatabasemigrationservice.v2018_03_31_preview.Services listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner createOrUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().last().body(); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 createOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner beginCreateOrUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().single().body(); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 beginCreateOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable beginCreateOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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.beginCreateOrUpdate(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The GET method retrieves information about a service instance. + * + * @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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner getByResourceGroup(String groupName, String serviceName) { + return getByResourceGroupWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The GET method retrieves information about a service instance. + * + * @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 getByResourceGroupAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The GET method retrieves information about a service instance. + * + * @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 DataMigrationServiceInner object + */ + public Observable getByResourceGroupAsync(String groupName, String serviceName) { + return getByResourceGroupWithServiceResponseAsync(groupName, serviceName).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The GET method retrieves information about a service instance. + * + * @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 DataMigrationServiceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String groupName, 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."); + } + return service.getByResourceGroup(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(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 DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public void delete(String groupName, String serviceName) { + deleteWithServiceResponseAsync(groupName, serviceName).toBlocking().last().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 deleteAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public Observable deleteAsync(String groupName, String serviceName) { + return deleteWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public Observable> deleteWithServiceResponseAsync(String groupName, 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 Boolean deleteRunningTasks = null; + Observable> observable = service.delete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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, Boolean deleteRunningTasks) { + deleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).toBlocking().last().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param deleteRunningTasks Delete the resource even if it contains running tasks + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks) { + return deleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param deleteRunningTasks Delete the resource even if it contains running tasks + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public void beginDelete(String groupName, String serviceName) { + beginDeleteWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 beginDeleteAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String groupName, String serviceName) { + return beginDeleteWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String groupName, 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 Boolean deleteRunningTasks = null; + return service.beginDelete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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 beginDelete(String groupName, String serviceName, Boolean deleteRunningTasks) { + beginDeleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).toBlocking().single().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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 beginDeleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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 beginDeleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks) { + return beginDeleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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> beginDeleteWithServiceResponseAsync(String groupName, String serviceName, 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner update(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().last().body(); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 updateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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); + Observable> observable = service.update(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner beginUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginUpdateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().single().body(); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 beginUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable beginUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginUpdateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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.beginUpdate(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 DataMigrationServiceStatusResponseInner object if successful. + */ + public DataMigrationServiceStatusResponseInner checkStatus(String groupName, String serviceName) { + return checkStatusWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 checkStatusAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkStatusWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 DataMigrationServiceStatusResponseInner object + */ + public Observable checkStatusAsync(String groupName, String serviceName) { + return checkStatusWithServiceResponseAsync(groupName, serviceName).map(new Func1, DataMigrationServiceStatusResponseInner>() { + @Override + public DataMigrationServiceStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Data Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 DataMigrationServiceStatusResponseInner object + */ + public Observable> checkStatusWithServiceResponseAsync(String groupName, 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."); + } + return service.checkStatus(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkStatusDelegate(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); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public void start(String groupName, String serviceName) { + startWithServiceResponseAsync(groupName, serviceName).toBlocking().last().body(); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 startAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public Observable startAsync(String groupName, String serviceName) { + return startWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public Observable> startWithServiceResponseAsync(String groupName, 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."); + } + Observable> observable = service.start(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public void beginStart(String groupName, String serviceName) { + beginStartWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 beginStartAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStartAsync(String groupName, String serviceName) { + return beginStartWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Data Migration Service. This action starts the service and the service can be used for data migration. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStartWithServiceResponseAsync(String groupName, 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."); + } + return service.beginStart(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public void stop(String groupName, String serviceName) { + stopWithServiceResponseAsync(groupName, serviceName).toBlocking().last().body(); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 stopAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public Observable stopAsync(String groupName, String serviceName) { + return stopWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public Observable> stopWithServiceResponseAsync(String groupName, 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."); + } + Observable> observable = service.stop(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public void beginStop(String groupName, String serviceName) { + beginStopWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 beginStopAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStopAsync(String groupName, String serviceName) { + return beginStopWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStopWithServiceResponseAsync(String groupName, 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."); + } + return service.beginStop(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object if successful. + */ + public PagedList listSkus(final String groupName, final String serviceName) { + ServiceResponse> response = listSkusSinglePageAsync(groupName, serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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> listSkusAsync(final String groupName, final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSkusSinglePageAsync(groupName, serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable> listSkusAsync(final String groupName, final String serviceName) { + return listSkusWithServiceResponseAsync(groupName, serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable>> listSkusWithServiceResponseAsync(final String groupName, final String serviceName) { + return listSkusSinglePageAsync(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(listSkusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + ServiceResponse> * @param groupName Name of the resource group + ServiceResponse> * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableServiceSkuInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSkusSinglePageAsync(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."); + } + return service.listSkus(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSkusDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSkusDelegate(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); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @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 NameAvailabilityResponseInner object if successful. + */ + public NameAvailabilityResponseInner checkChildrenNameAvailability(String groupName, String serviceName, NameAvailabilityRequest parameters) { + return checkChildrenNameAvailabilityWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().single().body(); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @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 checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkChildrenNameAvailabilityWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters) { + return checkChildrenNameAvailabilityWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, NameAvailabilityResponseInner>() { + @Override + public NameAvailabilityResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable> checkChildrenNameAvailabilityWithServiceResponseAsync(String groupName, String serviceName, NameAvailabilityRequest 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.checkChildrenNameAvailability(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkChildrenNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkChildrenNameAvailabilityDelegate(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 services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @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<DataMigrationServiceInner> object if successful. + */ + public PagedList listByResourceGroup(final String groupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(groupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @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> listByResourceGroupAsync(final String groupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(groupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable> listByResourceGroupAsync(final String groupName) { + return listByResourceGroupWithServiceResponseAsync(groupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String groupName) { + return listByResourceGroupSinglePageAsync(groupName) + .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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + ServiceResponse> * @param groupName Name of the resource group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String groupName) { + 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(this.client.subscriptionId(), groupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(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); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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(), this.client.apiVersion(), 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); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @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 NameAvailabilityResponseInner object if successful. + */ + public NameAvailabilityResponseInner checkNameAvailability(String location, NameAvailabilityRequest parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).toBlocking().single().body(); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @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 checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, parameters), serviceCallback); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).map(new Func1, NameAvailabilityResponseInner>() { + @Override + public NameAvailabilityResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String location, NameAvailabilityRequest parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.checkNameAvailability(this.client.subscriptionId(), location, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(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 compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object if successful. + */ + public PagedList listSkusNext(final String nextPageLink) { + ServiceResponse> response = listSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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> listSkusNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSkusNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable> listSkusNextAsync(final String nextPageLink) { + return listSkusNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable>> listSkusNextWithServiceResponseAsync(final String nextPageLink) { + return listSkusNextSinglePageAsync(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(listSkusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Data Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableServiceSkuInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSkusNextSinglePageAsync(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.listSkusNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSkusNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSkusNextDelegate(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); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @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<DataMigrationServiceInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @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<DataMigrationServiceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + * @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<DataMigrationServiceInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(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); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> 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 services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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 services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> 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 services in subscription. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of service resources in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/TasksImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/TasksImpl.java new file mode 100644 index 000000000000..5612cf15d487 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/TasksImpl.java @@ -0,0 +1,93 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Tasks; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.ProjectTask; + +class TasksImpl extends WrapperImpl implements Tasks { + private final DataMigrationManager manager; + + TasksImpl(DataMigrationManager manager) { + super(manager.inner().tasks()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ProjectTaskImpl define(String name) { + return wrapModel(name); + } + + private ProjectTaskImpl wrapModel(ProjectTaskInner inner) { + return new ProjectTaskImpl(inner, manager()); + } + + private ProjectTaskImpl wrapModel(String name) { + return new ProjectTaskImpl(name, this.manager()); + } + + @Override + 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() { + @Override + public ProjectTask call(ProjectTaskInner inner) { + return new ProjectTaskImpl(inner, manager()); + } + }); + } + + @Override + 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>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProjectTask call(ProjectTaskInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + 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() { + @Override + public ProjectTask call(ProjectTaskInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String groupName, String serviceName, String projectName, String taskName) { + TasksInner client = this.inner(); + return client.deleteAsync(groupName, serviceName, projectName, taskName).toCompletable(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/TasksInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/TasksInner.java new file mode 100644 index 000000000000..86b29d9960bc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/TasksInner.java @@ -0,0 +1,1223 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_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.azuredatabasemigrationservice.v2018_03_31_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 Tasks. + */ +public class TasksInner { + /** The Retrofit service to perform REST calls. */ + private TasksService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of TasksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public TasksInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(TasksService.class); + this.client = client; + } + + /** + * The interface defining all the services for Tasks to be + * used by Retrofit to perform actually REST calls. + */ + interface TasksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Tasks list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Tasks createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Tasks get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Tasks delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Tasks update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Tasks cancel" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel") + Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_03_31_preview.Tasks listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + ServiceResponse> response = listSinglePageAsync(groupName, serviceName, projectName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(groupName, serviceName, projectName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + return listWithServiceResponseAsync(groupName, serviceName, projectName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + return listSinglePageAsync(groupName, serviceName, projectName) + .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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType) { + ServiceResponse> response = listSinglePageAsync(groupName, serviceName, projectName, taskType).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(groupName, serviceName, projectName, taskType), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType) { + return listWithServiceResponseAsync(groupName, serviceName, projectName, taskType) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType) { + return listSinglePageAsync(groupName, serviceName, projectName, 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 projectName Name of the project + 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, String taskName, ProjectTaskInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).toBlocking().single().body(); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, String taskName, ProjectTaskInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters), serviceCallback); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, String taskName, ProjectTaskInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @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 projectName, String taskName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName).toBlocking().single().body(); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, projectName, taskName), serviceCallback); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable getAsync(String groupName, String serviceName, String projectName, String taskName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable> getWithServiceResponseAsync(String groupName, String serviceName, String projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, String expand) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName, expand).toBlocking().single().body(); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, projectName, taskName, expand), serviceCallback); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, String expand) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName, expand).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @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 projectName, String taskName) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName).toBlocking().single().body(); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName), serviceCallback); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String groupName, String serviceName, String projectName, String taskName) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, String projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, Boolean deleteRunningTasks) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks).toBlocking().single().body(); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, Boolean deleteRunningTasks) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, String taskName, ProjectTaskInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).toBlocking().single().body(); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, String taskName, ProjectTaskInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters), serviceCallback); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, String taskName, ProjectTaskInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @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 projectName, String taskName) { + return cancelWithServiceResponseAsync(groupName, serviceName, projectName, taskName).toBlocking().single().body(); + } + + /** + * 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(groupName, serviceName, projectName, taskName), serviceCallback); + } + + /** + * 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable cancelAsync(String groupName, String serviceName, String projectName, String taskName) { + return cancelWithServiceResponseAsync(groupName, serviceName, projectName, taskName).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable> cancelWithServiceResponseAsync(String groupName, String serviceName, String projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Data Migration Service. This method returns a list of 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/UsagesImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/UsagesImpl.java new file mode 100644 index 000000000000..c964d39aa9f0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/UsagesImpl.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Usages; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Quota; + +class UsagesImpl extends WrapperImpl implements Usages { + private final DataMigrationManager manager; + + UsagesImpl(DataMigrationManager manager) { + super(manager.inner().usages()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + private QuotaImpl wrapModel(QuotaInner inner) { + return new QuotaImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String location) { + UsagesInner client = this.inner(); + return client.listAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Quota call(QuotaInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/UsagesInner.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/UsagesInner.java new file mode 100644 index 000000000000..950e26e0219f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/UsagesInner.java @@ -0,0 +1,305 @@ +/** + * 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.azuredatabasemigrationservice.v2018_03_31_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.azuredatabasemigrationservice.v2018_03_31_preview.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +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 Usages. + */ +public class UsagesInner { + /** The Retrofit service to perform REST calls. */ + private UsagesService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of UsagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public UsagesInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(UsagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Usages to be + * used by Retrofit to perform actually REST calls. + */ + interface UsagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.Usages list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @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.azuredatabasemigrationservice.v2018_03_31_preview.Usages listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @param location The Azure region of the 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<QuotaInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @param location The Azure region of the operation + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<QuotaInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<QuotaInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + ServiceResponse> * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<QuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location 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(), location, this.client.apiVersion(), 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); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @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<QuotaInner> 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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @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<QuotaInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + * @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<QuotaInner> 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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Data Migration Service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<QuotaInner> 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/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/package-info.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/package-info.java new file mode 100644 index 000000000000..d1371c5b5ac4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/implementation/package-info.java @@ -0,0 +1,11 @@ +// 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. + +/** + * This package contains the implementation classes for DataMigrationServiceClient. + * Data Migration Client. + */ +package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview.implementation; diff --git a/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/package-info.java b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/package-info.java new file mode 100644 index 000000000000..e8524448d166 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/package-info.java @@ -0,0 +1,11 @@ +// 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. + +/** + * This package contains the classes for DataMigrationServiceClient. + * Data Migration Client. + */ +package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview; diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/pom.xml b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/pom.xml new file mode 100644 index 000000000000..1d34aac01fa6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.azuredatabasemigrationservice.v2018_07_15_preview + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-datamigration + 1.0.0-beta + jar + Microsoft Azure SDK for DataMigration Management + This package contains Microsoft DataMigration Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ApiError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ApiError.java new file mode 100644 index 000000000000..dcfca1555a78 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ApiError.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error information. + */ +public class ApiError { + /** + * Error information in OData format. + */ + @JsonProperty(value = "error") + private ODataError error; + + /** + * Get error information in OData format. + * + * @return the error value + */ + public ODataError error() { + return this.error; + } + + /** + * Set error information in OData format. + * + * @param error the error value to set + * @return the ApiError object itself. + */ + public ApiError withError(ODataError error) { + this.error = error; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ApiErrorException.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ApiErrorException.java new file mode 100644 index 000000000000..99523e58a7a8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ApiErrorException.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ApiError information. + */ +public class ApiErrorException extends RestException { + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ApiErrorException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ApiErrorException(final String message, final Response response, final ApiError body) { + super(message, response, body); + } + + @Override + public ApiError body() { + return (ApiError) super.body(); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AuthenticationType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AuthenticationType.java new file mode 100644 index 000000000000..99228d337d8b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AuthenticationType.java @@ -0,0 +1,50 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AuthenticationType. + */ +public final class AuthenticationType extends ExpandableStringEnum { + /** Static value None for AuthenticationType. */ + public static final AuthenticationType NONE = fromString("None"); + + /** Static value WindowsAuthentication for AuthenticationType. */ + public static final AuthenticationType WINDOWS_AUTHENTICATION = fromString("WindowsAuthentication"); + + /** Static value SqlAuthentication for AuthenticationType. */ + public static final AuthenticationType SQL_AUTHENTICATION = fromString("SqlAuthentication"); + + /** Static value ActiveDirectoryIntegrated for AuthenticationType. */ + public static final AuthenticationType ACTIVE_DIRECTORY_INTEGRATED = fromString("ActiveDirectoryIntegrated"); + + /** Static value ActiveDirectoryPassword for AuthenticationType. */ + public static final AuthenticationType ACTIVE_DIRECTORY_PASSWORD = fromString("ActiveDirectoryPassword"); + + /** + * Creates or finds a AuthenticationType from its string representation. + * @param name a name to look for + * @return the corresponding AuthenticationType + */ + @JsonCreator + public static AuthenticationType fromString(String name) { + return fromString(name, AuthenticationType.class); + } + + /** + * @return known AuthenticationType values + */ + public static Collection values() { + return values(AuthenticationType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSku.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSku.java new file mode 100644 index 000000000000..3475903c298b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSku.java @@ -0,0 +1,35 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.AvailableServiceSkuInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; + +/** + * Type representing AvailableServiceSku. + */ +public interface AvailableServiceSku extends HasInner, HasManager { + /** + * @return the capacity value. + */ + AvailableServiceSkuCapacity capacity(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the sku value. + */ + AvailableServiceSkuSku sku(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSkuCapacity.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSkuCapacity.java new file mode 100644 index 000000000000..a6848e88f243 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSkuCapacity.java @@ -0,0 +1,122 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A description of the scaling capacities of the SKU. + */ +public class AvailableServiceSkuCapacity { + /** + * The minimum capacity, usually 0 or 1. + */ + @JsonProperty(value = "minimum") + private Integer minimum; + + /** + * The maximum capacity. + */ + @JsonProperty(value = "maximum") + private Integer maximum; + + /** + * The default capacity. + */ + @JsonProperty(value = "default") + private Integer defaultProperty; + + /** + * The scalability approach. Possible values include: 'none', 'manual', + * 'automatic'. + */ + @JsonProperty(value = "scaleType") + private ServiceScalability scaleType; + + /** + * Get the minimum capacity, usually 0 or 1. + * + * @return the minimum value + */ + public Integer minimum() { + return this.minimum; + } + + /** + * Set the minimum capacity, usually 0 or 1. + * + * @param minimum the minimum value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withMinimum(Integer minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the maximum capacity. + * + * @return the maximum value + */ + public Integer maximum() { + return this.maximum; + } + + /** + * Set the maximum capacity. + * + * @param maximum the maximum value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withMaximum(Integer maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get the default capacity. + * + * @return the defaultProperty value + */ + public Integer defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the default capacity. + * + * @param defaultProperty the defaultProperty value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withDefaultProperty(Integer defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the scalability approach. Possible values include: 'none', 'manual', 'automatic'. + * + * @return the scaleType value + */ + public ServiceScalability scaleType() { + return this.scaleType; + } + + /** + * Set the scalability approach. Possible values include: 'none', 'manual', 'automatic'. + * + * @param scaleType the scaleType value to set + * @return the AvailableServiceSkuCapacity object itself. + */ + public AvailableServiceSkuCapacity withScaleType(ServiceScalability scaleType) { + this.scaleType = scaleType; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSkuSku.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSkuSku.java new file mode 100644 index 000000000000..c8443dd4ac84 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/AvailableServiceSkuSku.java @@ -0,0 +1,122 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU name, tier, etc. + */ +public class AvailableServiceSkuSku { + /** + * The name of the SKU. + */ + @JsonProperty(value = "name") + private String name; + + /** + * SKU family. + */ + @JsonProperty(value = "family") + private String family; + + /** + * SKU size. + */ + @JsonProperty(value = "size") + private String size; + + /** + * The tier of the SKU, such as "Basic", "General Purpose", or "Business + * Critical". + */ + @JsonProperty(value = "tier") + private String tier; + + /** + * Get the name of the SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the SKU. + * + * @param name the name value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get sKU family. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set sKU family. + * + * @param family the family value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get sKU size. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set sKU size. + * + * @param size the size value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the tier of the SKU, such as "Basic", "General Purpose", or "Business Critical". + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier of the SKU, such as "Basic", "General Purpose", or "Business Critical". + * + * @param tier the tier value to set + * @return the AvailableServiceSkuSku object itself. + */ + public AvailableServiceSkuSku withTier(String tier) { + this.tier = tier; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BackupMode.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BackupMode.java new file mode 100644 index 000000000000..f85a3d840aeb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BackupMode.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for BackupMode. + */ +public final class BackupMode extends ExpandableStringEnum { + /** Static value CreateBackup for BackupMode. */ + public static final BackupMode CREATE_BACKUP = fromString("CreateBackup"); + + /** Static value ExistingBackup for BackupMode. */ + public static final BackupMode EXISTING_BACKUP = fromString("ExistingBackup"); + + /** + * Creates or finds a BackupMode from its string representation. + * @param name a name to look for + * @return the corresponding BackupMode + */ + @JsonCreator + public static BackupMode fromString(String name) { + return fromString(name, BackupMode.class); + } + + /** + * @return known BackupMode values + */ + public static Collection values() { + return values(BackupMode.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BackupType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BackupType.java new file mode 100644 index 000000000000..7ddf8615dd75 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BackupType.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for BackupType. + */ +public final class BackupType extends ExpandableStringEnum { + /** Static value Database for BackupType. */ + public static final BackupType DATABASE = fromString("Database"); + + /** Static value TransactionLog for BackupType. */ + public static final BackupType TRANSACTION_LOG = fromString("TransactionLog"); + + /** Static value File for BackupType. */ + public static final BackupType FILE = fromString("File"); + + /** Static value DifferentialDatabase for BackupType. */ + public static final BackupType DIFFERENTIAL_DATABASE = fromString("DifferentialDatabase"); + + /** Static value DifferentialFile for BackupType. */ + public static final BackupType DIFFERENTIAL_FILE = fromString("DifferentialFile"); + + /** Static value Partial for BackupType. */ + public static final BackupType PARTIAL = fromString("Partial"); + + /** Static value DifferentialPartial for BackupType. */ + public static final BackupType DIFFERENTIAL_PARTIAL = fromString("DifferentialPartial"); + + /** + * Creates or finds a BackupType from its string representation. + * @param name a name to look for + * @return the corresponding BackupType + */ + @JsonCreator + public static BackupType fromString(String name) { + return fromString(name, BackupType.class); + } + + /** + * @return known BackupType values + */ + public static Collection values() { + return values(BackupType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BlobShare.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BlobShare.java new file mode 100644 index 000000000000..fbc37be411a8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/BlobShare.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Blob container storage information. + */ +public class BlobShare { + /** + * SAS URI of Azure Storage Account Container. + */ + @JsonProperty(value = "sasUri", required = true) + private String sasUri; + + /** + * Get sAS URI of Azure Storage Account Container. + * + * @return the sasUri value + */ + public String sasUri() { + return this.sasUri; + } + + /** + * Set sAS URI of Azure Storage Account Container. + * + * @param sasUri the sasUri value to set + * @return the BlobShare object itself. + */ + public BlobShare withSasUri(String sasUri) { + this.sasUri = sasUri; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/CommandProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/CommandProperties.java new file mode 100644 index 000000000000..bd4c10b758ed --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/CommandProperties.java @@ -0,0 +1,31 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.CommandPropertiesInner; +import java.util.List; + +/** + * Type representing CommandProperties. + */ +public interface CommandProperties extends HasInner, HasManager { + /** + * @return the errors value. + */ + List errors(); + + /** + * @return the state value. + */ + CommandState state(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/CommandState.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/CommandState.java new file mode 100644 index 000000000000..a631e12723a1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/CommandState.java @@ -0,0 +1,50 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for CommandState. + */ +public final class CommandState extends ExpandableStringEnum { + /** Static value Unknown for CommandState. */ + public static final CommandState UNKNOWN = fromString("Unknown"); + + /** Static value Accepted for CommandState. */ + public static final CommandState ACCEPTED = fromString("Accepted"); + + /** Static value Running for CommandState. */ + public static final CommandState RUNNING = fromString("Running"); + + /** Static value Succeeded for CommandState. */ + public static final CommandState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for CommandState. */ + public static final CommandState FAILED = fromString("Failed"); + + /** + * Creates or finds a CommandState from its string representation. + * @param name a name to look for + * @return the corresponding CommandState + */ + @JsonCreator + public static CommandState fromString(String name) { + return fromString(name, CommandState.class); + } + + /** + * @return known CommandState values + */ + public static Collection values() { + return values(CommandState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToMongoDbTaskProperties.java new file mode 100644 index 000000000000..74ab5b47e9af --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToMongoDbTaskProperties.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.azuredatabasemigrationservice.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 the connection to and provides + * information about a MongoDB server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Connect.MongoDb") +public class ConnectToMongoDbTaskProperties extends ProjectTaskProperties { + /** + * The input property. + */ + @JsonProperty(value = "input") + private MongoDbConnectionInfo input; + + /** + * An array containing a single MongoDbClusterInfo object. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get the input value. + * + * @return the input value + */ + public MongoDbConnectionInfo input() { + return this.input; + } + + /** + * Set the input value. + * + * @param input the input value to set + * @return the ConnectToMongoDbTaskProperties object itself. + */ + public ConnectToMongoDbTaskProperties withInput(MongoDbConnectionInfo input) { + this.input = input; + return this; + } + + /** + * Get an array containing a single MongoDbClusterInfo object. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceMySqlTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceMySqlTaskInput.java new file mode 100644 index 000000000000..761b3934f398 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceMySqlTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates MySQL database connection. + */ +public class ConnectToSourceMySqlTaskInput { + /** + * Information for connecting to MySQL source. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private MySqlConnectionInfo sourceConnectionInfo; + + /** + * Target Platform for the migration. Possible values include: + * 'AzureDbForMySQL'. + */ + @JsonProperty(value = "targetPlatform") + private MySqlTargetPlatformType targetPlatform; + + /** + * Permission group for validations. Possible values include: 'Default', + * 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', + * 'MigrationFromMySQLToAzureDBForMySQL'. + */ + @JsonProperty(value = "checkPermissionsGroup") + private ServerLevelPermissionsGroup checkPermissionsGroup; + + /** + * Get information for connecting to MySQL source. + * + * @return the sourceConnectionInfo value + */ + public MySqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set information for connecting to MySQL source. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the ConnectToSourceMySqlTaskInput object itself. + */ + public ConnectToSourceMySqlTaskInput withSourceConnectionInfo(MySqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get target Platform for the migration. Possible values include: 'AzureDbForMySQL'. + * + * @return the targetPlatform value + */ + public MySqlTargetPlatformType targetPlatform() { + return this.targetPlatform; + } + + /** + * Set target Platform for the migration. Possible values include: 'AzureDbForMySQL'. + * + * @param targetPlatform the targetPlatform value to set + * @return the ConnectToSourceMySqlTaskInput object itself. + */ + public ConnectToSourceMySqlTaskInput withTargetPlatform(MySqlTargetPlatformType targetPlatform) { + this.targetPlatform = targetPlatform; + return this; + } + + /** + * Get permission group for validations. Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL'. + * + * @return the checkPermissionsGroup value + */ + public ServerLevelPermissionsGroup checkPermissionsGroup() { + return this.checkPermissionsGroup; + } + + /** + * Set permission group for validations. Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL'. + * + * @param checkPermissionsGroup the checkPermissionsGroup value to set + * @return the ConnectToSourceMySqlTaskInput object itself. + */ + public ConnectToSourceMySqlTaskInput withCheckPermissionsGroup(ServerLevelPermissionsGroup checkPermissionsGroup) { + this.checkPermissionsGroup = checkPermissionsGroup; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.java new file mode 100644 index 000000000000..e9df4318dc4f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceMySqlTaskProperties.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.azuredatabasemigrationservice.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 MySQL database connection. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ConnectToSource.MySql") +public class ConnectToSourceMySqlTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToSourceMySqlTaskInput 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 ConnectToSourceMySqlTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToSourceMySqlTaskProperties object itself. + */ + public ConnectToSourceMySqlTaskProperties withInput(ConnectToSourceMySqlTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceNonSqlTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceNonSqlTaskOutput.java new file mode 100644 index 000000000000..a742b06d72b2 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceNonSqlTaskOutput.java @@ -0,0 +1,93 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for connect to Oracle, MySQL type source. + */ +public class ConnectToSourceNonSqlTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Server brand version. + */ + @JsonProperty(value = "sourceServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerBrandVersion; + + /** + * Server properties. + */ + @JsonProperty(value = "serverProperties", access = JsonProperty.Access.WRITE_ONLY) + private ServerProperties serverProperties; + + /** + * List of databases on the server. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private List databases; + + /** + * 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 server brand version. + * + * @return the sourceServerBrandVersion value + */ + public String sourceServerBrandVersion() { + return this.sourceServerBrandVersion; + } + + /** + * Get server properties. + * + * @return the serverProperties value + */ + public ServerProperties serverProperties() { + return this.serverProperties; + } + + /** + * Get list of databases on the server. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Get validation errors associated with the task. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.java new file mode 100644 index 000000000000..6783a975414d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerSyncTaskProperties.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.azuredatabasemigrationservice.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 SQL Server and source + * server requirements for online migration. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ConnectToSource.SqlServer.Sync") +public class ConnectToSourceSqlServerSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToSourceSqlServerTaskInput 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 ConnectToSourceSqlServerTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToSourceSqlServerSyncTaskProperties object itself. + */ + public ConnectToSourceSqlServerSyncTaskProperties withInput(ConnectToSourceSqlServerTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskInput.java new file mode 100644 index 000000000000..ff591aa3adec --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskInput.java @@ -0,0 +1,150 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to SQL Server and also + * validates source server requirements. + */ +public class ConnectToSourceSqlServerTaskInput { + /** + * Connection information for Source SQL Server. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Permission group for validations. Possible values include: 'Default', + * 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', + * 'MigrationFromMySQLToAzureDBForMySQL'. + */ + @JsonProperty(value = "checkPermissionsGroup") + private ServerLevelPermissionsGroup checkPermissionsGroup; + + /** + * Flag for whether to collect logins from source server. + */ + @JsonProperty(value = "collectLogins") + private Boolean collectLogins; + + /** + * Flag for whether to collect agent jobs from source server. + */ + @JsonProperty(value = "collectAgentJobs") + private Boolean collectAgentJobs; + + /** + * Flag for whether to collect TDE Certificate names from source server. + */ + @JsonProperty(value = "collectTdeCertificateInfo") + private Boolean collectTdeCertificateInfo; + + /** + * 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 ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get permission group for validations. Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL'. + * + * @return the checkPermissionsGroup value + */ + public ServerLevelPermissionsGroup checkPermissionsGroup() { + return this.checkPermissionsGroup; + } + + /** + * Set permission group for validations. Possible values include: 'Default', 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL'. + * + * @param checkPermissionsGroup the checkPermissionsGroup value to set + * @return the ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withCheckPermissionsGroup(ServerLevelPermissionsGroup checkPermissionsGroup) { + this.checkPermissionsGroup = checkPermissionsGroup; + return this; + } + + /** + * Get flag for whether to collect logins from source server. + * + * @return the collectLogins value + */ + public Boolean collectLogins() { + return this.collectLogins; + } + + /** + * Set flag for whether to collect logins from source server. + * + * @param collectLogins the collectLogins value to set + * @return the ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withCollectLogins(Boolean collectLogins) { + this.collectLogins = collectLogins; + return this; + } + + /** + * Get flag for whether to collect agent jobs from source server. + * + * @return the collectAgentJobs value + */ + public Boolean collectAgentJobs() { + return this.collectAgentJobs; + } + + /** + * Set flag for whether to collect agent jobs from source server. + * + * @param collectAgentJobs the collectAgentJobs value to set + * @return the ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withCollectAgentJobs(Boolean collectAgentJobs) { + this.collectAgentJobs = collectAgentJobs; + return this; + } + + /** + * Get flag for whether to collect TDE Certificate names from source server. + * + * @return the collectTdeCertificateInfo value + */ + public Boolean collectTdeCertificateInfo() { + return this.collectTdeCertificateInfo; + } + + /** + * Set flag for whether to collect TDE Certificate names from source server. + * + * @param collectTdeCertificateInfo the collectTdeCertificateInfo value to set + * @return the ConnectToSourceSqlServerTaskInput object itself. + */ + public ConnectToSourceSqlServerTaskInput withCollectTdeCertificateInfo(Boolean collectTdeCertificateInfo) { + this.collectTdeCertificateInfo = collectTdeCertificateInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.java new file mode 100644 index 000000000000..9601f7518335 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutput.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.azuredatabasemigrationservice.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 validates connection to SQL Server and also + * validates source server requirements. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ConnectToSourceSqlServerTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AgentJobLevelOutput", value = ConnectToSourceSqlServerTaskOutputAgentJobLevel.class), + @JsonSubTypes.Type(name = "LoginLevelOutput", value = ConnectToSourceSqlServerTaskOutputLoginLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = ConnectToSourceSqlServerTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "TaskLevelOutput", value = ConnectToSourceSqlServerTaskOutputTaskLevel.class) +}) +public class ConnectToSourceSqlServerTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java new file mode 100644 index 000000000000..8dceb41087c6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java @@ -0,0 +1,129 @@ +/** + * 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.azuredatabasemigrationservice.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; + +/** + * 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") +@JsonTypeName("AgentJobLevelOutput") +public class ConnectToSourceSqlServerTaskOutputAgentJobLevel extends ConnectToSourceSqlServerTaskOutput { + /** + * Agent Job name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The type of Agent Job. + */ + @JsonProperty(value = "jobCategory", access = JsonProperty.Access.WRITE_ONLY) + private String jobCategory; + + /** + * The state of the original Agent Job. + */ + @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEnabled; + + /** + * The owner of the Agent Job. + */ + @JsonProperty(value = "jobOwner", access = JsonProperty.Access.WRITE_ONLY) + private String jobOwner; + + /** + * UTC Date and time when the Agent Job was last executed. + */ + @JsonProperty(value = "lastExecutedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastExecutedOn; + + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Information about eligiblity of agent job for migration. + */ + @JsonProperty(value = "migrationEligibility", access = JsonProperty.Access.WRITE_ONLY) + private MigrationEligibilityInfo migrationEligibility; + + /** + * Get agent Job name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the type of Agent Job. + * + * @return the jobCategory value + */ + public String jobCategory() { + return this.jobCategory; + } + + /** + * Get the state of the original Agent Job. + * + * @return the isEnabled value + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * Get the owner of the Agent Job. + * + * @return the jobOwner value + */ + public String jobOwner() { + return this.jobOwner; + } + + /** + * Get uTC Date and time when the Agent Job was last executed. + * + * @return the lastExecutedOn value + */ + public DateTime lastExecutedOn() { + return this.lastExecutedOn; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + + /** + * Get information about eligiblity of agent job for migration. + * + * @return the migrationEligibility value + */ + public MigrationEligibilityInfo migrationEligibility() { + return this.migrationEligibility; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..6ab6f229e737 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java @@ -0,0 +1,102 @@ +/** + * 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.azuredatabasemigrationservice.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; + +/** + * 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") +@JsonTypeName("DatabaseLevelOutput") +public class ConnectToSourceSqlServerTaskOutputDatabaseLevel extends ConnectToSourceSqlServerTaskOutput { + /** + * Database name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Size of the file in megabytes. + */ + @JsonProperty(value = "sizeMB", access = JsonProperty.Access.WRITE_ONLY) + private Double sizeMB; + + /** + * The list of database files. + */ + @JsonProperty(value = "databaseFiles", access = JsonProperty.Access.WRITE_ONLY) + private List databaseFiles; + + /** + * SQL Server compatibility level of database. Possible values include: + * 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', + * 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + */ + @JsonProperty(value = "compatibilityLevel", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseCompatLevel compatibilityLevel; + + /** + * State of the database. Possible values include: 'Online', 'Restoring', + * 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', + * 'Copying', 'OfflineSecondary'. + */ + @JsonProperty(value = "databaseState", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseState databaseState; + + /** + * Get database name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get size of the file in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + + /** + * Get the list of database files. + * + * @return the databaseFiles value + */ + public List databaseFiles() { + return this.databaseFiles; + } + + /** + * Get sQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + * + * @return the compatibilityLevel value + */ + public DatabaseCompatLevel compatibilityLevel() { + return this.compatibilityLevel; + } + + /** + * Get state of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'. + * + * @return the databaseState value + */ + public DatabaseState databaseState() { + return this.databaseState; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java new file mode 100644 index 000000000000..202188137dd7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputLoginLevel.java @@ -0,0 +1,99 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * 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") +@JsonTypeName("LoginLevelOutput") +public class ConnectToSourceSqlServerTaskOutputLoginLevel extends ConnectToSourceSqlServerTaskOutput { + /** + * Login name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The type of login. Possible values include: 'WindowsUser', + * 'WindowsGroup', 'SqlLogin', 'Certificate', 'AsymmetricKey', + * 'ExternalUser', 'ExternalGroup'. + */ + @JsonProperty(value = "loginType", access = JsonProperty.Access.WRITE_ONLY) + private LoginType loginType; + + /** + * The default database for the login. + */ + @JsonProperty(value = "defaultDatabase", access = JsonProperty.Access.WRITE_ONLY) + private String defaultDatabase; + + /** + * The state of the login. + */ + @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEnabled; + + /** + * Information about eligiblity of login for migration. + */ + @JsonProperty(value = "migrationEligibility", access = JsonProperty.Access.WRITE_ONLY) + private MigrationEligibilityInfo migrationEligibility; + + /** + * Get login name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the type of login. Possible values include: 'WindowsUser', 'WindowsGroup', 'SqlLogin', 'Certificate', 'AsymmetricKey', 'ExternalUser', 'ExternalGroup'. + * + * @return the loginType value + */ + public LoginType loginType() { + return this.loginType; + } + + /** + * Get the default database for the login. + * + * @return the defaultDatabase value + */ + public String defaultDatabase() { + return this.defaultDatabase; + } + + /** + * Get the state of the login. + * + * @return the isEnabled value + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * Get information about eligiblity of login for migration. + * + * @return the migrationEligibility value + */ + public MigrationEligibilityInfo migrationEligibility() { + return this.migrationEligibility; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java new file mode 100644 index 000000000000..69215e741d8c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskOutputTaskLevel.java @@ -0,0 +1,129 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * 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") +@JsonTypeName("TaskLevelOutput") +public class ConnectToSourceSqlServerTaskOutputTaskLevel extends ConnectToSourceSqlServerTaskOutput { + /** + * Source databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * Source logins as a map from login name to login id. + */ + @JsonProperty(value = "logins", access = JsonProperty.Access.WRITE_ONLY) + private Map logins; + + /** + * Source agent jobs as a map from agent job name to id. + */ + @JsonProperty(value = "agentJobs", access = JsonProperty.Access.WRITE_ONLY) + private Map agentJobs; + + /** + * Mapping from database name to TDE certificate name, if applicable. + */ + @JsonProperty(value = "databaseTdeCertificateMapping", access = JsonProperty.Access.WRITE_ONLY) + private Map databaseTdeCertificateMapping; + + /** + * 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; + + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get source databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * Get source logins as a map from login name to login id. + * + * @return the logins value + */ + public Map logins() { + return this.logins; + } + + /** + * Get source agent jobs as a map from agent job name to id. + * + * @return the agentJobs value + */ + public Map agentJobs() { + return this.agentJobs; + } + + /** + * Get mapping from database name to TDE certificate name, if applicable. + * + * @return the databaseTdeCertificateMapping value + */ + public Map databaseTdeCertificateMapping() { + return this.databaseTdeCertificateMapping; + } + + /** + * 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 validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.java new file mode 100644 index 000000000000..7d768f4d37bd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToSourceSqlServerTaskProperties.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.azuredatabasemigrationservice.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 SQL Server and also + * validates source server requirements. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ConnectToSource.SqlServer") +public class ConnectToSourceSqlServerTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToSourceSqlServerTaskInput 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 ConnectToSourceSqlServerTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToSourceSqlServerTaskProperties object itself. + */ + public ConnectToSourceSqlServerTaskProperties withInput(ConnectToSourceSqlServerTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskInput.java new file mode 100644 index 000000000000..47f40bf28347 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to Azure Database for MySQL and + * target server requirements. + */ +public class ConnectToTargetAzureDbForMySqlTaskInput { + /** + * Connection information for source MySQL server. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private MySqlConnectionInfo sourceConnectionInfo; + + /** + * Connection information for target Azure Database for MySQL server. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private MySqlConnectionInfo targetConnectionInfo; + + /** + * Get connection information for source MySQL server. + * + * @return the sourceConnectionInfo value + */ + public MySqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set connection information for source MySQL server. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the ConnectToTargetAzureDbForMySqlTaskInput object itself. + */ + public ConnectToTargetAzureDbForMySqlTaskInput withSourceConnectionInfo(MySqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get connection information for target Azure Database for MySQL server. + * + * @return the targetConnectionInfo value + */ + public MySqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target Azure Database for MySQL server. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ConnectToTargetAzureDbForMySqlTaskInput object itself. + */ + public ConnectToTargetAzureDbForMySqlTaskInput withTargetConnectionInfo(MySqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskOutput.java new file mode 100644 index 000000000000..0aaf623d4710 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskOutput.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.azuredatabasemigrationservice.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 MySQL + * and target server requirements. + */ +public class ConnectToTargetAzureDbForMySqlTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Version of the target server. + */ + @JsonProperty(value = "serverVersion", access = JsonProperty.Access.WRITE_ONLY) + private String serverVersion; + + /** + * 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 serverVersion value + */ + public String serverVersion() { + return this.serverVersion; + } + + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.java new file mode 100644 index 000000000000..0d994f773866 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetAzureDbForMySqlTaskProperties.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.azuredatabasemigrationservice.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 + * MySQL and target server requirements. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ConnectToTarget.AzureDbForMySql") +public class ConnectToTargetAzureDbForMySqlTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToTargetAzureDbForMySqlTaskInput 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 ConnectToTargetAzureDbForMySqlTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToTargetAzureDbForMySqlTaskProperties object itself. + */ + public ConnectToTargetAzureDbForMySqlTaskProperties withInput(ConnectToTargetAzureDbForMySqlTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskInput.java new file mode 100644 index 000000000000..df6c6d3942c7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to SQL DB and target server + * requirements. + */ +public class ConnectToTargetSqlDbTaskInput { + /** + * Connection information for target SQL DB. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Get connection information for target SQL DB. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target SQL DB. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ConnectToTargetSqlDbTaskInput object itself. + */ + public ConnectToTargetSqlDbTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskOutput.java new file mode 100644 index 000000000000..47530eb7f7a8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskOutput.java @@ -0,0 +1,79 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for the task that validates connection to SQL DB and target server + * requirements. + */ +public class ConnectToTargetSqlDbTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Source databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * Version of the target server. + */ + @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; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get source databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * Get version of the target server. + * + * @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; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.java new file mode 100644 index 000000000000..88f793823cec --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlDbTaskProperties.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.azuredatabasemigrationservice.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 SQL DB and target + * server requirements. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ConnectToTarget.SqlDb") +public class ConnectToTargetSqlDbTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToTargetSqlDbTaskInput 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 ConnectToTargetSqlDbTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToTargetSqlDbTaskProperties object itself. + */ + public ConnectToTargetSqlDbTaskProperties withInput(ConnectToTargetSqlDbTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskInput.java new file mode 100644 index 000000000000..d1fdde8cf0d3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to Azure SQL Database Managed + * Instance. + */ +public class ConnectToTargetSqlMITaskInput { + /** + * Connection information for target SQL Server. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Get connection information for target SQL Server. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target SQL Server. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ConnectToTargetSqlMITaskInput object itself. + */ + public ConnectToTargetSqlMITaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskOutput.java new file mode 100644 index 000000000000..992a6ac5914b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskOutput.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.azuredatabasemigrationservice.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 ConnectToTargetSqlMITaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * 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; + + /** + * List of logins on the target server. + */ + @JsonProperty(value = "logins", access = JsonProperty.Access.WRITE_ONLY) + private List logins; + + /** + * List of agent jobs on the target server. + */ + @JsonProperty(value = "agentJobs", access = JsonProperty.Access.WRITE_ONLY) + private List agentJobs; + + /** + * Validation errors. + */ + @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 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 list of logins on the target server. + * + * @return the logins value + */ + public List logins() { + return this.logins; + } + + /** + * Get list of agent jobs on the target server. + * + * @return the agentJobs value + */ + public List agentJobs() { + return this.agentJobs; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.java new file mode 100644 index 000000000000..71739cea7de7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlMITaskProperties.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.azuredatabasemigrationservice.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") +@JsonTypeName("ConnectToTarget.AzureSqlDbMI") +public class ConnectToTargetSqlMITaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToTargetSqlMITaskInput 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 ConnectToTargetSqlMITaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToTargetSqlMITaskProperties object itself. + */ + public ConnectToTargetSqlMITaskProperties withInput(ConnectToTargetSqlMITaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskInput.java new file mode 100644 index 000000000000..f4ae885393b8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that validates connection to Azure SQL DB and target + * server requirements. + */ +public class ConnectToTargetSqlSqlDbSyncTaskInput { + /** + * Connection information for source SQL Server. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Connection information for target SQL DB. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * 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 ConnectToTargetSqlSqlDbSyncTaskInput object itself. + */ + public ConnectToTargetSqlSqlDbSyncTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get connection information for target SQL DB. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target SQL DB. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ConnectToTargetSqlSqlDbSyncTaskInput object itself. + */ + public ConnectToTargetSqlSqlDbSyncTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.java new file mode 100644 index 000000000000..776af330a924 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectToTargetSqlSqlDbSyncTaskProperties.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.azuredatabasemigrationservice.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 SQL DB and target + * server requirements for online migration. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ConnectToTarget.SqlDb.Sync") +public class ConnectToTargetSqlSqlDbSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ConnectToTargetSqlSqlDbSyncTaskInput 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 ConnectToTargetSqlSqlDbSyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ConnectToTargetSqlSqlDbSyncTaskProperties object itself. + */ + public ConnectToTargetSqlSqlDbSyncTaskProperties withInput(ConnectToTargetSqlSqlDbSyncTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectionInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectionInfo.java new file mode 100644 index 000000000000..3b2992385915 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ConnectionInfo.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.azuredatabasemigrationservice.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; + +/** + * Defines the connection properties of a server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Unknown") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class), + @JsonSubTypes.Type(name = "PostgreSqlConnectionInfo", value = PostgreSqlConnectionInfo.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 = "GetTDECertificates.Sql", value = GetTdeCertificatesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "Validate.MongoDb", value = ValidateMongoDbTaskProperties.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.SqlDb.Sync", value = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.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", value = MigrateSqlServerSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.MongoDb", value = MigrateMongoDbTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForMySql", value = ConnectToTargetAzureDbForMySqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTables.AzureSqlDb.Sync", value = GetUserTablesSqlSyncTaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb.Sync", value = ConnectToTargetSqlSqlDbSyncTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.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), + @JsonSubTypes.Type(name = "ConnectToSource.MySql", value = ConnectToSourceMySqlTaskProperties.class), + @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) +}) +public class ConnectionInfo { + /** + * User name. + */ + @JsonProperty(value = "userName") + private String userName; + + /** + * Password credential. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get user name. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Set user name. + * + * @param userName the userName value to set + * @return the ConnectionInfo object itself. + */ + public ConnectionInfo withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get password credential. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set password credential. + * + * @param password the password value to set + * @return the ConnectionInfo object itself. + */ + public ConnectionInfo withPassword(String password) { + this.password = password; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataIntegrityValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataIntegrityValidationResult.java new file mode 100644 index 000000000000..91252ff51f19 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataIntegrityValidationResult.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results for checksum based Data Integrity validation results. + */ +public class DataIntegrityValidationResult { + /** + * List of failed table names of source and target pair. + */ + @JsonProperty(value = "failedObjects") + private Map failedObjects; + + /** + * List of errors that happened while performing data integrity validation. + */ + @JsonProperty(value = "validationErrors") + private ValidationError validationErrors; + + /** + * Get list of failed table names of source and target pair. + * + * @return the failedObjects value + */ + public Map failedObjects() { + return this.failedObjects; + } + + /** + * Set list of failed table names of source and target pair. + * + * @param failedObjects the failedObjects value to set + * @return the DataIntegrityValidationResult object itself. + */ + public DataIntegrityValidationResult withFailedObjects(Map failedObjects) { + this.failedObjects = failedObjects; + return this; + } + + /** + * Get list of errors that happened while performing data integrity validation. + * + * @return the validationErrors value + */ + public ValidationError validationErrors() { + return this.validationErrors; + } + + /** + * Set list of errors that happened while performing data integrity validation. + * + * @param validationErrors the validationErrors value to set + * @return the DataIntegrityValidationResult object itself. + */ + public DataIntegrityValidationResult withValidationErrors(ValidationError validationErrors) { + this.validationErrors = validationErrors; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataItemMigrationSummaryResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataItemMigrationSummaryResult.java new file mode 100644 index 000000000000..596c2d6c65dd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataItemMigrationSummaryResult.java @@ -0,0 +1,155 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Basic summary of a data item migration. + */ +public class DataItemMigrationSummaryResult { + /** + * Name of the item. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * 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 state of migration. Possible values include: 'None', + * 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Number of items. + */ + @JsonProperty(value = "itemsCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCount; + + /** + * Number of successfully completed items. + */ + @JsonProperty(value = "itemsCompletedCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCompletedCount; + + /** + * Wildcard string prefix to use for querying all errors of the item. + */ + @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String errorPrefix; + + /** + * Wildcard string prefix to use for querying all sub-tem results of the + * item. + */ + @JsonProperty(value = "resultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String resultPrefix; + + /** + * Get name of the item. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * 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 state of migration. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get number of items. + * + * @return the itemsCount value + */ + public Long itemsCount() { + return this.itemsCount; + } + + /** + * Get number of successfully completed items. + * + * @return the itemsCompletedCount value + */ + public Long itemsCompletedCount() { + return this.itemsCompletedCount; + } + + /** + * Get wildcard string prefix to use for querying all errors of the item. + * + * @return the errorPrefix value + */ + public String errorPrefix() { + return this.errorPrefix; + } + + /** + * Get wildcard string prefix to use for querying all sub-tem results of the item. + * + * @return the resultPrefix value + */ + public String resultPrefix() { + return this.resultPrefix; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationError.java new file mode 100644 index 000000000000..c3426de37d7f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationError.java @@ -0,0 +1,58 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration Task errors. + */ +public class DataMigrationError { + /** + * Error description. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Possible values include: 'Default', 'Warning', 'Error'. + */ + @JsonProperty(value = "type") + private ErrorType type; + + /** + * Get error description. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get possible values include: 'Default', 'Warning', 'Error'. + * + * @return the type value + */ + public ErrorType type() { + return this.type; + } + + /** + * Set possible values include: 'Default', 'Warning', 'Error'. + * + * @param type the type value to set + * @return the DataMigrationError object itself. + */ + public DataMigrationError withType(ErrorType type) { + this.type = type; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationProjectMetadata.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationProjectMetadata.java new file mode 100644 index 000000000000..65ad70f24b7e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationProjectMetadata.java @@ -0,0 +1,138 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Common metadata for migration projects. + */ +public class DataMigrationProjectMetadata { + /** + * Source server name. + */ + @JsonProperty(value = "sourceServerName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerName; + + /** + * Source server port number. + */ + @JsonProperty(value = "sourceServerPort", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerPort; + + /** + * Source username. + */ + @JsonProperty(value = "sourceUsername", access = JsonProperty.Access.WRITE_ONLY) + private String sourceUsername; + + /** + * Target server name. + */ + @JsonProperty(value = "targetServerName", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerName; + + /** + * Target username. + */ + @JsonProperty(value = "targetUsername", access = JsonProperty.Access.WRITE_ONLY) + private String targetUsername; + + /** + * Target database name. + */ + @JsonProperty(value = "targetDbName", access = JsonProperty.Access.WRITE_ONLY) + private String targetDbName; + + /** + * Whether target connection is Windows authentication. + */ + @JsonProperty(value = "targetUsingWinAuth", access = JsonProperty.Access.WRITE_ONLY) + private Boolean targetUsingWinAuth; + + /** + * List of tables selected for migration. + */ + @JsonProperty(value = "selectedMigrationTables", access = JsonProperty.Access.WRITE_ONLY) + private List selectedMigrationTables; + + /** + * Get source server name. + * + * @return the sourceServerName value + */ + public String sourceServerName() { + return this.sourceServerName; + } + + /** + * Get source server port number. + * + * @return the sourceServerPort value + */ + public String sourceServerPort() { + return this.sourceServerPort; + } + + /** + * Get source username. + * + * @return the sourceUsername value + */ + public String sourceUsername() { + return this.sourceUsername; + } + + /** + * Get target server name. + * + * @return the targetServerName value + */ + public String targetServerName() { + return this.targetServerName; + } + + /** + * Get target username. + * + * @return the targetUsername value + */ + public String targetUsername() { + return this.targetUsername; + } + + /** + * Get target database name. + * + * @return the targetDbName value + */ + public String targetDbName() { + return this.targetDbName; + } + + /** + * Get whether target connection is Windows authentication. + * + * @return the targetUsingWinAuth value + */ + public Boolean targetUsingWinAuth() { + return this.targetUsingWinAuth; + } + + /** + * Get list of tables selected for migration. + * + * @return the selectedMigrationTables value + */ + public List selectedMigrationTables() { + return this.selectedMigrationTables; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationResultCode.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationResultCode.java new file mode 100644 index 000000000000..d003dd7d72b5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationResultCode.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DataMigrationResultCode. + */ +public final class DataMigrationResultCode extends ExpandableStringEnum { + /** Static value Initial for DataMigrationResultCode. */ + public static final DataMigrationResultCode INITIAL = fromString("Initial"); + + /** Static value Completed for DataMigrationResultCode. */ + public static final DataMigrationResultCode COMPLETED = fromString("Completed"); + + /** Static value ObjectNotExistsInSource for DataMigrationResultCode. */ + public static final DataMigrationResultCode OBJECT_NOT_EXISTS_IN_SOURCE = fromString("ObjectNotExistsInSource"); + + /** Static value ObjectNotExistsInTarget for DataMigrationResultCode. */ + public static final DataMigrationResultCode OBJECT_NOT_EXISTS_IN_TARGET = fromString("ObjectNotExistsInTarget"); + + /** Static value TargetObjectIsInaccessible for DataMigrationResultCode. */ + public static final DataMigrationResultCode TARGET_OBJECT_IS_INACCESSIBLE = fromString("TargetObjectIsInaccessible"); + + /** Static value FatalError for DataMigrationResultCode. */ + public static final DataMigrationResultCode FATAL_ERROR = fromString("FatalError"); + + /** + * Creates or finds a DataMigrationResultCode from its string representation. + * @param name a name to look for + * @return the corresponding DataMigrationResultCode + */ + @JsonCreator + public static DataMigrationResultCode fromString(String name) { + return fromString(name, DataMigrationResultCode.class); + } + + /** + * @return known DataMigrationResultCode values + */ + public static Collection values() { + return values(DataMigrationResultCode.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationService.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationService.java new file mode 100644 index 000000000000..c325b821f62e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationService.java @@ -0,0 +1,206 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +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.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationServiceInner; + +/** + * Type representing DataMigrationService. + */ +public interface DataMigrationService extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the etag value. + */ + String etag(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the provisioningState value. + */ + ServiceProvisioningState provisioningState(); + + /** + * @return the publicKey value. + */ + String publicKey(); + + /** + * @return the sku value. + */ + ServiceSku sku(); + + /** + * @return the virtualSubnetId value. + */ + String virtualSubnetId(); + + /** + * The entirety of the DataMigrationService definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithVirtualSubnetId, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataMigrationService definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataMigrationService definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the DataMigrationService definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the datamigrationservice definition allowing to specify VirtualSubnetId. + */ + interface WithVirtualSubnetId { + /** + * Specifies virtualSubnetId. + * @param virtualSubnetId The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined + * @return the next definition stage +*/ + WithCreate withVirtualSubnetId(String virtualSubnetId); + } + + /** + * The stage of the datamigrationservice definition allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag HTTP strong entity tag value. Ignored if submitted + * @return the next definition stage + */ + WithCreate withEtag(String etag); + } + + /** + * The stage of the datamigrationservice definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind The resource kind. Only 'vm' (the default) is supported + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the datamigrationservice definition allowing to specify PublicKey. + */ + interface WithPublicKey { + /** + * Specifies publicKey. + * @param publicKey The public key of the service, used to encrypt secrets sent to the service + * @return the next definition stage + */ + WithCreate withPublicKey(String publicKey); + } + + /** + * The stage of the datamigrationservice definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Service SKU + * @return the next definition stage + */ + WithCreate withSku(ServiceSku sku); + } + + /** + * 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, Resource.DefinitionWithTags, DefinitionStages.WithEtag, DefinitionStages.WithKind, DefinitionStages.WithPublicKey, DefinitionStages.WithSku { + } + } + /** + * The template for a DataMigrationService update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithEtag, UpdateStages.WithKind, UpdateStages.WithPublicKey, UpdateStages.WithSku { + } + + /** + * Grouping of DataMigrationService update stages. + */ + interface UpdateStages { + /** + * The stage of the datamigrationservice update allowing to specify Etag. + */ + interface WithEtag { + /** + * Specifies etag. + * @param etag HTTP strong entity tag value. Ignored if submitted + * @return the next update stage + */ + Update withEtag(String etag); + } + + /** + * The stage of the datamigrationservice update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind The resource kind. Only 'vm' (the default) is supported + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the datamigrationservice update allowing to specify PublicKey. + */ + interface WithPublicKey { + /** + * Specifies publicKey. + * @param publicKey The public key of the service, used to encrypt secrets sent to the service + * @return the next update stage + */ + Update withPublicKey(String publicKey); + } + + /** + * The stage of the datamigrationservice update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Service SKU + * @return the next update stage + */ + Update withSku(ServiceSku sku); + } + + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationServiceStatusResponse.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationServiceStatusResponse.java new file mode 100644 index 000000000000..f656d0f2a336 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DataMigrationServiceStatusResponse.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationServiceStatusResponseInner; +import java.util.List; + +/** + * Type representing DataMigrationServiceStatusResponse. + */ +public interface DataMigrationServiceStatusResponse extends HasInner, HasManager { + /** + * @return the agentVersion value. + */ + String agentVersion(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the supportedTaskTypes value. + */ + List supportedTaskTypes(); + + /** + * @return the vmSize value. + */ + String vmSize(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Database.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Database.java new file mode 100644 index 000000000000..6ce94be21b7e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Database.java @@ -0,0 +1,463 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about a single database. + */ +public class Database { + /** + * Unique identifier for the database. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Name of the database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * SQL Server compatibility level of database. Possible values include: + * 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', + * 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + */ + @JsonProperty(value = "compatibilityLevel") + private DatabaseCompatLevel compatibilityLevel; + + /** + * Collation name of the database. + */ + @JsonProperty(value = "collation") + private String collation; + + /** + * Name of the server. + */ + @JsonProperty(value = "serverName") + private String serverName; + + /** + * Fully qualified name. + */ + @JsonProperty(value = "fqdn") + private String fqdn; + + /** + * Install id of the database. + */ + @JsonProperty(value = "installId") + private String installId; + + /** + * Version of the server. + */ + @JsonProperty(value = "serverVersion") + private String serverVersion; + + /** + * Edition of the server. + */ + @JsonProperty(value = "serverEdition") + private String serverEdition; + + /** + * Product level of the server (RTM, SP, CTP). + */ + @JsonProperty(value = "serverLevel") + private String serverLevel; + + /** + * Default path of the data files. + */ + @JsonProperty(value = "serverDefaultDataPath") + private String serverDefaultDataPath; + + /** + * Default path of the log files. + */ + @JsonProperty(value = "serverDefaultLogPath") + private String serverDefaultLogPath; + + /** + * Default path of the backup folder. + */ + @JsonProperty(value = "serverDefaultBackupPath") + private String serverDefaultBackupPath; + + /** + * Number of cores on the server. + */ + @JsonProperty(value = "serverCoreCount") + private Integer serverCoreCount; + + /** + * Number of cores on the server that have VISIBLE ONLINE status. + */ + @JsonProperty(value = "serverVisibleOnlineCoreCount") + private Integer serverVisibleOnlineCoreCount; + + /** + * State of the database. Possible values include: 'Online', 'Restoring', + * 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', + * 'Copying', 'OfflineSecondary'. + */ + @JsonProperty(value = "databaseState") + private DatabaseState databaseState; + + /** + * The unique Server Id. + */ + @JsonProperty(value = "serverId") + private String serverId; + + /** + * Get unique identifier for the database. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique identifier for the database. + * + * @param id the id value to set + * @return the Database object itself. + */ + public Database withId(String id) { + this.id = id; + return this; + } + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the Database object itself. + */ + public Database withName(String name) { + this.name = name; + return this; + } + + /** + * Get sQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + * + * @return the compatibilityLevel value + */ + public DatabaseCompatLevel compatibilityLevel() { + return this.compatibilityLevel; + } + + /** + * Set sQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140'. + * + * @param compatibilityLevel the compatibilityLevel value to set + * @return the Database object itself. + */ + public Database withCompatibilityLevel(DatabaseCompatLevel compatibilityLevel) { + this.compatibilityLevel = compatibilityLevel; + return this; + } + + /** + * Get collation name of the database. + * + * @return the collation value + */ + public String collation() { + return this.collation; + } + + /** + * Set collation name of the database. + * + * @param collation the collation value to set + * @return the Database object itself. + */ + public Database withCollation(String collation) { + this.collation = collation; + return this; + } + + /** + * Get name of the server. + * + * @return the serverName value + */ + public String serverName() { + return this.serverName; + } + + /** + * Set name of the server. + * + * @param serverName the serverName value to set + * @return the Database object itself. + */ + public Database withServerName(String serverName) { + this.serverName = serverName; + return this; + } + + /** + * Get fully qualified name. + * + * @return the fqdn value + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set fully qualified name. + * + * @param fqdn the fqdn value to set + * @return the Database object itself. + */ + public Database withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get install id of the database. + * + * @return the installId value + */ + public String installId() { + return this.installId; + } + + /** + * Set install id of the database. + * + * @param installId the installId value to set + * @return the Database object itself. + */ + public Database withInstallId(String installId) { + this.installId = installId; + return this; + } + + /** + * Get version of the server. + * + * @return the serverVersion value + */ + public String serverVersion() { + return this.serverVersion; + } + + /** + * Set version of the server. + * + * @param serverVersion the serverVersion value to set + * @return the Database object itself. + */ + public Database withServerVersion(String serverVersion) { + this.serverVersion = serverVersion; + return this; + } + + /** + * Get edition of the server. + * + * @return the serverEdition value + */ + public String serverEdition() { + return this.serverEdition; + } + + /** + * Set edition of the server. + * + * @param serverEdition the serverEdition value to set + * @return the Database object itself. + */ + public Database withServerEdition(String serverEdition) { + this.serverEdition = serverEdition; + return this; + } + + /** + * Get product level of the server (RTM, SP, CTP). + * + * @return the serverLevel value + */ + public String serverLevel() { + return this.serverLevel; + } + + /** + * Set product level of the server (RTM, SP, CTP). + * + * @param serverLevel the serverLevel value to set + * @return the Database object itself. + */ + public Database withServerLevel(String serverLevel) { + this.serverLevel = serverLevel; + return this; + } + + /** + * Get default path of the data files. + * + * @return the serverDefaultDataPath value + */ + public String serverDefaultDataPath() { + return this.serverDefaultDataPath; + } + + /** + * Set default path of the data files. + * + * @param serverDefaultDataPath the serverDefaultDataPath value to set + * @return the Database object itself. + */ + public Database withServerDefaultDataPath(String serverDefaultDataPath) { + this.serverDefaultDataPath = serverDefaultDataPath; + return this; + } + + /** + * Get default path of the log files. + * + * @return the serverDefaultLogPath value + */ + public String serverDefaultLogPath() { + return this.serverDefaultLogPath; + } + + /** + * Set default path of the log files. + * + * @param serverDefaultLogPath the serverDefaultLogPath value to set + * @return the Database object itself. + */ + public Database withServerDefaultLogPath(String serverDefaultLogPath) { + this.serverDefaultLogPath = serverDefaultLogPath; + return this; + } + + /** + * Get default path of the backup folder. + * + * @return the serverDefaultBackupPath value + */ + public String serverDefaultBackupPath() { + return this.serverDefaultBackupPath; + } + + /** + * Set default path of the backup folder. + * + * @param serverDefaultBackupPath the serverDefaultBackupPath value to set + * @return the Database object itself. + */ + public Database withServerDefaultBackupPath(String serverDefaultBackupPath) { + this.serverDefaultBackupPath = serverDefaultBackupPath; + return this; + } + + /** + * Get number of cores on the server. + * + * @return the serverCoreCount value + */ + public Integer serverCoreCount() { + return this.serverCoreCount; + } + + /** + * Set number of cores on the server. + * + * @param serverCoreCount the serverCoreCount value to set + * @return the Database object itself. + */ + public Database withServerCoreCount(Integer serverCoreCount) { + this.serverCoreCount = serverCoreCount; + return this; + } + + /** + * Get number of cores on the server that have VISIBLE ONLINE status. + * + * @return the serverVisibleOnlineCoreCount value + */ + public Integer serverVisibleOnlineCoreCount() { + return this.serverVisibleOnlineCoreCount; + } + + /** + * Set number of cores on the server that have VISIBLE ONLINE status. + * + * @param serverVisibleOnlineCoreCount the serverVisibleOnlineCoreCount value to set + * @return the Database object itself. + */ + public Database withServerVisibleOnlineCoreCount(Integer serverVisibleOnlineCoreCount) { + this.serverVisibleOnlineCoreCount = serverVisibleOnlineCoreCount; + return this; + } + + /** + * Get state of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'. + * + * @return the databaseState value + */ + public DatabaseState databaseState() { + return this.databaseState; + } + + /** + * Set state of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary'. + * + * @param databaseState the databaseState value to set + * @return the Database object itself. + */ + public Database withDatabaseState(DatabaseState databaseState) { + this.databaseState = databaseState; + return this; + } + + /** + * Get the unique Server Id. + * + * @return the serverId value + */ + public String serverId() { + return this.serverId; + } + + /** + * Set the unique Server Id. + * + * @param serverId the serverId value to set + * @return the Database object itself. + */ + public Database withServerId(String serverId) { + this.serverId = serverId; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseBackupInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseBackupInfo.java new file mode 100644 index 000000000000..ed88bf2afb9e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseBackupInfo.java @@ -0,0 +1,142 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about backup files when existing backup mode is used. + */ +public class DatabaseBackupInfo { + /** + * Database name. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * Backup Type. Possible values include: 'Database', 'TransactionLog', + * 'File', 'DifferentialDatabase', 'DifferentialFile', 'Partial', + * 'DifferentialPartial'. + */ + @JsonProperty(value = "backupType", access = JsonProperty.Access.WRITE_ONLY) + private BackupType backupType; + + /** + * The list of backup files for the current database. + */ + @JsonProperty(value = "backupFiles", access = JsonProperty.Access.WRITE_ONLY) + private List backupFiles; + + /** + * Position of current database backup in the file. + */ + @JsonProperty(value = "position", access = JsonProperty.Access.WRITE_ONLY) + private Integer position; + + /** + * Database was damaged when backed up, but the backup operation was + * requested to continue despite errors. + */ + @JsonProperty(value = "isDamaged", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDamaged; + + /** + * Whether the backup set is compressed. + */ + @JsonProperty(value = "isCompressed", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isCompressed; + + /** + * Number of files in the backup set. + */ + @JsonProperty(value = "familyCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer familyCount; + + /** + * Date and time when the backup operation finished. + */ + @JsonProperty(value = "backupFinishDate", access = JsonProperty.Access.WRITE_ONLY) + private DateTime backupFinishDate; + + /** + * Get database name. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Get backup Type. Possible values include: 'Database', 'TransactionLog', 'File', 'DifferentialDatabase', 'DifferentialFile', 'Partial', 'DifferentialPartial'. + * + * @return the backupType value + */ + public BackupType backupType() { + return this.backupType; + } + + /** + * Get the list of backup files for the current database. + * + * @return the backupFiles value + */ + public List backupFiles() { + return this.backupFiles; + } + + /** + * Get position of current database backup in the file. + * + * @return the position value + */ + public Integer position() { + return this.position; + } + + /** + * Get database was damaged when backed up, but the backup operation was requested to continue despite errors. + * + * @return the isDamaged value + */ + public Boolean isDamaged() { + return this.isDamaged; + } + + /** + * Get whether the backup set is compressed. + * + * @return the isCompressed value + */ + public Boolean isCompressed() { + return this.isCompressed; + } + + /** + * Get number of files in the backup set. + * + * @return the familyCount value + */ + public Integer familyCount() { + return this.familyCount; + } + + /** + * Get date and time when the backup operation finished. + * + * @return the backupFinishDate value + */ + public DateTime backupFinishDate() { + return this.backupFinishDate; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseCompatLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseCompatLevel.java new file mode 100644 index 000000000000..e8d86be18108 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseCompatLevel.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabaseCompatLevel. + */ +public final class DatabaseCompatLevel extends ExpandableStringEnum { + /** Static value CompatLevel80 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL80 = fromString("CompatLevel80"); + + /** Static value CompatLevel90 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL90 = fromString("CompatLevel90"); + + /** Static value CompatLevel100 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL100 = fromString("CompatLevel100"); + + /** Static value CompatLevel110 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL110 = fromString("CompatLevel110"); + + /** Static value CompatLevel120 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL120 = fromString("CompatLevel120"); + + /** Static value CompatLevel130 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL130 = fromString("CompatLevel130"); + + /** Static value CompatLevel140 for DatabaseCompatLevel. */ + public static final DatabaseCompatLevel COMPAT_LEVEL140 = fromString("CompatLevel140"); + + /** + * Creates or finds a DatabaseCompatLevel from its string representation. + * @param name a name to look for + * @return the corresponding DatabaseCompatLevel + */ + @JsonCreator + public static DatabaseCompatLevel fromString(String name) { + return fromString(name, DatabaseCompatLevel.class); + } + + /** + * @return known DatabaseCompatLevel values + */ + public static Collection values() { + return values(DatabaseCompatLevel.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileInfo.java new file mode 100644 index 000000000000..49f916be2121 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileInfo.java @@ -0,0 +1,200 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database file specific information. + */ +public class DatabaseFileInfo { + /** + * Name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * Unique identifier for database file. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Logical name of the file. + */ + @JsonProperty(value = "logicalName") + private String logicalName; + + /** + * Operating-system full path of the file. + */ + @JsonProperty(value = "physicalFullName") + private String physicalFullName; + + /** + * Suggested full path of the file for restoring. + */ + @JsonProperty(value = "restoreFullName") + private String restoreFullName; + + /** + * Database file type. Possible values include: 'Rows', 'Log', + * 'Filestream', 'NotSupported', 'Fulltext'. + */ + @JsonProperty(value = "fileType") + private DatabaseFileType fileType; + + /** + * Size of the file in megabytes. + */ + @JsonProperty(value = "sizeMB") + private Double sizeMB; + + /** + * Get name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set name of the database. + * + * @param databaseName the databaseName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get unique identifier for database file. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique identifier for database file. + * + * @param id the id value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withId(String id) { + this.id = id; + return this; + } + + /** + * Get logical name of the file. + * + * @return the logicalName value + */ + public String logicalName() { + return this.logicalName; + } + + /** + * Set logical name of the file. + * + * @param logicalName the logicalName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withLogicalName(String logicalName) { + this.logicalName = logicalName; + return this; + } + + /** + * Get operating-system full path of the file. + * + * @return the physicalFullName value + */ + public String physicalFullName() { + return this.physicalFullName; + } + + /** + * Set operating-system full path of the file. + * + * @param physicalFullName the physicalFullName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withPhysicalFullName(String physicalFullName) { + this.physicalFullName = physicalFullName; + return this; + } + + /** + * Get suggested full path of the file for restoring. + * + * @return the restoreFullName value + */ + public String restoreFullName() { + return this.restoreFullName; + } + + /** + * Set suggested full path of the file for restoring. + * + * @param restoreFullName the restoreFullName value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withRestoreFullName(String restoreFullName) { + this.restoreFullName = restoreFullName; + return this; + } + + /** + * Get database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @return the fileType value + */ + public DatabaseFileType fileType() { + return this.fileType; + } + + /** + * Set database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @param fileType the fileType value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withFileType(DatabaseFileType fileType) { + this.fileType = fileType; + return this; + } + + /** + * Get size of the file in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + + /** + * Set size of the file in megabytes. + * + * @param sizeMB the sizeMB value to set + * @return the DatabaseFileInfo object itself. + */ + public DatabaseFileInfo withSizeMB(Double sizeMB) { + this.sizeMB = sizeMB; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileInput.java new file mode 100644 index 000000000000..9a90b99a2308 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileInput.java @@ -0,0 +1,148 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database file specific information for input. + */ +public class DatabaseFileInput { + /** + * Unique identifier for database file. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Logical name of the file. + */ + @JsonProperty(value = "logicalName") + private String logicalName; + + /** + * Operating-system full path of the file. + */ + @JsonProperty(value = "physicalFullName") + private String physicalFullName; + + /** + * Suggested full path of the file for restoring. + */ + @JsonProperty(value = "restoreFullName") + private String restoreFullName; + + /** + * Database file type. Possible values include: 'Rows', 'Log', + * 'Filestream', 'NotSupported', 'Fulltext'. + */ + @JsonProperty(value = "fileType") + private DatabaseFileType fileType; + + /** + * Get unique identifier for database file. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique identifier for database file. + * + * @param id the id value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withId(String id) { + this.id = id; + return this; + } + + /** + * Get logical name of the file. + * + * @return the logicalName value + */ + public String logicalName() { + return this.logicalName; + } + + /** + * Set logical name of the file. + * + * @param logicalName the logicalName value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withLogicalName(String logicalName) { + this.logicalName = logicalName; + return this; + } + + /** + * Get operating-system full path of the file. + * + * @return the physicalFullName value + */ + public String physicalFullName() { + return this.physicalFullName; + } + + /** + * Set operating-system full path of the file. + * + * @param physicalFullName the physicalFullName value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withPhysicalFullName(String physicalFullName) { + this.physicalFullName = physicalFullName; + return this; + } + + /** + * Get suggested full path of the file for restoring. + * + * @return the restoreFullName value + */ + public String restoreFullName() { + return this.restoreFullName; + } + + /** + * Set suggested full path of the file for restoring. + * + * @param restoreFullName the restoreFullName value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withRestoreFullName(String restoreFullName) { + this.restoreFullName = restoreFullName; + return this; + } + + /** + * Get database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @return the fileType value + */ + public DatabaseFileType fileType() { + return this.fileType; + } + + /** + * Set database file type. Possible values include: 'Rows', 'Log', 'Filestream', 'NotSupported', 'Fulltext'. + * + * @param fileType the fileType value to set + * @return the DatabaseFileInput object itself. + */ + public DatabaseFileInput withFileType(DatabaseFileType fileType) { + this.fileType = fileType; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileType.java new file mode 100644 index 000000000000..be06c6cdefb3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseFileType.java @@ -0,0 +1,50 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabaseFileType. + */ +public final class DatabaseFileType extends ExpandableStringEnum { + /** Static value Rows for DatabaseFileType. */ + public static final DatabaseFileType ROWS = fromString("Rows"); + + /** Static value Log for DatabaseFileType. */ + public static final DatabaseFileType LOG = fromString("Log"); + + /** Static value Filestream for DatabaseFileType. */ + public static final DatabaseFileType FILESTREAM = fromString("Filestream"); + + /** Static value NotSupported for DatabaseFileType. */ + public static final DatabaseFileType NOT_SUPPORTED = fromString("NotSupported"); + + /** Static value Fulltext for DatabaseFileType. */ + public static final DatabaseFileType FULLTEXT = fromString("Fulltext"); + + /** + * Creates or finds a DatabaseFileType from its string representation. + * @param name a name to look for + * @return the corresponding DatabaseFileType + */ + @JsonCreator + public static DatabaseFileType fromString(String name) { + return fromString(name, DatabaseFileType.class); + } + + /** + * @return known DatabaseFileType values + */ + public static Collection values() { + return values(DatabaseFileType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseInfo.java new file mode 100644 index 000000000000..893a9183c8dd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseInfo.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Project Database Details. + */ +public class DatabaseInfo { + /** + * Name of the database. + */ + @JsonProperty(value = "sourceDatabaseName", required = true) + private String sourceDatabaseName; + + /** + * Get name of the database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Set name of the database. + * + * @param sourceDatabaseName the sourceDatabaseName value to set + * @return the DatabaseInfo object itself. + */ + public DatabaseInfo withSourceDatabaseName(String sourceDatabaseName) { + this.sourceDatabaseName = sourceDatabaseName; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseMigrationStage.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseMigrationStage.java new file mode 100644 index 000000000000..e3aca3150010 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseMigrationStage.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabaseMigrationStage. + */ +public final class DatabaseMigrationStage extends ExpandableStringEnum { + /** Static value None for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage NONE = fromString("None"); + + /** Static value Initialize for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage INITIALIZE = fromString("Initialize"); + + /** Static value Backup for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage BACKUP = fromString("Backup"); + + /** Static value FileCopy for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage FILE_COPY = fromString("FileCopy"); + + /** Static value Restore for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage RESTORE = fromString("Restore"); + + /** Static value Completed for DatabaseMigrationStage. */ + public static final DatabaseMigrationStage COMPLETED = fromString("Completed"); + + /** + * Creates or finds a DatabaseMigrationStage from its string representation. + * @param name a name to look for + * @return the corresponding DatabaseMigrationStage + */ + @JsonCreator + public static DatabaseMigrationStage fromString(String name) { + return fromString(name, DatabaseMigrationStage.class); + } + + /** + * @return known DatabaseMigrationStage values + */ + public static Collection values() { + return values(DatabaseMigrationStage.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseObjectName.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseObjectName.java new file mode 100644 index 000000000000..7b55b020b88a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseObjectName.java @@ -0,0 +1,89 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A representation of the name of an object in a database. + */ +public class DatabaseObjectName { + /** + * The unescaped name of the database containing the object. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * The unescaped name of the object. + */ + @JsonProperty(value = "objectName", access = JsonProperty.Access.WRITE_ONLY) + private String objectName; + + /** + * The unescaped name of the schema containing the object. + */ + @JsonProperty(value = "schemaName", access = JsonProperty.Access.WRITE_ONLY) + private String schemaName; + + /** + * Type of the object in the database. Possible values include: + * 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + */ + @JsonProperty(value = "objectType") + private ObjectType objectType; + + /** + * Get the unescaped name of the database containing the object. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Get the unescaped name of the object. + * + * @return the objectName value + */ + public String objectName() { + return this.objectName; + } + + /** + * Get the unescaped name of the schema containing the object. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Get type of the object in the database. Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @return the objectType value + */ + public ObjectType objectType() { + return this.objectType; + } + + /** + * Set type of the object in the database. Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @param objectType the objectType value to set + * @return the DatabaseObjectName object itself. + */ + public DatabaseObjectName withObjectType(ObjectType objectType) { + this.objectType = objectType; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseState.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseState.java new file mode 100644 index 000000000000..683dbf1c70da --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseState.java @@ -0,0 +1,62 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DatabaseState. + */ +public final class DatabaseState extends ExpandableStringEnum { + /** Static value Online for DatabaseState. */ + public static final DatabaseState ONLINE = fromString("Online"); + + /** Static value Restoring for DatabaseState. */ + public static final DatabaseState RESTORING = fromString("Restoring"); + + /** Static value Recovering for DatabaseState. */ + public static final DatabaseState RECOVERING = fromString("Recovering"); + + /** Static value RecoveryPending for DatabaseState. */ + public static final DatabaseState RECOVERY_PENDING = fromString("RecoveryPending"); + + /** Static value Suspect for DatabaseState. */ + public static final DatabaseState SUSPECT = fromString("Suspect"); + + /** Static value Emergency for DatabaseState. */ + public static final DatabaseState EMERGENCY = fromString("Emergency"); + + /** Static value Offline for DatabaseState. */ + public static final DatabaseState OFFLINE = fromString("Offline"); + + /** Static value Copying for DatabaseState. */ + public static final DatabaseState COPYING = fromString("Copying"); + + /** Static value OfflineSecondary for DatabaseState. */ + public static final DatabaseState OFFLINE_SECONDARY = fromString("OfflineSecondary"); + + /** + * Creates or finds a DatabaseState from its string representation. + * @param name a name to look for + * @return the corresponding DatabaseState + */ + @JsonCreator + public static DatabaseState fromString(String name) { + return fromString(name, DatabaseState.class); + } + + /** + * @return known DatabaseState values + */ + public static Collection values() { + return values(DatabaseState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseSummaryResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseSummaryResult.java new file mode 100644 index 000000000000..18928a765ecc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseSummaryResult.java @@ -0,0 +1,32 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Summary of database results in the migration. + */ +public class DatabaseSummaryResult extends DataItemMigrationSummaryResult { + /** + * Size of the database in megabytes. + */ + @JsonProperty(value = "sizeMB", access = JsonProperty.Access.WRITE_ONLY) + private Double sizeMB; + + /** + * Get size of the database in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseTable.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseTable.java new file mode 100644 index 000000000000..1ab9698d3d8f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/DatabaseTable.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Table properties. + */ +public class DatabaseTable { + /** + * Indicates whether table is empty or not. + */ + @JsonProperty(value = "hasRows", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasRows; + + /** + * Schema-qualified name of the table. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Get indicates whether table is empty or not. + * + * @return the hasRows value + */ + public Boolean hasRows() { + return this.hasRows; + } + + /** + * Get schema-qualified name of the table. + * + * @return the name value + */ + public String name() { + return this.name; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ErrorType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ErrorType.java new file mode 100644 index 000000000000..94c5c50c670f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ErrorType.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ErrorType. + */ +public final class ErrorType extends ExpandableStringEnum { + /** Static value Default for ErrorType. */ + public static final ErrorType DEFAULT = fromString("Default"); + + /** Static value Warning for ErrorType. */ + public static final ErrorType WARNING = fromString("Warning"); + + /** Static value Error for ErrorType. */ + public static final ErrorType ERROR = fromString("Error"); + + /** + * Creates or finds a ErrorType from its string representation. + * @param name a name to look for + * @return the corresponding ErrorType + */ + @JsonCreator + public static ErrorType fromString(String name) { + return fromString(name, ErrorType.class); + } + + /** + * @return known ErrorType values + */ + public static Collection values() { + return values(ErrorType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ExecutionStatistics.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ExecutionStatistics.java new file mode 100644 index 000000000000..f1bec0a4a673 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ExecutionStatistics.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description about the errors happen while performing migration validation. + */ +public class ExecutionStatistics { + /** + * No. of query executions. + */ + @JsonProperty(value = "executionCount") + private Long executionCount; + + /** + * CPU Time in millisecond(s) for the query execution. + */ + @JsonProperty(value = "cpuTimeMs") + private Double cpuTimeMs; + + /** + * Time taken in millisecond(s) for executing the query. + */ + @JsonProperty(value = "elapsedTimeMs") + private Double elapsedTimeMs; + + /** + * Dictionary of sql query execution wait types and the respective + * statistics. + */ + @JsonProperty(value = "waitStats") + private Map waitStats; + + /** + * Indicates whether the query resulted in an error. + */ + @JsonProperty(value = "hasErrors") + private Boolean hasErrors; + + /** + * List of sql Errors. + */ + @JsonProperty(value = "sqlErrors") + private List sqlErrors; + + /** + * Get no. of query executions. + * + * @return the executionCount value + */ + public Long executionCount() { + return this.executionCount; + } + + /** + * Set no. of query executions. + * + * @param executionCount the executionCount value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withExecutionCount(Long executionCount) { + this.executionCount = executionCount; + return this; + } + + /** + * Get cPU Time in millisecond(s) for the query execution. + * + * @return the cpuTimeMs value + */ + public Double cpuTimeMs() { + return this.cpuTimeMs; + } + + /** + * Set cPU Time in millisecond(s) for the query execution. + * + * @param cpuTimeMs the cpuTimeMs value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withCpuTimeMs(Double cpuTimeMs) { + this.cpuTimeMs = cpuTimeMs; + return this; + } + + /** + * Get time taken in millisecond(s) for executing the query. + * + * @return the elapsedTimeMs value + */ + public Double elapsedTimeMs() { + return this.elapsedTimeMs; + } + + /** + * Set time taken in millisecond(s) for executing the query. + * + * @param elapsedTimeMs the elapsedTimeMs value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withElapsedTimeMs(Double elapsedTimeMs) { + this.elapsedTimeMs = elapsedTimeMs; + return this; + } + + /** + * Get dictionary of sql query execution wait types and the respective statistics. + * + * @return the waitStats value + */ + public Map waitStats() { + return this.waitStats; + } + + /** + * Set dictionary of sql query execution wait types and the respective statistics. + * + * @param waitStats the waitStats value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withWaitStats(Map waitStats) { + this.waitStats = waitStats; + return this; + } + + /** + * Get indicates whether the query resulted in an error. + * + * @return the hasErrors value + */ + public Boolean hasErrors() { + return this.hasErrors; + } + + /** + * Set indicates whether the query resulted in an error. + * + * @param hasErrors the hasErrors value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withHasErrors(Boolean hasErrors) { + this.hasErrors = hasErrors; + return this; + } + + /** + * Get list of sql Errors. + * + * @return the sqlErrors value + */ + public List sqlErrors() { + return this.sqlErrors; + } + + /** + * Set list of sql Errors. + * + * @param sqlErrors the sqlErrors value to set + * @return the ExecutionStatistics object itself. + */ + public ExecutionStatistics withSqlErrors(List sqlErrors) { + this.sqlErrors = sqlErrors; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/FileShare.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/FileShare.java new file mode 100644 index 000000000000..72920a6a1476 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/FileShare.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * File share information with Path, Username, and Password. + */ +public class FileShare { + /** + * User name credential to connect to the share location. + */ + @JsonProperty(value = "userName") + private String userName; + + /** + * Password credential used to connect to the share location. + */ + @JsonProperty(value = "password") + private String password; + + /** + * The folder path for this share. + */ + @JsonProperty(value = "path", required = true) + private String path; + + /** + * Get user name credential to connect to the share location. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Set user name credential to connect to the share location. + * + * @param userName the userName value to set + * @return the FileShare object itself. + */ + public FileShare withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get password credential used to connect to the share location. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set password credential used to connect to the share location. + * + * @param password the password value to set + * @return the FileShare object itself. + */ + public FileShare withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the folder path for this share. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set the folder path for this share. + * + * @param path the path value to set + * @return the FileShare object itself. + */ + public FileShare withPath(String path) { + this.path = path; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/FileStorageInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/FileStorageInfo.java new file mode 100644 index 000000000000..2e72ebe60df2 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/FileStorageInfo.java @@ -0,0 +1,31 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.FileStorageInfoInner; +import java.util.Map; + +/** + * Type representing FileStorageInfo. + */ +public interface FileStorageInfo extends HasInner, HasManager { + /** + * @return the headers value. + */ + Map headers(); + + /** + * @return the uri value. + */ + String uri(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Files.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Files.java new file mode 100644 index 000000000000..662d04a2b851 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Files.java @@ -0,0 +1,85 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.FilesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Files. + */ +public interface Files extends SupportsCreating, HasInner { + /** + * Request storage information for downloading the file content. + * This method is used for requesting storage information using which contents of the file can be downloaded. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable readAsync(String groupName, String serviceName, String projectName, String fileName); + + /** + * Request information for reading and writing file content. + * This method is used for requesting information for reading and writing the file content. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable readWriteAsync(String groupName, String serviceName, String projectName, String fileName); + + /** + * Get file information. + * The files resource is a nested, proxy-only resource representing a file stored under the project resource. This method retrieves information about a file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String groupName, String serviceName, String projectName, String fileName); + + /** + * Get files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String groupName, final String serviceName, final String projectName); + + /** + * Delete file. + * This method deletes a file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String groupName, String serviceName, String projectName, String fileName); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetProjectDetailsNonSqlTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetProjectDetailsNonSqlTaskInput.java new file mode 100644 index 000000000000..2c3b04bbd0a1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetProjectDetailsNonSqlTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that reads configuration from project artifacts. + */ +public class GetProjectDetailsNonSqlTaskInput { + /** + * Name of the migration project. + */ + @JsonProperty(value = "projectName", required = true) + private String projectName; + + /** + * A URL that points to the location to access project artifacts. + */ + @JsonProperty(value = "projectLocation", required = true) + private String projectLocation; + + /** + * Get name of the migration project. + * + * @return the projectName value + */ + public String projectName() { + return this.projectName; + } + + /** + * Set name of the migration project. + * + * @param projectName the projectName value to set + * @return the GetProjectDetailsNonSqlTaskInput object itself. + */ + public GetProjectDetailsNonSqlTaskInput withProjectName(String projectName) { + this.projectName = projectName; + return this; + } + + /** + * Get a URL that points to the location to access project artifacts. + * + * @return the projectLocation value + */ + public String projectLocation() { + return this.projectLocation; + } + + /** + * Set a URL that points to the location to access project artifacts. + * + * @param projectLocation the projectLocation value to set + * @return the GetProjectDetailsNonSqlTaskInput object itself. + */ + public GetProjectDetailsNonSqlTaskInput withProjectLocation(String projectLocation) { + this.projectLocation = projectLocation; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskInput.java new file mode 100644 index 000000000000..aea76f489e7d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that gets TDE certificates in Base64 encoded format. + */ +public class GetTdeCertificatesSqlTaskInput { + /** + * Connection information for SQL Server. + */ + @JsonProperty(value = "connectionInfo", required = true) + private SqlConnectionInfo connectionInfo; + + /** + * Backup file share information for file share to be used for temporarily + * storing files. + */ + @JsonProperty(value = "backupFileShare", required = true) + private FileShare backupFileShare; + + /** + * List containing certificate names and corresponding password to use for + * encrypting the exported certificate. + */ + @JsonProperty(value = "selectedCertificates", required = true) + private List selectedCertificates; + + /** + * Get connection information for SQL Server. + * + * @return the connectionInfo value + */ + public SqlConnectionInfo connectionInfo() { + return this.connectionInfo; + } + + /** + * Set connection information for SQL Server. + * + * @param connectionInfo the connectionInfo value to set + * @return the GetTdeCertificatesSqlTaskInput object itself. + */ + public GetTdeCertificatesSqlTaskInput withConnectionInfo(SqlConnectionInfo connectionInfo) { + this.connectionInfo = connectionInfo; + return this; + } + + /** + * Get backup file share information for file share to be used for temporarily storing files. + * + * @return the backupFileShare value + */ + public FileShare backupFileShare() { + return this.backupFileShare; + } + + /** + * Set backup file share information for file share to be used for temporarily storing files. + * + * @param backupFileShare the backupFileShare value to set + * @return the GetTdeCertificatesSqlTaskInput object itself. + */ + public GetTdeCertificatesSqlTaskInput withBackupFileShare(FileShare backupFileShare) { + this.backupFileShare = backupFileShare; + return this; + } + + /** + * Get list containing certificate names and corresponding password to use for encrypting the exported certificate. + * + * @return the selectedCertificates value + */ + public List selectedCertificates() { + return this.selectedCertificates; + } + + /** + * Set list containing certificate names and corresponding password to use for encrypting the exported certificate. + * + * @param selectedCertificates the selectedCertificates value to set + * @return the GetTdeCertificatesSqlTaskInput object itself. + */ + public GetTdeCertificatesSqlTaskInput withSelectedCertificates(List selectedCertificates) { + this.selectedCertificates = selectedCertificates; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskOutput.java new file mode 100644 index 000000000000..3fc8e4daaca1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskOutput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output of the task that gets TDE certificates in Base64 encoded format. + */ +public class GetTdeCertificatesSqlTaskOutput { + /** + * Mapping from certificate name to base 64 encoded format. + */ + @JsonProperty(value = "base64EncodedCertificates", access = JsonProperty.Access.WRITE_ONLY) + private Map> base64EncodedCertificates; + + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get mapping from certificate name to base 64 encoded format. + * + * @return the base64EncodedCertificates value + */ + public Map> base64EncodedCertificates() { + return this.base64EncodedCertificates; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.java new file mode 100644 index 000000000000..140ba4898710 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetTdeCertificatesSqlTaskProperties.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.azuredatabasemigrationservice.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 gets TDE certificates in Base64 encoded format. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("GetTDECertificates.Sql") +public class GetTdeCertificatesSqlTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private GetTdeCertificatesSqlTaskInput 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 GetTdeCertificatesSqlTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the GetTdeCertificatesSqlTaskProperties object itself. + */ + public GetTdeCertificatesSqlTaskProperties withInput(GetTdeCertificatesSqlTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskInput.java new file mode 100644 index 000000000000..4647b230cba0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskInput.java @@ -0,0 +1,123 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that collects user tables for the given list of + * databases. + */ +public class GetUserTablesSqlSyncTaskInput { + /** + * Connection information for SQL Server. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Connection information for SQL DB. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * List of source database names to collect tables for. + */ + @JsonProperty(value = "selectedSourceDatabases", required = true) + private List selectedSourceDatabases; + + /** + * List of target database names to collect tables for. + */ + @JsonProperty(value = "selectedTargetDatabases", required = true) + private List selectedTargetDatabases; + + /** + * Get connection information for SQL Server. + * + * @return the sourceConnectionInfo value + */ + public SqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set connection information for SQL Server. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the GetUserTablesSqlSyncTaskInput object itself. + */ + public GetUserTablesSqlSyncTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get connection information for SQL DB. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for SQL DB. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the GetUserTablesSqlSyncTaskInput object itself. + */ + public GetUserTablesSqlSyncTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * Get list of source database names to collect tables for. + * + * @return the selectedSourceDatabases value + */ + public List selectedSourceDatabases() { + return this.selectedSourceDatabases; + } + + /** + * Set list of source database names to collect tables for. + * + * @param selectedSourceDatabases the selectedSourceDatabases value to set + * @return the GetUserTablesSqlSyncTaskInput object itself. + */ + public GetUserTablesSqlSyncTaskInput withSelectedSourceDatabases(List selectedSourceDatabases) { + this.selectedSourceDatabases = selectedSourceDatabases; + return this; + } + + /** + * Get list of target database names to collect tables for. + * + * @return the selectedTargetDatabases value + */ + public List selectedTargetDatabases() { + return this.selectedTargetDatabases; + } + + /** + * Set list of target database names to collect tables for. + * + * @param selectedTargetDatabases the selectedTargetDatabases value to set + * @return the GetUserTablesSqlSyncTaskInput object itself. + */ + public GetUserTablesSqlSyncTaskInput withSelectedTargetDatabases(List selectedTargetDatabases) { + this.selectedTargetDatabases = selectedTargetDatabases; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskOutput.java new file mode 100644 index 000000000000..52001868f6ef --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskOutput.java @@ -0,0 +1,80 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output of the task that collects user tables for the given list of + * databases. + */ +public class GetUserTablesSqlSyncTaskOutput { + /** + * Mapping from database name to list of source tables. + */ + @JsonProperty(value = "databasesToSourceTables", access = JsonProperty.Access.WRITE_ONLY) + private Map> databasesToSourceTables; + + /** + * Mapping from database name to list of target tables. + */ + @JsonProperty(value = "databasesToTargetTables", access = JsonProperty.Access.WRITE_ONLY) + private Map> databasesToTargetTables; + + /** + * Mapping from database name to list of validation errors. + */ + @JsonProperty(value = "tableValidationErrors", access = JsonProperty.Access.WRITE_ONLY) + private Map> tableValidationErrors; + + /** + * Validation errors. + */ + @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) + private List validationErrors; + + /** + * Get mapping from database name to list of source tables. + * + * @return the databasesToSourceTables value + */ + public Map> databasesToSourceTables() { + return this.databasesToSourceTables; + } + + /** + * Get mapping from database name to list of target tables. + * + * @return the databasesToTargetTables value + */ + public Map> databasesToTargetTables() { + return this.databasesToTargetTables; + } + + /** + * Get mapping from database name to list of validation errors. + * + * @return the tableValidationErrors value + */ + public Map> tableValidationErrors() { + return this.tableValidationErrors; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.java new file mode 100644 index 000000000000..e389c83671e3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlSyncTaskProperties.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.azuredatabasemigrationservice.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") +@JsonTypeName("GetUserTables.AzureSqlDb.Sync") +public class GetUserTablesSqlSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private GetUserTablesSqlSyncTaskInput 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 GetUserTablesSqlSyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the GetUserTablesSqlSyncTaskProperties object itself. + */ + public GetUserTablesSqlSyncTaskProperties withInput(GetUserTablesSqlSyncTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskInput.java new file mode 100644 index 000000000000..1a281f54bd3f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that collects user tables for the given list of + * databases. + */ +public class GetUserTablesSqlTaskInput { + /** + * Connection information for SQL Server. + */ + @JsonProperty(value = "connectionInfo", required = true) + private SqlConnectionInfo connectionInfo; + + /** + * List of database names to collect tables for. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Get connection information for SQL Server. + * + * @return the connectionInfo value + */ + public SqlConnectionInfo connectionInfo() { + return this.connectionInfo; + } + + /** + * Set connection information for SQL Server. + * + * @param connectionInfo the connectionInfo value to set + * @return the GetUserTablesSqlTaskInput object itself. + */ + public GetUserTablesSqlTaskInput withConnectionInfo(SqlConnectionInfo connectionInfo) { + this.connectionInfo = connectionInfo; + return this; + } + + /** + * Get list of database names to collect tables for. + * + * @return the selectedDatabases value + */ + public List selectedDatabases() { + return this.selectedDatabases; + } + + /** + * Set list of database names to collect tables for. + * + * @param selectedDatabases the selectedDatabases value to set + * @return the GetUserTablesSqlTaskInput object itself. + */ + public GetUserTablesSqlTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskOutput.java new file mode 100644 index 000000000000..b1b16d724e21 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskOutput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output of the task that collects user tables for the given list of + * databases. + */ +public class GetUserTablesSqlTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Mapping from database name to list of tables. + */ + @JsonProperty(value = "databasesToTables", access = JsonProperty.Access.WRITE_ONLY) + private Map> databasesToTables; + + /** + * Validation errors. + */ + @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 mapping from database name to list of tables. + * + * @return the databasesToTables value + */ + public Map> databasesToTables() { + return this.databasesToTables; + } + + /** + * Get validation errors. + * + * @return the validationErrors value + */ + public List validationErrors() { + return this.validationErrors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskProperties.java new file mode 100644 index 000000000000..2bbf380bfd00 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/GetUserTablesSqlTaskProperties.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.azuredatabasemigrationservice.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") +@JsonTypeName("GetUserTables.Sql") +public class GetUserTablesSqlTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private GetUserTablesSqlTaskInput 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 GetUserTablesSqlTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the GetUserTablesSqlTaskProperties object itself. + */ + public GetUserTablesSqlTaskProperties withInput(GetUserTablesSqlTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/LoginMigrationStage.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/LoginMigrationStage.java new file mode 100644 index 000000000000..d881ff33e14d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/LoginMigrationStage.java @@ -0,0 +1,62 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LoginMigrationStage. + */ +public final class LoginMigrationStage extends ExpandableStringEnum { + /** Static value None for LoginMigrationStage. */ + public static final LoginMigrationStage NONE = fromString("None"); + + /** Static value Initialize for LoginMigrationStage. */ + public static final LoginMigrationStage INITIALIZE = fromString("Initialize"); + + /** Static value LoginMigration for LoginMigrationStage. */ + public static final LoginMigrationStage LOGIN_MIGRATION = fromString("LoginMigration"); + + /** Static value EstablishUserMapping for LoginMigrationStage. */ + public static final LoginMigrationStage ESTABLISH_USER_MAPPING = fromString("EstablishUserMapping"); + + /** Static value AssignRoleMembership for LoginMigrationStage. */ + public static final LoginMigrationStage ASSIGN_ROLE_MEMBERSHIP = fromString("AssignRoleMembership"); + + /** Static value AssignRoleOwnership for LoginMigrationStage. */ + public static final LoginMigrationStage ASSIGN_ROLE_OWNERSHIP = fromString("AssignRoleOwnership"); + + /** Static value EstablishServerPermissions for LoginMigrationStage. */ + public static final LoginMigrationStage ESTABLISH_SERVER_PERMISSIONS = fromString("EstablishServerPermissions"); + + /** Static value EstablishObjectPermissions for LoginMigrationStage. */ + public static final LoginMigrationStage ESTABLISH_OBJECT_PERMISSIONS = fromString("EstablishObjectPermissions"); + + /** Static value Completed for LoginMigrationStage. */ + public static final LoginMigrationStage COMPLETED = fromString("Completed"); + + /** + * Creates or finds a LoginMigrationStage from its string representation. + * @param name a name to look for + * @return the corresponding LoginMigrationStage + */ + @JsonCreator + public static LoginMigrationStage fromString(String name) { + return fromString(name, LoginMigrationStage.class); + } + + /** + * @return known LoginMigrationStage values + */ + public static Collection values() { + return values(LoginMigrationStage.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/LoginType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/LoginType.java new file mode 100644 index 000000000000..9ca3334b774f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/LoginType.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for LoginType. + */ +public final class LoginType extends ExpandableStringEnum { + /** Static value WindowsUser for LoginType. */ + public static final LoginType WINDOWS_USER = fromString("WindowsUser"); + + /** Static value WindowsGroup for LoginType. */ + public static final LoginType WINDOWS_GROUP = fromString("WindowsGroup"); + + /** Static value SqlLogin for LoginType. */ + public static final LoginType SQL_LOGIN = fromString("SqlLogin"); + + /** Static value Certificate for LoginType. */ + public static final LoginType CERTIFICATE = fromString("Certificate"); + + /** Static value AsymmetricKey for LoginType. */ + public static final LoginType ASYMMETRIC_KEY = fromString("AsymmetricKey"); + + /** Static value ExternalUser for LoginType. */ + public static final LoginType EXTERNAL_USER = fromString("ExternalUser"); + + /** Static value ExternalGroup for LoginType. */ + public static final LoginType EXTERNAL_GROUP = fromString("ExternalGroup"); + + /** + * Creates or finds a LoginType from its string representation. + * @param name a name to look for + * @return the corresponding LoginType + */ + @JsonCreator + public static LoginType fromString(String name) { + return fromString(name, LoginType.class); + } + + /** + * @return known LoginType values + */ + public static Collection values() { + return values(LoginType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMongoDbTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMongoDbTaskProperties.java new file mode 100644 index 000000000000..0a0519e3b4c9 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMongoDbTaskProperties.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.azuredatabasemigrationservice.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 data between MongoDB data sources. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Migrate.MongoDb") +public class MigrateMongoDbTaskProperties extends ProjectTaskProperties { + /** + * The input property. + */ + @JsonProperty(value = "input") + private MongoDbMigrationSettings input; + + /** + * The output property. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get the input value. + * + * @return the input value + */ + public MongoDbMigrationSettings input() { + return this.input; + } + + /** + * Set the input value. + * + * @param input the input value to set + * @return the MigrateMongoDbTaskProperties object itself. + */ + public MigrateMongoDbTaskProperties withInput(MongoDbMigrationSettings input) { + this.input = input; + return this; + } + + /** + * Get the output value. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java new file mode 100644 index 000000000000..73f3cea6f3e4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for MySQL to Azure Database for MySQL + * migration task inputs. + */ +public class MigrateMySqlAzureDbForMySqlSyncDatabaseInput { + /** + * Name of the database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Name of target database. Note: Target database will be truncated before + * starting migration. + */ + @JsonProperty(value = "targetDatabaseName") + private String targetDatabaseName; + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the MigrateMySqlAzureDbForMySqlSyncDatabaseInput object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncDatabaseInput withName(String name) { + this.name = name; + 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 MigrateMySqlAzureDbForMySqlSyncDatabaseInput object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncDatabaseInput withTargetDatabaseName(String targetDatabaseName) { + this.targetDatabaseName = targetDatabaseName; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskInput.java new file mode 100644 index 000000000000..55f00cbbc34c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that migrates MySQL databases to Azure Database for MySQL + * for online migrations. + */ +public class MigrateMySqlAzureDbForMySqlSyncTaskInput { + /** + * Connection information for source MySQL. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private MySqlConnectionInfo sourceConnectionInfo; + + /** + * Connection information for target Azure Database for MySQL. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private MySqlConnectionInfo targetConnectionInfo; + + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Get connection information for source MySQL. + * + * @return the sourceConnectionInfo value + */ + public MySqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set connection information for source MySQL. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the MigrateMySqlAzureDbForMySqlSyncTaskInput object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncTaskInput withSourceConnectionInfo(MySqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get connection information for target Azure Database for MySQL. + * + * @return the targetConnectionInfo value + */ + public MySqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set connection information for target Azure Database for MySQL. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the MigrateMySqlAzureDbForMySqlSyncTaskInput object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncTaskInput withTargetConnectionInfo(MySqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * 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 MigrateMySqlAzureDbForMySqlSyncTaskInput object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java new file mode 100644 index 000000000000..8a4db9b7041e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutput.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.azuredatabasemigrationservice.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 MySQL databases to Azure Database for + * MySQL for online migrations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrateMySqlAzureDbForMySqlSyncTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.class), + @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateMySqlAzureDbForMySqlSyncTaskOutputError.class), + @JsonSubTypes.Type(name = "TableLevelOutput", value = MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.class) +}) +public class MigrateMySqlAzureDbForMySqlSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java new file mode 100644 index 000000000000..d0d4158c4b8a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.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.azuredatabasemigrationservice.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 MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelErrorOutput") +public class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { + /** + * 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 MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError 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 MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError withEvents(List events) { + this.events = events; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..8d88e11e6717 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.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.azuredatabasemigrationservice.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 MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelOutput") +public class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java new file mode 100644 index 000000000000..5bc79201d12e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateMySqlAzureDbForMySqlSyncTaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ErrorOutput") +public class MigrateMySqlAzureDbForMySqlSyncTaskOutputError extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java new file mode 100644 index 000000000000..eff4d15007b3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.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.azuredatabasemigrationservice.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 MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrationLevelOutput") +public class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java new file mode 100644 index 000000000000..a309f67492c7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.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.azuredatabasemigrationservice.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 MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("TableLevelOutput") +public class MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { + /** + * 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 String cdcInsertCounter; + + /** + * Number of applied updates. + */ + @JsonProperty(value = "cdcUpdateCounter", access = JsonProperty.Access.WRITE_ONLY) + private String cdcUpdateCounter; + + /** + * Number of applied deletes. + */ + @JsonProperty(value = "cdcDeleteCounter", access = JsonProperty.Access.WRITE_ONLY) + private String 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 String cdcInsertCounter() { + return this.cdcInsertCounter; + } + + /** + * Get number of applied updates. + * + * @return the cdcUpdateCounter value + */ + public String cdcUpdateCounter() { + return this.cdcUpdateCounter; + } + + /** + * Get number of applied deletes. + * + * @return the cdcDeleteCounter value + */ + public String 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java new file mode 100644 index 000000000000..dde9f5edcb2a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateMySqlAzureDbForMySqlSyncTaskProperties.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.azuredatabasemigrationservice.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 MySQL databases to Azure Database for + * MySQL for online migrations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Migrate.MySql.AzureDbForMySql.Sync") +public class MigrateMySqlAzureDbForMySqlSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateMySqlAzureDbForMySqlSyncTaskInput 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 MigrateMySqlAzureDbForMySqlSyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateMySqlAzureDbForMySqlSyncTaskProperties object itself. + */ + public MigrateMySqlAzureDbForMySqlSyncTaskProperties withInput(MigrateMySqlAzureDbForMySqlSyncTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java new file mode 100644 index 000000000000..29bebeb4b44b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for PostgreSQL to Azure Database for + * PostgreSQL migration task inputs. + */ +public class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput { + /** + * Name of the database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Name of target database. Note: Target database will be truncated before + * starting migration. + */ + @JsonProperty(value = "targetDatabaseName") + private String targetDatabaseName; + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput withName(String name) { + this.name = name; + 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 MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput withTargetDatabaseName(String targetDatabaseName) { + this.targetDatabaseName = targetDatabaseName; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput.java new file mode 100644 index 000000000000..bc45ac91907e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that migrates PostgreSQL databases to Azure Database for + * PostgreSQL for online migrations. + */ +public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput { + /** + * 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 PostgreSQL. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private PostgreSqlConnectionInfo 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 MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput 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 MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput withTargetConnectionInfo(PostgreSqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * Get connection information for source PostgreSQL. + * + * @return the sourceConnectionInfo value + */ + public PostgreSqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set connection information for source PostgreSQL. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput withSourceConnectionInfo(PostgreSqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java new file mode 100644 index 000000000000..2e3e643f22dd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.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.azuredatabasemigrationservice.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 PostgreSQL databases to Azure Database for + * PostgreSQL for online migrations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.class), + @JsonSubTypes.Type(name = "ErrorOutput", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.class), + @JsonSubTypes.Type(name = "TableLevelOutput", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.class) +}) +public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java new file mode 100644 index 000000000000..e5bce07226b9 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.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.azuredatabasemigrationservice.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 MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelErrorOutput") +public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { + /** + * 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 MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError 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 MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError withEvents(List events) { + this.events = events; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..5d9b582e5a96 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.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.azuredatabasemigrationservice.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 MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelOutput") +public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java new file mode 100644 index 000000000000..0d15539681ed --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ErrorOutput") +public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java new file mode 100644 index 000000000000..ef898f12ce0a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.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.azuredatabasemigrationservice.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 MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrationLevelOutput") +public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java new file mode 100644 index 000000000000..e07c5b3443c2 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.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.azuredatabasemigrationservice.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 MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("TableLevelOutput") +public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java new file mode 100644 index 000000000000..b2b5cd877451 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.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.azuredatabasemigrationservice.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 PostgreSQL databases to Azure Database + * for PostgreSQL for online migrations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Migrate.PostgreSql.AzureDbForPostgreSql.Sync") +public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput 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 MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties object itself. + */ + public MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties withInput(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbDatabaseInput.java new file mode 100644 index 000000000000..89f0a44fe1c8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbDatabaseInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database input for migrate schema Sql Server to Azure SQL Server scenario. + */ +public class MigrateSchemaSqlServerSqlDbDatabaseInput { + /** + * Name of source database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Name of target database. + */ + @JsonProperty(value = "targetDatabaseName") + private String targetDatabaseName; + + /** + * Database schema migration settings. + */ + @JsonProperty(value = "schemaSetting") + private SchemaMigrationSetting schemaSetting; + + /** + * Get name of source database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of source database. + * + * @param name the name value to set + * @return the MigrateSchemaSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSchemaSqlServerSqlDbDatabaseInput withName(String name) { + this.name = name; + return this; + } + + /** + * Get name of target database. + * + * @return the targetDatabaseName value + */ + public String targetDatabaseName() { + return this.targetDatabaseName; + } + + /** + * Set name of target database. + * + * @param targetDatabaseName the targetDatabaseName value to set + * @return the MigrateSchemaSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSchemaSqlServerSqlDbDatabaseInput withTargetDatabaseName(String targetDatabaseName) { + this.targetDatabaseName = targetDatabaseName; + return this; + } + + /** + * Get database schema migration settings. + * + * @return the schemaSetting value + */ + public SchemaMigrationSetting schemaSetting() { + return this.schemaSetting; + } + + /** + * Set database schema migration settings. + * + * @param schemaSetting the schemaSetting value to set + * @return the MigrateSchemaSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSchemaSqlServerSqlDbDatabaseInput withSchemaSetting(SchemaMigrationSetting schemaSetting) { + this.schemaSetting = schemaSetting; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskInput.java new file mode 100644 index 000000000000..c67d29735f90 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for task that migrates Schema for SQL Server databases to Azure SQL + * databases. + */ +public class MigrateSchemaSqlServerSqlDbTaskInput extends SqlMigrationTaskInput { + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * 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 MigrateSchemaSqlServerSqlDbTaskInput object itself. + */ + public MigrateSchemaSqlServerSqlDbTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.java new file mode 100644 index 000000000000..2fc5b668d0b6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutput.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.azuredatabasemigrationservice.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 Schema for SQL Server databases to Azure + * SQL databases. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrateSchemaSqlServerSqlDbTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "SchemaErrorOutput", value = MigrateSchemaSqlServerSqlDbTaskOutputError.class), + @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSchemaSqlTaskOutputError.class) +}) +public class MigrateSchemaSqlServerSqlDbTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..4785470141fc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel.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.azuredatabasemigrationservice.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 MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelOutput") +public class MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel extends MigrateSchemaSqlServerSqlDbTaskOutput { + /** + * The name of the database. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * State of the schema migration for this database. Possible values + * include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + * 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Schema migration stage for this database. Possible values include: + * 'NotStarted', 'ValidatingInputs', 'CollectingObjects', + * 'DownloadingScript', 'GeneratingScript', 'UploadingScript', + * 'DeployingSchema', 'Completed', 'CompletedWithWarnings', 'Failed'. + */ + @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) + private SchemaMigrationStage 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; + + /** + * Prefix string to use for querying errors for this database. + */ + @JsonProperty(value = "databaseErrorResultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String databaseErrorResultPrefix; + + /** + * Prefix string to use for querying schema errors for this database. + */ + @JsonProperty(value = "schemaErrorResultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String schemaErrorResultPrefix; + + /** + * Number of successful operations for this database. + */ + @JsonProperty(value = "numberOfSuccessfulOperations", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfSuccessfulOperations; + + /** + * Number of failed operations for this database. + */ + @JsonProperty(value = "numberOfFailedOperations", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfFailedOperations; + + /** + * Identifier for the file resource containing the schema of this database. + */ + @JsonProperty(value = "fileId", access = JsonProperty.Access.WRITE_ONLY) + private String fileId; + + /** + * Get the name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Get state of the schema migration for this database. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get schema migration stage for this database. Possible values include: 'NotStarted', 'ValidatingInputs', 'CollectingObjects', 'DownloadingScript', 'GeneratingScript', 'UploadingScript', 'DeployingSchema', 'Completed', 'CompletedWithWarnings', 'Failed'. + * + * @return the stage value + */ + public SchemaMigrationStage 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 prefix string to use for querying errors for this database. + * + * @return the databaseErrorResultPrefix value + */ + public String databaseErrorResultPrefix() { + return this.databaseErrorResultPrefix; + } + + /** + * Get prefix string to use for querying schema errors for this database. + * + * @return the schemaErrorResultPrefix value + */ + public String schemaErrorResultPrefix() { + return this.schemaErrorResultPrefix; + } + + /** + * Get number of successful operations for this database. + * + * @return the numberOfSuccessfulOperations value + */ + public Long numberOfSuccessfulOperations() { + return this.numberOfSuccessfulOperations; + } + + /** + * Get number of failed operations for this database. + * + * @return the numberOfFailedOperations value + */ + public Long numberOfFailedOperations() { + return this.numberOfFailedOperations; + } + + /** + * Get identifier for the file resource containing the schema of this database. + * + * @return the fileId value + */ + public String fileId() { + return this.fileId; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java new file mode 100644 index 000000000000..e1d1a724d01e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputError.java @@ -0,0 +1,51 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSchemaSqlServerSqlDbTaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("SchemaErrorOutput") +public class MigrateSchemaSqlServerSqlDbTaskOutputError extends MigrateSchemaSqlServerSqlDbTaskOutput { + /** + * Schema command which failed. + */ + @JsonProperty(value = "commandText", access = JsonProperty.Access.WRITE_ONLY) + private String commandText; + + /** + * Reason of failure. + */ + @JsonProperty(value = "errorText", access = JsonProperty.Access.WRITE_ONLY) + private String errorText; + + /** + * Get schema command which failed. + * + * @return the commandText value + */ + public String commandText() { + return this.commandText; + } + + /** + * Get reason of failure. + * + * @return the errorText value + */ + public String errorText() { + return this.errorText; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java new file mode 100644 index 000000000000..0a10199f95f3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel.java @@ -0,0 +1,128 @@ +/** + * 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.azuredatabasemigrationservice.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 MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrationLevelOutput") +public class MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel extends MigrateSchemaSqlServerSqlDbTaskOutput { + /** + * Overall state of the schema 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 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; + + /** + * Get overall state of the schema 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 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; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.java new file mode 100644 index 000000000000..ec61e404497d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlServerSqlDbTaskProperties.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.azuredatabasemigrationservice.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 Schema for SQL Server databases to Azure + * SQL databases. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("MigrateSchemaSqlServerSqlDb") +public class MigrateSchemaSqlServerSqlDbTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateSchemaSqlServerSqlDbTaskInput 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 MigrateSchemaSqlServerSqlDbTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateSchemaSqlServerSqlDbTaskProperties object itself. + */ + public MigrateSchemaSqlServerSqlDbTaskProperties withInput(MigrateSchemaSqlServerSqlDbTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.java new file mode 100644 index 000000000000..8ecff8f3f027 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSchemaSqlTaskOutputError.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSchemaSqlTaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ErrorOutput") +public class MigrateSchemaSqlTaskOutputError extends MigrateSchemaSqlServerSqlDbTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbDatabaseInput.java new file mode 100644 index 000000000000..b211a0891df1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbDatabaseInput.java @@ -0,0 +1,123 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for SQL to Azure SQL DB migration task inputs. + */ +public class MigrateSqlServerSqlDbDatabaseInput { + /** + * Name of the database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Name of target database. Note: Target database will be truncated before + * starting migration. + */ + @JsonProperty(value = "targetDatabaseName") + private String targetDatabaseName; + + /** + * Whether to set database read only before migration. + */ + @JsonProperty(value = "makeSourceDbReadOnly") + private Boolean makeSourceDbReadOnly; + + /** + * Mapping of source to target tables. + */ + @JsonProperty(value = "tableMap") + private Map tableMap; + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withName(String name) { + this.name = name; + 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 MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withTargetDatabaseName(String targetDatabaseName) { + this.targetDatabaseName = targetDatabaseName; + return this; + } + + /** + * Get whether to set database read only before migration. + * + * @return the makeSourceDbReadOnly value + */ + public Boolean makeSourceDbReadOnly() { + return this.makeSourceDbReadOnly; + } + + /** + * Set whether to set database read only before migration. + * + * @param makeSourceDbReadOnly the makeSourceDbReadOnly value to set + * @return the MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withMakeSourceDbReadOnly(Boolean makeSourceDbReadOnly) { + this.makeSourceDbReadOnly = makeSourceDbReadOnly; + 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 MigrateSqlServerSqlDbDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbDatabaseInput withTableMap(Map tableMap) { + this.tableMap = tableMap; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncDatabaseInput.java new file mode 100644 index 000000000000..206d91f6eb7a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncDatabaseInput.java @@ -0,0 +1,227 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for SQL to Azure SQL DB sync migration task + * inputs. + */ +public class MigrateSqlServerSqlDbSyncDatabaseInput { + /** + * Unique identifier for database. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Name of database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Target database name. + */ + @JsonProperty(value = "targetDatabaseName") + private String targetDatabaseName; + + /** + * Schema name to be migrated. + */ + @JsonProperty(value = "schemaName") + private String schemaName; + + /** + * Mapping of source to target tables. + */ + @JsonProperty(value = "tableMap") + private Map tableMap; + + /** + * 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 unique identifier for database. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique identifier for database. + * + * @param id the id value to set + * @return the MigrateSqlServerSqlDbSyncDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbSyncDatabaseInput withId(String id) { + this.id = id; + return this; + } + + /** + * Get name of database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of database. + * + * @param name the name value to set + * @return the MigrateSqlServerSqlDbSyncDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbSyncDatabaseInput withName(String name) { + this.name = name; + return this; + } + + /** + * Get target database name. + * + * @return the targetDatabaseName value + */ + public String targetDatabaseName() { + return this.targetDatabaseName; + } + + /** + * Set target database name. + * + * @param targetDatabaseName the targetDatabaseName value to set + * @return the MigrateSqlServerSqlDbSyncDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbSyncDatabaseInput withTargetDatabaseName(String targetDatabaseName) { + this.targetDatabaseName = targetDatabaseName; + return this; + } + + /** + * Get schema name to be migrated. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set schema name to be migrated. + * + * @param schemaName the schemaName value to set + * @return the MigrateSqlServerSqlDbSyncDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbSyncDatabaseInput 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 MigrateSqlServerSqlDbSyncDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbSyncDatabaseInput withTableMap(Map tableMap) { + this.tableMap = tableMap; + 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 MigrateSqlServerSqlDbSyncDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbSyncDatabaseInput 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 MigrateSqlServerSqlDbSyncDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbSyncDatabaseInput 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 MigrateSqlServerSqlDbSyncDatabaseInput object itself. + */ + public MigrateSqlServerSqlDbSyncDatabaseInput withTargetSetting(Map targetSetting) { + this.targetSetting = targetSetting; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskInput.java new file mode 100644 index 000000000000..844ca1515690 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that migrates on-prem SQL Server databases to Azure SQL + * Database for online migrations. + */ +public class MigrateSqlServerSqlDbSyncTaskInput extends SqlMigrationTaskInput { + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Validation options. + */ + @JsonProperty(value = "validationOptions") + private MigrationValidationOptions validationOptions; + + /** + * 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 MigrateSqlServerSqlDbSyncTaskInput object itself. + */ + public MigrateSqlServerSqlDbSyncTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + + /** + * Get validation options. + * + * @return the validationOptions value + */ + public MigrationValidationOptions validationOptions() { + return this.validationOptions; + } + + /** + * Set validation options. + * + * @param validationOptions the validationOptions value to set + * @return the MigrateSqlServerSqlDbSyncTaskInput object itself. + */ + public MigrateSqlServerSqlDbSyncTaskInput withValidationOptions(MigrationValidationOptions validationOptions) { + this.validationOptions = validationOptions; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.java new file mode 100644 index 000000000000..9a97a6b0011d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutput.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.azuredatabasemigrationservice.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 on-prem SQL Server databases to Azure SQL + * Database for online migrations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrateSqlServerSqlDbSyncTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "DatabaseLevelErrorOutput", value = MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.class), + @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlDbSyncTaskOutputError.class), + @JsonSubTypes.Type(name = "TableLevelOutput", value = MigrateSqlServerSqlDbSyncTaskOutputTableLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.class) +}) +public class MigrateSqlServerSqlDbSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java new file mode 100644 index 000000000000..e16a19b03c54 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.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.azuredatabasemigrationservice.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 MigrateSqlServerSqlDbSyncTaskOutputDatabaseError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelErrorOutput") +public class MigrateSqlServerSqlDbSyncTaskOutputDatabaseError extends MigrateSqlServerSqlDbSyncTaskOutput { + /** + * 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 MigrateSqlServerSqlDbSyncTaskOutputDatabaseError object itself. + */ + public MigrateSqlServerSqlDbSyncTaskOutputDatabaseError 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 MigrateSqlServerSqlDbSyncTaskOutputDatabaseError object itself. + */ + public MigrateSqlServerSqlDbSyncTaskOutputDatabaseError withEvents(List events) { + this.events = events; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..fc69e9aa006c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.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.azuredatabasemigrationservice.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 MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelOutput") +public class MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.java new file mode 100644 index 000000000000..9d167e4b0212 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputError.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlDbSyncTaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ErrorOutput") +public class MigrateSqlServerSqlDbSyncTaskOutputError extends MigrateSqlServerSqlDbSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java new file mode 100644 index 000000000000..85fd1696b04a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java @@ -0,0 +1,127 @@ +/** + * 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.azuredatabasemigrationservice.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 MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrationLevelOutput") +public class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel extends MigrateSqlServerSqlDbSyncTaskOutput { + /** + * 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; + + /** + * Count of databases. + */ + @JsonProperty(value = "databaseCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer databaseCount; + + /** + * 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; + } + + /** + * Get count of databases. + * + * @return the databaseCount value + */ + public Integer databaseCount() { + return this.databaseCount; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java new file mode 100644 index 000000000000..52b038a20fce --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.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.azuredatabasemigrationservice.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 MigrateSqlServerSqlDbSyncTaskOutputTableLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("TableLevelOutput") +public class MigrateSqlServerSqlDbSyncTaskOutputTableLevel extends MigrateSqlServerSqlDbSyncTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.java new file mode 100644 index 000000000000..8dec00ed5087 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbSyncTaskProperties.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.azuredatabasemigrationservice.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 on-prem SQL Server databases to Azure + * SQL Database for online migrations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Migrate.SqlServer.AzureSqlDb.Sync") +public class MigrateSqlServerSqlDbSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateSqlServerSqlDbSyncTaskInput 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 MigrateSqlServerSqlDbSyncTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateSqlServerSqlDbSyncTaskProperties object itself. + */ + public MigrateSqlServerSqlDbSyncTaskProperties withInput(MigrateSqlServerSqlDbSyncTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskInput.java new file mode 100644 index 000000000000..ca9d9e9e5260 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskInput.java @@ -0,0 +1,85 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for the task that migrates on-prem SQL Server databases to Azure SQL + * Database. + */ +public class MigrateSqlServerSqlDbTaskInput extends SqlMigrationTaskInput { + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Options for enabling various post migration validations. Available + * options, + * 1.) Data Integrity Check: Performs a checksum based comparison on source + * and target tables after the migration to ensure the correctness of the + * data. + * 2.) Schema Validation: Performs a thorough schema comparison between the + * source and target tables and provides a list of differences between the + * source and target database, 3.) Query Analysis: Executes a set of + * queries picked up automatically either from the Query Plan Cache or + * Query Store and execute them and compares the execution time between the + * source and target database. + */ + @JsonProperty(value = "validationOptions") + private MigrationValidationOptions validationOptions; + + /** + * 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 MigrateSqlServerSqlDbTaskInput object itself. + */ + public MigrateSqlServerSqlDbTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + + /** + * Get options for enabling various post migration validations. Available options, + 1.) Data Integrity Check: Performs a checksum based comparison on source and target tables after the migration to ensure the correctness of the data. + 2.) Schema Validation: Performs a thorough schema comparison between the source and target tables and provides a list of differences between the source and target database, 3.) Query Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or Query Store and execute them and compares the execution time between the source and target database. + * + * @return the validationOptions value + */ + public MigrationValidationOptions validationOptions() { + return this.validationOptions; + } + + /** + * Set options for enabling various post migration validations. Available options, + 1.) Data Integrity Check: Performs a checksum based comparison on source and target tables after the migration to ensure the correctness of the data. + 2.) Schema Validation: Performs a thorough schema comparison between the source and target tables and provides a list of differences between the source and target database, 3.) Query Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or Query Store and execute them and compares the execution time between the source and target database. + * + * @param validationOptions the validationOptions value to set + * @return the MigrateSqlServerSqlDbTaskInput object itself. + */ + public MigrateSqlServerSqlDbTaskInput withValidationOptions(MigrationValidationOptions validationOptions) { + this.validationOptions = validationOptions; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.java new file mode 100644 index 000000000000..8ec40e97f337 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutput.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.azuredatabasemigrationservice.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 on-prem SQL Server databases to Azure SQL + * Database. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrateSqlServerSqlDbTaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlDbTaskOutputError.class), + @JsonSubTypes.Type(name = "TableLevelOutput", value = MigrateSqlServerSqlDbTaskOutputTableLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlDbTaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlDbTaskOutputMigrationLevel.class) +}) +public class MigrateSqlServerSqlDbTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..abd8a5136466 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java @@ -0,0 +1,237 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import org.joda.time.DateTime; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlDbTaskOutputDatabaseLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelOutput") +public class MigrateSqlServerSqlDbTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbTaskOutput { + /** + * Name of the item. + */ + @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; + + /** + * 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 stage that this database is in. Possible values include: + * 'None', 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed'. + */ + @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseMigrationStage stage; + + /** + * Status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Number of objects. + */ + @JsonProperty(value = "numberOfObjects", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfObjects; + + /** + * Number of successfully completed objects. + */ + @JsonProperty(value = "numberOfObjectsCompleted", access = JsonProperty.Access.WRITE_ONLY) + private Long numberOfObjectsCompleted; + + /** + * Number of database/object errors. + */ + @JsonProperty(value = "errorCount", access = JsonProperty.Access.WRITE_ONLY) + private Long errorCount; + + /** + * Wildcard string prefix to use for querying all errors of the item. + */ + @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String errorPrefix; + + /** + * Wildcard string prefix to use for querying all sub-tem results of the + * item. + */ + @JsonProperty(value = "resultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String resultPrefix; + + /** + * Migration exceptions and warnings. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Summary of object results in the migration. + */ + @JsonProperty(value = "objectSummary", access = JsonProperty.Access.WRITE_ONLY) + private Map objectSummary; + + /** + * Get name of the item. + * + * @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 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 stage that this database is in. Possible values include: 'None', 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed'. + * + * @return the stage value + */ + public DatabaseMigrationStage stage() { + return this.stage; + } + + /** + * Get status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get number of objects. + * + * @return the numberOfObjects value + */ + public Long numberOfObjects() { + return this.numberOfObjects; + } + + /** + * Get number of successfully completed objects. + * + * @return the numberOfObjectsCompleted value + */ + public Long numberOfObjectsCompleted() { + return this.numberOfObjectsCompleted; + } + + /** + * Get number of database/object errors. + * + * @return the errorCount value + */ + public Long errorCount() { + return this.errorCount; + } + + /** + * Get wildcard string prefix to use for querying all errors of the item. + * + * @return the errorPrefix value + */ + public String errorPrefix() { + return this.errorPrefix; + } + + /** + * Get wildcard string prefix to use for querying all sub-tem results of the item. + * + * @return the resultPrefix value + */ + public String resultPrefix() { + return this.resultPrefix; + } + + /** + * Get migration exceptions and warnings. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + + /** + * Get summary of object results in the migration. + * + * @return the objectSummary value + */ + public Map objectSummary() { + return this.objectSummary; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.java new file mode 100644 index 000000000000..32e2eddee93f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputError.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlDbTaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ErrorOutput") +public class MigrateSqlServerSqlDbTaskOutputError extends MigrateSqlServerSqlDbTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java new file mode 100644 index 000000000000..a455c854ca0e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java @@ -0,0 +1,274 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import org.joda.time.DateTime; +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlDbTaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrationLevelOutput") +public class MigrateSqlServerSqlDbTaskOutputMigrationLevel extends MigrateSqlServerSqlDbTaskOutput { + /** + * 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; + + /** + * Duration of task execution in seconds. + */ + @JsonProperty(value = "durationInSeconds", access = JsonProperty.Access.WRITE_ONLY) + private Long durationInSeconds; + + /** + * 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 status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Selected databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * Summary of database results in the migration. + */ + @JsonProperty(value = "databaseSummary", access = JsonProperty.Access.WRITE_ONLY) + private Map databaseSummary; + + /** + * Migration Validation Results. + */ + @JsonProperty(value = "migrationValidationResult") + private MigrationValidationResult migrationValidationResult; + + /** + * Migration Report Result, provides unique url for downloading your + * migration report. + */ + @JsonProperty(value = "migrationReportResult") + private MigrationReportResult migrationReportResult; + + /** + * 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; + + /** + * 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 duration of task execution in seconds. + * + * @return the durationInSeconds value + */ + public Long durationInSeconds() { + return this.durationInSeconds; + } + + /** + * 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 status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get selected databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * Get summary of database results in the migration. + * + * @return the databaseSummary value + */ + public Map databaseSummary() { + return this.databaseSummary; + } + + /** + * Get migration Validation Results. + * + * @return the migrationValidationResult value + */ + public MigrationValidationResult migrationValidationResult() { + return this.migrationValidationResult; + } + + /** + * Set migration Validation Results. + * + * @param migrationValidationResult the migrationValidationResult value to set + * @return the MigrateSqlServerSqlDbTaskOutputMigrationLevel object itself. + */ + public MigrateSqlServerSqlDbTaskOutputMigrationLevel withMigrationValidationResult(MigrationValidationResult migrationValidationResult) { + this.migrationValidationResult = migrationValidationResult; + return this; + } + + /** + * Get migration Report Result, provides unique url for downloading your migration report. + * + * @return the migrationReportResult value + */ + public MigrationReportResult migrationReportResult() { + return this.migrationReportResult; + } + + /** + * Set migration Report Result, provides unique url for downloading your migration report. + * + * @param migrationReportResult the migrationReportResult value to set + * @return the MigrateSqlServerSqlDbTaskOutputMigrationLevel object itself. + */ + public MigrateSqlServerSqlDbTaskOutputMigrationLevel withMigrationReportResult(MigrationReportResult migrationReportResult) { + this.migrationReportResult = migrationReportResult; + return this; + } + + /** + * 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; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java new file mode 100644 index 000000000000..ee16c96a3a01 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskOutputTableLevel.java @@ -0,0 +1,159 @@ +/** + * 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.azuredatabasemigrationservice.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 MigrateSqlServerSqlDbTaskOutputTableLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("TableLevelOutput") +public class MigrateSqlServerSqlDbTaskOutputTableLevel extends MigrateSqlServerSqlDbTaskOutput { + /** + * Name of the item. + */ + @JsonProperty(value = "objectName", access = JsonProperty.Access.WRITE_ONLY) + private String objectName; + + /** + * 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 state of migration. Possible values include: 'None', + * 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Status message. + */ + @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY) + private String statusMessage; + + /** + * Number of items. + */ + @JsonProperty(value = "itemsCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCount; + + /** + * Number of successfully completed items. + */ + @JsonProperty(value = "itemsCompletedCount", access = JsonProperty.Access.WRITE_ONLY) + private Long itemsCompletedCount; + + /** + * Wildcard string prefix to use for querying all errors of the item. + */ + @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String errorPrefix; + + /** + * Wildcard string prefix to use for querying all sub-tem results of the + * item. + */ + @JsonProperty(value = "resultPrefix", access = JsonProperty.Access.WRITE_ONLY) + private String resultPrefix; + + /** + * Get name of the item. + * + * @return the objectName value + */ + public String objectName() { + return this.objectName; + } + + /** + * 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 state of migration. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get status message. + * + * @return the statusMessage value + */ + public String statusMessage() { + return this.statusMessage; + } + + /** + * Get number of items. + * + * @return the itemsCount value + */ + public Long itemsCount() { + return this.itemsCount; + } + + /** + * Get number of successfully completed items. + * + * @return the itemsCompletedCount value + */ + public Long itemsCompletedCount() { + return this.itemsCompletedCount; + } + + /** + * Get wildcard string prefix to use for querying all errors of the item. + * + * @return the errorPrefix value + */ + public String errorPrefix() { + return this.errorPrefix; + } + + /** + * Get wildcard string prefix to use for querying all sub-tem results of the item. + * + * @return the resultPrefix value + */ + public String resultPrefix() { + return this.resultPrefix; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.java new file mode 100644 index 000000000000..4cdac69bbe2f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlDbTaskProperties.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.azuredatabasemigrationservice.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 on-prem SQL Server databases to Azure + * SQL Database. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Migrate.SqlServer.SqlDb") +public class MigrateSqlServerSqlDbTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateSqlServerSqlDbTaskInput 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 MigrateSqlServerSqlDbTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateSqlServerSqlDbTaskProperties object itself. + */ + public MigrateSqlServerSqlDbTaskProperties withInput(MigrateSqlServerSqlDbTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMIDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMIDatabaseInput.java new file mode 100644 index 000000000000..d142332f171f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMIDatabaseInput.java @@ -0,0 +1,123 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for SQL to Azure SQL DB Managed Instance + * migration task inputs. + */ +public class MigrateSqlServerSqlMIDatabaseInput { + /** + * Name of the database. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Name of the database at destination. + */ + @JsonProperty(value = "restoreDatabaseName", required = true) + private String restoreDatabaseName; + + /** + * Backup file share information for backing up this database. + */ + @JsonProperty(value = "backupFileShare") + private FileShare backupFileShare; + + /** + * The list of backup files to be used in case of existing backups. + */ + @JsonProperty(value = "backupFilePaths") + private List backupFilePaths; + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the MigrateSqlServerSqlMIDatabaseInput object itself. + */ + public MigrateSqlServerSqlMIDatabaseInput withName(String name) { + this.name = name; + return this; + } + + /** + * Get name of the database at destination. + * + * @return the restoreDatabaseName value + */ + public String restoreDatabaseName() { + return this.restoreDatabaseName; + } + + /** + * Set name of the database at destination. + * + * @param restoreDatabaseName the restoreDatabaseName value to set + * @return the MigrateSqlServerSqlMIDatabaseInput object itself. + */ + public MigrateSqlServerSqlMIDatabaseInput withRestoreDatabaseName(String restoreDatabaseName) { + this.restoreDatabaseName = restoreDatabaseName; + return this; + } + + /** + * Get backup file share information for backing up this database. + * + * @return the backupFileShare value + */ + public FileShare backupFileShare() { + return this.backupFileShare; + } + + /** + * Set backup file share information for backing up this database. + * + * @param backupFileShare the backupFileShare value to set + * @return the MigrateSqlServerSqlMIDatabaseInput object itself. + */ + public MigrateSqlServerSqlMIDatabaseInput withBackupFileShare(FileShare backupFileShare) { + this.backupFileShare = backupFileShare; + return this; + } + + /** + * Get the list of backup files to be used in case of existing backups. + * + * @return the backupFilePaths value + */ + public List backupFilePaths() { + return this.backupFilePaths; + } + + /** + * Set the list of backup files to be used in case of existing backups. + * + * @param backupFilePaths the backupFilePaths value to set + * @return the MigrateSqlServerSqlMIDatabaseInput object itself. + */ + public MigrateSqlServerSqlMIDatabaseInput withBackupFilePaths(List backupFilePaths) { + this.backupFilePaths = backupFilePaths; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskInput.java new file mode 100644 index 000000000000..8c5627e9ec4d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskInput.java @@ -0,0 +1,179 @@ +/** + * 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.azuredatabasemigrationservice.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. + */ +public class MigrateSqlServerSqlMITaskInput extends SqlMigrationTaskInput { + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Logins to migrate. + */ + @JsonProperty(value = "selectedLogins") + private List selectedLogins; + + /** + * Agent Jobs to migrate. + */ + @JsonProperty(value = "selectedAgentJobs") + private List selectedAgentJobs; + + /** + * Backup file share information for all selected databases. + */ + @JsonProperty(value = "backupFileShare") + private FileShare backupFileShare; + + /** + * SAS URI of Azure Storage Account Container to be used for storing backup + * files. + */ + @JsonProperty(value = "backupBlobShare", required = true) + private BlobShare backupBlobShare; + + /** + * Backup Mode to specify whether to use existing backup or create new + * backup. If using existing backups, backup file paths are required to be + * provided in selectedDatabases. Possible values include: 'CreateBackup', + * 'ExistingBackup'. + */ + @JsonProperty(value = "backupMode") + private BackupMode backupMode; + + /** + * 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 MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + + /** + * Get logins to migrate. + * + * @return the selectedLogins value + */ + public List selectedLogins() { + return this.selectedLogins; + } + + /** + * Set logins to migrate. + * + * @param selectedLogins the selectedLogins value to set + * @return the MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withSelectedLogins(List selectedLogins) { + this.selectedLogins = selectedLogins; + return this; + } + + /** + * Get agent Jobs to migrate. + * + * @return the selectedAgentJobs value + */ + public List selectedAgentJobs() { + return this.selectedAgentJobs; + } + + /** + * Set agent Jobs to migrate. + * + * @param selectedAgentJobs the selectedAgentJobs value to set + * @return the MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withSelectedAgentJobs(List selectedAgentJobs) { + this.selectedAgentJobs = selectedAgentJobs; + 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 MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withBackupFileShare(FileShare backupFileShare) { + this.backupFileShare = backupFileShare; + return this; + } + + /** + * Get sAS URI of Azure Storage Account Container to be used for storing backup files. + * + * @return the backupBlobShare value + */ + public BlobShare backupBlobShare() { + return this.backupBlobShare; + } + + /** + * Set sAS URI of Azure Storage Account Container to be used for storing backup files. + * + * @param backupBlobShare the backupBlobShare value to set + * @return the MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withBackupBlobShare(BlobShare backupBlobShare) { + this.backupBlobShare = backupBlobShare; + return this; + } + + /** + * Get backup Mode to specify whether to use existing backup or create new backup. If using existing backups, backup file paths are required to be provided in selectedDatabases. Possible values include: 'CreateBackup', 'ExistingBackup'. + * + * @return the backupMode value + */ + public BackupMode backupMode() { + return this.backupMode; + } + + /** + * Set backup Mode to specify whether to use existing backup or create new backup. If using existing backups, backup file paths are required to be provided in selectedDatabases. Possible values include: 'CreateBackup', 'ExistingBackup'. + * + * @param backupMode the backupMode value to set + * @return the MigrateSqlServerSqlMITaskInput object itself. + */ + public MigrateSqlServerSqlMITaskInput withBackupMode(BackupMode backupMode) { + this.backupMode = backupMode; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.java new file mode 100644 index 000000000000..ec186cb367a6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutput.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.azuredatabasemigrationservice.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. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrateSqlServerSqlMITaskOutput") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlMITaskOutputError.class), + @JsonSubTypes.Type(name = "LoginLevelOutput", value = MigrateSqlServerSqlMITaskOutputLoginLevel.class), + @JsonSubTypes.Type(name = "AgentJobLevelOutput", value = MigrateSqlServerSqlMITaskOutputAgentJobLevel.class), + @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlMITaskOutputDatabaseLevel.class), + @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlMITaskOutputMigrationLevel.class) +}) +public class MigrateSqlServerSqlMITaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java new file mode 100644 index 000000000000..b09d023ab871 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java @@ -0,0 +1,129 @@ +/** + * 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.azuredatabasemigrationservice.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 MigrateSqlServerSqlMITaskOutputAgentJobLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("AgentJobLevelOutput") +public class MigrateSqlServerSqlMITaskOutputAgentJobLevel extends MigrateSqlServerSqlMITaskOutput { + /** + * Agent Job name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The state of the original Agent Job. + */ + @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEnabled; + + /** + * 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; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Migration errors and warnings per job. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Get agent Job name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the state of the original Agent Job. + * + * @return the isEnabled value + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * 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 migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get migration errors and warnings per job. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java new file mode 100644 index 000000000000..273f32120022 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputDatabaseLevel.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.azuredatabasemigrationservice.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 MigrateSqlServerSqlMITaskOutputDatabaseLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("DatabaseLevelOutput") +public class MigrateSqlServerSqlMITaskOutputDatabaseLevel extends MigrateSqlServerSqlMITaskOutput { + /** + * Name of the database. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * Size of the database in megabytes. + */ + @JsonProperty(value = "sizeMB", access = JsonProperty.Access.WRITE_ONLY) + private Double sizeMB; + + /** + * 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; + + /** + * Current stage of migration. Possible values include: 'None', + * 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed'. + */ + @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseMigrationStage 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 database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Get size of the database in megabytes. + * + * @return the sizeMB value + */ + public Double sizeMB() { + return this.sizeMB; + } + + /** + * 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 current stage of migration. Possible values include: 'None', 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed'. + * + * @return the stage value + */ + public DatabaseMigrationStage 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.java new file mode 100644 index 000000000000..7a85cf2b6fdf --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputError.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlMITaskOutputError model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("ErrorOutput") +public class MigrateSqlServerSqlMITaskOutputError extends MigrateSqlServerSqlMITaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java new file mode 100644 index 000000000000..75d9bfff1e8c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputLoginLevel.java @@ -0,0 +1,132 @@ +/** + * 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.azuredatabasemigrationservice.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 MigrateSqlServerSqlMITaskOutputLoginLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("LoginLevelOutput") +public class MigrateSqlServerSqlMITaskOutputLoginLevel extends MigrateSqlServerSqlMITaskOutput { + /** + * Login name. + */ + @JsonProperty(value = "loginName", access = JsonProperty.Access.WRITE_ONLY) + private String loginName; + + /** + * Current state of login. Possible values include: 'None', 'InProgress', + * 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private MigrationState state; + + /** + * Current stage of login. Possible values include: 'None', 'Initialize', + * 'LoginMigration', 'EstablishUserMapping', 'AssignRoleMembership', + * 'AssignRoleOwnership', 'EstablishServerPermissions', + * 'EstablishObjectPermissions', 'Completed'. + */ + @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) + private LoginMigrationStage stage; + + /** + * Login migration start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Login migration end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Login migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Login migration errors and warnings per login. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Get login name. + * + * @return the loginName value + */ + public String loginName() { + return this.loginName; + } + + /** + * Get current state of login. Possible values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'. + * + * @return the state value + */ + public MigrationState state() { + return this.state; + } + + /** + * Get current stage of login. Possible values include: 'None', 'Initialize', 'LoginMigration', 'EstablishUserMapping', 'AssignRoleMembership', 'AssignRoleOwnership', 'EstablishServerPermissions', 'EstablishObjectPermissions', 'Completed'. + * + * @return the stage value + */ + public LoginMigrationStage stage() { + return this.stage; + } + + /** + * Get login migration start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get login migration end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get login migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get login migration errors and warnings per login. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java new file mode 100644 index 000000000000..8e49c5d0794c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskOutputMigrationLevel.java @@ -0,0 +1,252 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import org.joda.time.DateTime; +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The MigrateSqlServerSqlMITaskOutputMigrationLevel model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") +@JsonTypeName("MigrationLevelOutput") +public class MigrateSqlServerSqlMITaskOutputMigrationLevel extends MigrateSqlServerSqlMITaskOutput { + /** + * 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; + + /** + * 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; + + /** + * Selected agent jobs as a map from name to id. + */ + @JsonProperty(value = "agentJobs", access = JsonProperty.Access.WRITE_ONLY) + private Map agentJobs; + + /** + * Selected logins as a map from name to id. + */ + @JsonProperty(value = "logins", access = JsonProperty.Access.WRITE_ONLY) + private Map logins; + + /** + * Migration progress message. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Map of server role migration results. + */ + @JsonProperty(value = "serverRoleResults", access = JsonProperty.Access.WRITE_ONLY) + private Map serverRoleResults; + + /** + * Map of users to database name of orphaned users. + */ + @JsonProperty(value = "orphanedUsers", access = JsonProperty.Access.WRITE_ONLY) + private Map orphanedUsers; + + /** + * Selected databases as a map from database name to database id. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + + /** + * 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; + + /** + * 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 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 selected agent jobs as a map from name to id. + * + * @return the agentJobs value + */ + public Map agentJobs() { + return this.agentJobs; + } + + /** + * Get selected logins as a map from name to id. + * + * @return the logins value + */ + public Map logins() { + return this.logins; + } + + /** + * Get migration progress message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get map of server role migration results. + * + * @return the serverRoleResults value + */ + public Map serverRoleResults() { + return this.serverRoleResults; + } + + /** + * Get map of users to database name of orphaned users. + * + * @return the orphanedUsers value + */ + public Map orphanedUsers() { + return this.orphanedUsers; + } + + /** + * Get selected databases as a map from database name to database id. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * 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; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.java new file mode 100644 index 000000000000..addd1acd84a4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlMITaskProperties.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.azuredatabasemigrationservice.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. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Migrate.SqlServer.AzureSqlDbMI") +public class MigrateSqlServerSqlMITaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private MigrateSqlServerSqlMITaskInput 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 MigrateSqlServerSqlMITaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the MigrateSqlServerSqlMITaskProperties object itself. + */ + public MigrateSqlServerSqlMITaskProperties withInput(MigrateSqlServerSqlMITaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlServerDatabaseInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlServerDatabaseInput.java new file mode 100644 index 000000000000..58a7cb2cbbcb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSqlServerSqlServerDatabaseInput.java @@ -0,0 +1,122 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database specific information for SQL to SQL migration task inputs. + */ +public class MigrateSqlServerSqlServerDatabaseInput { + /** + * Name of the database. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Name of the database at destination. + */ + @JsonProperty(value = "restoreDatabaseName") + private String restoreDatabaseName; + + /** + * The backup and restore folder. + */ + @JsonProperty(value = "backupAndRestoreFolder") + private String backupAndRestoreFolder; + + /** + * The list of database files. + */ + @JsonProperty(value = "databaseFiles") + private List databaseFiles; + + /** + * Get name of the database. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the database. + * + * @param name the name value to set + * @return the MigrateSqlServerSqlServerDatabaseInput object itself. + */ + public MigrateSqlServerSqlServerDatabaseInput withName(String name) { + this.name = name; + return this; + } + + /** + * Get name of the database at destination. + * + * @return the restoreDatabaseName value + */ + public String restoreDatabaseName() { + return this.restoreDatabaseName; + } + + /** + * Set name of the database at destination. + * + * @param restoreDatabaseName the restoreDatabaseName value to set + * @return the MigrateSqlServerSqlServerDatabaseInput object itself. + */ + public MigrateSqlServerSqlServerDatabaseInput withRestoreDatabaseName(String restoreDatabaseName) { + this.restoreDatabaseName = restoreDatabaseName; + return this; + } + + /** + * Get the backup and restore folder. + * + * @return the backupAndRestoreFolder value + */ + public String backupAndRestoreFolder() { + return this.backupAndRestoreFolder; + } + + /** + * Set the backup and restore folder. + * + * @param backupAndRestoreFolder the backupAndRestoreFolder value to set + * @return the MigrateSqlServerSqlServerDatabaseInput object itself. + */ + public MigrateSqlServerSqlServerDatabaseInput withBackupAndRestoreFolder(String backupAndRestoreFolder) { + this.backupAndRestoreFolder = backupAndRestoreFolder; + return this; + } + + /** + * Get the list of database files. + * + * @return the databaseFiles value + */ + public List databaseFiles() { + return this.databaseFiles; + } + + /** + * Set the list of database files. + * + * @param databaseFiles the databaseFiles value to set + * @return the MigrateSqlServerSqlServerDatabaseInput object itself. + */ + public MigrateSqlServerSqlServerDatabaseInput withDatabaseFiles(List databaseFiles) { + this.databaseFiles = databaseFiles; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandInput.java new file mode 100644 index 000000000000..1ff852af2b41 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for command that completes sync migration for a database. + */ +public class MigrateSyncCompleteCommandInput { + /** + * Name of database. + */ + @JsonProperty(value = "databaseName", required = true) + private String databaseName; + + /** + * Time stamp to complete. + */ + @JsonProperty(value = "commitTimeStamp") + private DateTime commitTimeStamp; + + /** + * Get name of database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set name of database. + * + * @param databaseName the databaseName value to set + * @return the MigrateSyncCompleteCommandInput object itself. + */ + public MigrateSyncCompleteCommandInput withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get time stamp to complete. + * + * @return the commitTimeStamp value + */ + public DateTime commitTimeStamp() { + return this.commitTimeStamp; + } + + /** + * Set time stamp to complete. + * + * @param commitTimeStamp the commitTimeStamp value to set + * @return the MigrateSyncCompleteCommandInput object itself. + */ + public MigrateSyncCompleteCommandInput withCommitTimeStamp(DateTime commitTimeStamp) { + this.commitTimeStamp = commitTimeStamp; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandOutput.java new file mode 100644 index 000000000000..4283beaf2738 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandOutput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for command that completes sync migration for a database. + */ +public class MigrateSyncCompleteCommandOutput { + /** + * 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 MigrateSyncCompleteCommandOutput object itself. + */ + public MigrateSyncCompleteCommandOutput withErrors(List errors) { + this.errors = errors; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.java new file mode 100644 index 000000000000..6624b4eed81b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrateSyncCompleteCommandProperties.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.azuredatabasemigrationservice.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation.CommandPropertiesInner; + +/** + * Properties for the command that completes sync migration for a database. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") +@JsonTypeName("Migrate.Sync.Complete.Database") +public class MigrateSyncCompleteCommandProperties extends CommandPropertiesInner { + /** + * Command input. + */ + @JsonProperty(value = "input") + private MigrateSyncCompleteCommandInput input; + + /** + * Command output. This is ignored if submitted. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private MigrateSyncCompleteCommandOutput output; + + /** + * Get command input. + * + * @return the input value + */ + public MigrateSyncCompleteCommandInput input() { + return this.input; + } + + /** + * Set command input. + * + * @param input the input value to set + * @return the MigrateSyncCompleteCommandProperties object itself. + */ + public MigrateSyncCompleteCommandProperties withInput(MigrateSyncCompleteCommandInput input) { + this.input = input; + return this; + } + + /** + * Get command output. This is ignored if submitted. + * + * @return the output value + */ + public MigrateSyncCompleteCommandOutput output() { + return this.output; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationEligibilityInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationEligibilityInfo.java new file mode 100644 index 000000000000..a46e312138ef --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationEligibilityInfo.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about migration eligibility of a server object. + */ +public class MigrationEligibilityInfo { + /** + * Whether object is eligible for migration or not. + */ + @JsonProperty(value = "isEligibileForMigration", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEligibileForMigration; + + /** + * Information about eligibility failure for the server object. + */ + @JsonProperty(value = "validationMessages", access = JsonProperty.Access.WRITE_ONLY) + private List validationMessages; + + /** + * Get whether object is eligible for migration or not. + * + * @return the isEligibileForMigration value + */ + public Boolean isEligibileForMigration() { + return this.isEligibileForMigration; + } + + /** + * Get information about eligibility failure for the server object. + * + * @return the validationMessages value + */ + public List validationMessages() { + return this.validationMessages; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationReportResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationReportResult.java new file mode 100644 index 000000000000..96daed25b7b0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationReportResult.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration validation report result, contains the url for downloading the + * generated report. + */ +public class MigrationReportResult { + /** + * Migration validation result identifier. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The url of the report. + */ + @JsonProperty(value = "reportUrl") + private String reportUrl; + + /** + * Get migration validation result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set migration validation result identifier. + * + * @param id the id value to set + * @return the MigrationReportResult object itself. + */ + public MigrationReportResult withId(String id) { + this.id = id; + return this; + } + + /** + * Get the url of the report. + * + * @return the reportUrl value + */ + public String reportUrl() { + return this.reportUrl; + } + + /** + * Set the url of the report. + * + * @param reportUrl the reportUrl value to set + * @return the MigrationReportResult object itself. + */ + public MigrationReportResult withReportUrl(String reportUrl) { + this.reportUrl = reportUrl; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationState.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationState.java new file mode 100644 index 000000000000..ac7078c9a961 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationState.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MigrationState. + */ +public final class MigrationState extends ExpandableStringEnum { + /** Static value None for MigrationState. */ + public static final MigrationState NONE = fromString("None"); + + /** Static value InProgress for MigrationState. */ + public static final MigrationState IN_PROGRESS = fromString("InProgress"); + + /** Static value Failed for MigrationState. */ + public static final MigrationState FAILED = fromString("Failed"); + + /** Static value Warning for MigrationState. */ + public static final MigrationState WARNING = fromString("Warning"); + + /** Static value Completed for MigrationState. */ + public static final MigrationState COMPLETED = fromString("Completed"); + + /** Static value Skipped for MigrationState. */ + public static final MigrationState SKIPPED = fromString("Skipped"); + + /** Static value Stopped for MigrationState. */ + public static final MigrationState STOPPED = fromString("Stopped"); + + /** + * Creates or finds a MigrationState from its string representation. + * @param name a name to look for + * @return the corresponding MigrationState + */ + @JsonCreator + public static MigrationState fromString(String name) { + return fromString(name, MigrationState.class); + } + + /** + * @return known MigrationState values + */ + public static Collection values() { + return values(MigrationState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationStatus.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationStatus.java new file mode 100644 index 000000000000..01c3f4694cb8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationStatus.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MigrationStatus. + */ +public final class MigrationStatus extends ExpandableStringEnum { + /** Static value Default for MigrationStatus. */ + public static final MigrationStatus DEFAULT = fromString("Default"); + + /** Static value Connecting for MigrationStatus. */ + public static final MigrationStatus CONNECTING = fromString("Connecting"); + + /** Static value SourceAndTargetSelected for MigrationStatus. */ + public static final MigrationStatus SOURCE_AND_TARGET_SELECTED = fromString("SourceAndTargetSelected"); + + /** Static value SelectLogins for MigrationStatus. */ + public static final MigrationStatus SELECT_LOGINS = fromString("SelectLogins"); + + /** Static value Configured for MigrationStatus. */ + public static final MigrationStatus CONFIGURED = fromString("Configured"); + + /** Static value Running for MigrationStatus. */ + public static final MigrationStatus RUNNING = fromString("Running"); + + /** Static value Error for MigrationStatus. */ + public static final MigrationStatus ERROR = fromString("Error"); + + /** Static value Stopped for MigrationStatus. */ + public static final MigrationStatus STOPPED = fromString("Stopped"); + + /** Static value Completed for MigrationStatus. */ + public static final MigrationStatus COMPLETED = fromString("Completed"); + + /** Static value CompletedWithWarnings for MigrationStatus. */ + public static final MigrationStatus COMPLETED_WITH_WARNINGS = fromString("CompletedWithWarnings"); + + /** + * Creates or finds a MigrationStatus from its string representation. + * @param name a name to look for + * @return the corresponding MigrationStatus + */ + @JsonCreator + public static MigrationStatus fromString(String name) { + return fromString(name, MigrationStatus.class); + } + + /** + * @return known MigrationStatus values + */ + public static Collection values() { + return values(MigrationStatus.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationTableMetadata.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationTableMetadata.java new file mode 100644 index 000000000000..e4ffb0f7f5db --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationTableMetadata.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Metadata for tables selected in migration project. + */ +public class MigrationTableMetadata { + /** + * Source table name. + */ + @JsonProperty(value = "sourceTableName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceTableName; + + /** + * Target table name. + */ + @JsonProperty(value = "targetTableName", access = JsonProperty.Access.WRITE_ONLY) + private String targetTableName; + + /** + * Get source table name. + * + * @return the sourceTableName value + */ + public String sourceTableName() { + return this.sourceTableName; + } + + /** + * Get target table name. + * + * @return the targetTableName value + */ + public String targetTableName() { + return this.targetTableName; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationDatabaseLevelResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationDatabaseLevelResult.java new file mode 100644 index 000000000000..f82449b9bd46 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationDatabaseLevelResult.java @@ -0,0 +1,172 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database level validation results. + */ +public class MigrationValidationDatabaseLevelResult { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Migration Identifier. + */ + @JsonProperty(value = "migrationId", access = JsonProperty.Access.WRITE_ONLY) + private String migrationId; + + /** + * Name of the source database. + */ + @JsonProperty(value = "sourceDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceDatabaseName; + + /** + * Name of the target database. + */ + @JsonProperty(value = "targetDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String targetDatabaseName; + + /** + * Validation start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Validation end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Provides data integrity validation result between the source and target + * tables that are migrated. + */ + @JsonProperty(value = "dataIntegrityValidationResult", access = JsonProperty.Access.WRITE_ONLY) + private DataIntegrityValidationResult dataIntegrityValidationResult; + + /** + * Provides schema comparison result between source and target database. + */ + @JsonProperty(value = "schemaValidationResult", access = JsonProperty.Access.WRITE_ONLY) + private SchemaComparisonValidationResult schemaValidationResult; + + /** + * Results of some of the query execution result between source and target + * database. + */ + @JsonProperty(value = "queryAnalysisValidationResult", access = JsonProperty.Access.WRITE_ONLY) + private QueryAnalysisValidationResult queryAnalysisValidationResult; + + /** + * Current status of validation at the database level. Possible values + * include: 'Default', 'NotStarted', 'Initialized', 'InProgress', + * 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get migration Identifier. + * + * @return the migrationId value + */ + public String migrationId() { + return this.migrationId; + } + + /** + * Get name of the source database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Get name of the target database. + * + * @return the targetDatabaseName value + */ + public String targetDatabaseName() { + return this.targetDatabaseName; + } + + /** + * Get validation start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get validation end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get provides data integrity validation result between the source and target tables that are migrated. + * + * @return the dataIntegrityValidationResult value + */ + public DataIntegrityValidationResult dataIntegrityValidationResult() { + return this.dataIntegrityValidationResult; + } + + /** + * Get provides schema comparison result between source and target database. + * + * @return the schemaValidationResult value + */ + public SchemaComparisonValidationResult schemaValidationResult() { + return this.schemaValidationResult; + } + + /** + * Get results of some of the query execution result between source and target database. + * + * @return the queryAnalysisValidationResult value + */ + public QueryAnalysisValidationResult queryAnalysisValidationResult() { + return this.queryAnalysisValidationResult; + } + + /** + * Get current status of validation at the database level. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationDatabaseSummaryResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationDatabaseSummaryResult.java new file mode 100644 index 000000000000..44d9f0848d73 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationDatabaseSummaryResult.java @@ -0,0 +1,125 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration Validation Database level summary result. + */ +public class MigrationValidationDatabaseSummaryResult { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Migration Identifier. + */ + @JsonProperty(value = "migrationId", access = JsonProperty.Access.WRITE_ONLY) + private String migrationId; + + /** + * Name of the source database. + */ + @JsonProperty(value = "sourceDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceDatabaseName; + + /** + * Name of the target database. + */ + @JsonProperty(value = "targetDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String targetDatabaseName; + + /** + * Validation start time. + */ + @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startedOn; + + /** + * Validation end time. + */ + @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endedOn; + + /** + * Current status of validation at the database level. Possible values + * include: 'Default', 'NotStarted', 'Initialized', 'InProgress', + * 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get migration Identifier. + * + * @return the migrationId value + */ + public String migrationId() { + return this.migrationId; + } + + /** + * Get name of the source database. + * + * @return the sourceDatabaseName value + */ + public String sourceDatabaseName() { + return this.sourceDatabaseName; + } + + /** + * Get name of the target database. + * + * @return the targetDatabaseName value + */ + public String targetDatabaseName() { + return this.targetDatabaseName; + } + + /** + * Get validation start time. + * + * @return the startedOn value + */ + public DateTime startedOn() { + return this.startedOn; + } + + /** + * Get validation end time. + * + * @return the endedOn value + */ + public DateTime endedOn() { + return this.endedOn; + } + + /** + * Get current status of validation at the database level. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationOptions.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationOptions.java new file mode 100644 index 000000000000..2e16e938e217 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationOptions.java @@ -0,0 +1,99 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Types of validations to run after the migration. + */ +public class MigrationValidationOptions { + /** + * Allows to compare the schema information between source and target. + */ + @JsonProperty(value = "enableSchemaValidation") + private Boolean enableSchemaValidation; + + /** + * Allows to perform a checksum based data integrity validation between + * source and target for the selected database / tables . + */ + @JsonProperty(value = "enableDataIntegrityValidation") + private Boolean enableDataIntegrityValidation; + + /** + * Allows to perform a quick and intelligent query analysis by retrieving + * queries from the source database and executes them in the target. The + * result will have execution statistics for executions in source and + * target databases for the extracted queries. + */ + @JsonProperty(value = "enableQueryAnalysisValidation") + private Boolean enableQueryAnalysisValidation; + + /** + * Get allows to compare the schema information between source and target. + * + * @return the enableSchemaValidation value + */ + public Boolean enableSchemaValidation() { + return this.enableSchemaValidation; + } + + /** + * Set allows to compare the schema information between source and target. + * + * @param enableSchemaValidation the enableSchemaValidation value to set + * @return the MigrationValidationOptions object itself. + */ + public MigrationValidationOptions withEnableSchemaValidation(Boolean enableSchemaValidation) { + this.enableSchemaValidation = enableSchemaValidation; + return this; + } + + /** + * Get allows to perform a checksum based data integrity validation between source and target for the selected database / tables . + * + * @return the enableDataIntegrityValidation value + */ + public Boolean enableDataIntegrityValidation() { + return this.enableDataIntegrityValidation; + } + + /** + * Set allows to perform a checksum based data integrity validation between source and target for the selected database / tables . + * + * @param enableDataIntegrityValidation the enableDataIntegrityValidation value to set + * @return the MigrationValidationOptions object itself. + */ + public MigrationValidationOptions withEnableDataIntegrityValidation(Boolean enableDataIntegrityValidation) { + this.enableDataIntegrityValidation = enableDataIntegrityValidation; + return this; + } + + /** + * Get allows to perform a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries. + * + * @return the enableQueryAnalysisValidation value + */ + public Boolean enableQueryAnalysisValidation() { + return this.enableQueryAnalysisValidation; + } + + /** + * Set allows to perform a quick and intelligent query analysis by retrieving queries from the source database and executes them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries. + * + * @param enableQueryAnalysisValidation the enableQueryAnalysisValidation value to set + * @return the MigrationValidationOptions object itself. + */ + public MigrationValidationOptions withEnableQueryAnalysisValidation(Boolean enableQueryAnalysisValidation) { + this.enableQueryAnalysisValidation = enableQueryAnalysisValidation; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationResult.java new file mode 100644 index 000000000000..e02a7b759ff7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MigrationValidationResult.java @@ -0,0 +1,92 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Migration Validation Result. + */ +public class MigrationValidationResult { + /** + * Migration validation result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Migration Identifier. + */ + @JsonProperty(value = "migrationId", access = JsonProperty.Access.WRITE_ONLY) + private String migrationId; + + /** + * Validation summary results for each database. + */ + @JsonProperty(value = "summaryResults") + private Map summaryResults; + + /** + * Current status of validation at the migration level. Status from the + * database validation result status will be aggregated here. Possible + * values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', + * 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get migration validation result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get migration Identifier. + * + * @return the migrationId value + */ + public String migrationId() { + return this.migrationId; + } + + /** + * Get validation summary results for each database. + * + * @return the summaryResults value + */ + public Map summaryResults() { + return this.summaryResults; + } + + /** + * Set validation summary results for each database. + * + * @param summaryResults the summaryResults value to set + * @return the MigrationValidationResult object itself. + */ + public MigrationValidationResult withSummaryResults(Map summaryResults) { + this.summaryResults = summaryResults; + return this; + } + + /** + * Get current status of validation at the migration level. Status from the database validation result status will be aggregated here. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCancelCommand.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCancelCommand.java new file mode 100644 index 000000000000..f292cfd36616 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCancelCommand.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.azuredatabasemigrationservice.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation.CommandPropertiesInner; + +/** + * Properties for the command that cancels a migration in whole or in part. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") +@JsonTypeName("cancel") +public class MongoDbCancelCommand extends CommandPropertiesInner { + /** + * Command input. + */ + @JsonProperty(value = "input") + private MongoDbCommandInput input; + + /** + * Get command input. + * + * @return the input value + */ + public MongoDbCommandInput input() { + return this.input; + } + + /** + * Set command input. + * + * @param input the input value to set + * @return the MongoDbCancelCommand object itself. + */ + public MongoDbCancelCommand withInput(MongoDbCommandInput input) { + this.input = input; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbClusterInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbClusterInfo.java new file mode 100644 index 000000000000..42eac48a9976 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbClusterInfo.java @@ -0,0 +1,124 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a MongoDB data source. + */ +public class MongoDbClusterInfo { + /** + * A list of non-system databases in the cluster. + */ + @JsonProperty(value = "databases", required = true) + private List databases; + + /** + * Whether the cluster supports sharded collections. + */ + @JsonProperty(value = "supportsSharding", required = true) + private boolean supportsSharding; + + /** + * The type of data source. Possible values include: 'BlobContainer', + * 'CosmosDb', 'MongoDb'. + */ + @JsonProperty(value = "type", required = true) + private MongoDbClusterType type; + + /** + * The version of the data source in the form x.y.z (e.g. 3.6.7). Not used + * if Type is BlobContainer. + */ + @JsonProperty(value = "version", required = true) + private String version; + + /** + * Get a list of non-system databases in the cluster. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Set a list of non-system databases in the cluster. + * + * @param databases the databases value to set + * @return the MongoDbClusterInfo object itself. + */ + public MongoDbClusterInfo withDatabases(List databases) { + this.databases = databases; + return this; + } + + /** + * Get whether the cluster supports sharded collections. + * + * @return the supportsSharding value + */ + public boolean supportsSharding() { + return this.supportsSharding; + } + + /** + * Set whether the cluster supports sharded collections. + * + * @param supportsSharding the supportsSharding value to set + * @return the MongoDbClusterInfo object itself. + */ + public MongoDbClusterInfo withSupportsSharding(boolean supportsSharding) { + this.supportsSharding = supportsSharding; + return this; + } + + /** + * Get the type of data source. Possible values include: 'BlobContainer', 'CosmosDb', 'MongoDb'. + * + * @return the type value + */ + public MongoDbClusterType type() { + return this.type; + } + + /** + * Set the type of data source. Possible values include: 'BlobContainer', 'CosmosDb', 'MongoDb'. + * + * @param type the type value to set + * @return the MongoDbClusterInfo object itself. + */ + public MongoDbClusterInfo withType(MongoDbClusterType type) { + this.type = type; + return this; + } + + /** + * Get the version of the data source in the form x.y.z (e.g. 3.6.7). Not used if Type is BlobContainer. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set the version of the data source in the form x.y.z (e.g. 3.6.7). Not used if Type is BlobContainer. + * + * @param version the version value to set + * @return the MongoDbClusterInfo object itself. + */ + public MongoDbClusterInfo withVersion(String version) { + this.version = version; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbClusterType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbClusterType.java new file mode 100644 index 000000000000..f39e64e3b152 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbClusterType.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MongoDbClusterType. + */ +public final class MongoDbClusterType extends ExpandableStringEnum { + /** Static value BlobContainer for MongoDbClusterType. */ + public static final MongoDbClusterType BLOB_CONTAINER = fromString("BlobContainer"); + + /** Static value CosmosDb for MongoDbClusterType. */ + public static final MongoDbClusterType COSMOS_DB = fromString("CosmosDb"); + + /** Static value MongoDb for MongoDbClusterType. */ + public static final MongoDbClusterType MONGO_DB = fromString("MongoDb"); + + /** + * Creates or finds a MongoDbClusterType from its string representation. + * @param name a name to look for + * @return the corresponding MongoDbClusterType + */ + @JsonCreator + public static MongoDbClusterType fromString(String name) { + return fromString(name, MongoDbClusterType.class); + } + + /** + * @return known MongoDbClusterType values + */ + public static Collection values() { + return values(MongoDbClusterType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionInfo.java new file mode 100644 index 000000000000..b68fb4879c13 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionInfo.java @@ -0,0 +1,202 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a supported collection within a MongoDB database. + */ +public class MongoDbCollectionInfo extends MongoDbObjectInfo { + /** + * The name of the database containing the collection. + */ + @JsonProperty(value = "databaseName", required = true) + private String databaseName; + + /** + * Whether the collection is a capped collection (i.e. whether it has a + * fixed size and acts like a circular buffer). + */ + @JsonProperty(value = "isCapped", required = true) + private boolean isCapped; + + /** + * Whether the collection is system collection. + */ + @JsonProperty(value = "isSystemCollection", required = true) + private boolean isSystemCollection; + + /** + * Whether the collection is a view of another collection. + */ + @JsonProperty(value = "isView", required = true) + private boolean isView; + + /** + * The shard key on the collection, or null if the collection is not + * sharded. + */ + @JsonProperty(value = "shardKey") + private MongoDbShardKeyInfo shardKey; + + /** + * Whether the database has sharding enabled. Note that the migration task + * will enable sharding on the target if necessary. + */ + @JsonProperty(value = "supportsSharding", required = true) + private boolean supportsSharding; + + /** + * The name of the collection that this is a view of, if IsView is true. + */ + @JsonProperty(value = "viewOf") + private String viewOf; + + /** + * Get the name of the database containing the collection. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the name of the database containing the collection. + * + * @param databaseName the databaseName value to set + * @return the MongoDbCollectionInfo object itself. + */ + public MongoDbCollectionInfo withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get whether the collection is a capped collection (i.e. whether it has a fixed size and acts like a circular buffer). + * + * @return the isCapped value + */ + public boolean isCapped() { + return this.isCapped; + } + + /** + * Set whether the collection is a capped collection (i.e. whether it has a fixed size and acts like a circular buffer). + * + * @param isCapped the isCapped value to set + * @return the MongoDbCollectionInfo object itself. + */ + public MongoDbCollectionInfo withIsCapped(boolean isCapped) { + this.isCapped = isCapped; + return this; + } + + /** + * Get whether the collection is system collection. + * + * @return the isSystemCollection value + */ + public boolean isSystemCollection() { + return this.isSystemCollection; + } + + /** + * Set whether the collection is system collection. + * + * @param isSystemCollection the isSystemCollection value to set + * @return the MongoDbCollectionInfo object itself. + */ + public MongoDbCollectionInfo withIsSystemCollection(boolean isSystemCollection) { + this.isSystemCollection = isSystemCollection; + return this; + } + + /** + * Get whether the collection is a view of another collection. + * + * @return the isView value + */ + public boolean isView() { + return this.isView; + } + + /** + * Set whether the collection is a view of another collection. + * + * @param isView the isView value to set + * @return the MongoDbCollectionInfo object itself. + */ + public MongoDbCollectionInfo withIsView(boolean isView) { + this.isView = isView; + return this; + } + + /** + * Get the shard key on the collection, or null if the collection is not sharded. + * + * @return the shardKey value + */ + public MongoDbShardKeyInfo shardKey() { + return this.shardKey; + } + + /** + * Set the shard key on the collection, or null if the collection is not sharded. + * + * @param shardKey the shardKey value to set + * @return the MongoDbCollectionInfo object itself. + */ + public MongoDbCollectionInfo withShardKey(MongoDbShardKeyInfo shardKey) { + this.shardKey = shardKey; + return this; + } + + /** + * Get whether the database has sharding enabled. Note that the migration task will enable sharding on the target if necessary. + * + * @return the supportsSharding value + */ + public boolean supportsSharding() { + return this.supportsSharding; + } + + /** + * Set whether the database has sharding enabled. Note that the migration task will enable sharding on the target if necessary. + * + * @param supportsSharding the supportsSharding value to set + * @return the MongoDbCollectionInfo object itself. + */ + public MongoDbCollectionInfo withSupportsSharding(boolean supportsSharding) { + this.supportsSharding = supportsSharding; + return this; + } + + /** + * Get the name of the collection that this is a view of, if IsView is true. + * + * @return the viewOf value + */ + public String viewOf() { + return this.viewOf; + } + + /** + * Set the name of the collection that this is a view of, if IsView is true. + * + * @param viewOf the viewOf value to set + * @return the MongoDbCollectionInfo object itself. + */ + public MongoDbCollectionInfo withViewOf(String viewOf) { + this.viewOf = viewOf; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionProgress.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionProgress.java new file mode 100644 index 000000000000..14320a13d7cd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionProgress.java @@ -0,0 +1,16 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + + +/** + * Describes the progress of a collection. + */ +public class MongoDbCollectionProgress extends MongoDbProgress { +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionSettings.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionSettings.java new file mode 100644 index 000000000000..6ae012e791d1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCollectionSettings.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes how an individual MongoDB collection should be migrated. + */ +public class MongoDbCollectionSettings { + /** + * Whether the migrator is allowed to drop the target collection in the + * course of performing a migration. The default is true. + */ + @JsonProperty(value = "canDelete") + private Boolean canDelete; + + /** + * The shardKey property. + */ + @JsonProperty(value = "shardKey") + private MongoDbShardKeySetting shardKey; + + /** + * The RUs that should be configured on a CosmosDB target, or null to use + * the default. This has no effect on non-CosmosDB targets. + */ + @JsonProperty(value = "targetRUs") + private Integer targetRUs; + + /** + * Get whether the migrator is allowed to drop the target collection in the course of performing a migration. The default is true. + * + * @return the canDelete value + */ + public Boolean canDelete() { + return this.canDelete; + } + + /** + * Set whether the migrator is allowed to drop the target collection in the course of performing a migration. The default is true. + * + * @param canDelete the canDelete value to set + * @return the MongoDbCollectionSettings object itself. + */ + public MongoDbCollectionSettings withCanDelete(Boolean canDelete) { + this.canDelete = canDelete; + return this; + } + + /** + * Get the shardKey value. + * + * @return the shardKey value + */ + public MongoDbShardKeySetting shardKey() { + return this.shardKey; + } + + /** + * Set the shardKey value. + * + * @param shardKey the shardKey value to set + * @return the MongoDbCollectionSettings object itself. + */ + public MongoDbCollectionSettings withShardKey(MongoDbShardKeySetting shardKey) { + this.shardKey = shardKey; + return this; + } + + /** + * Get the RUs that should be configured on a CosmosDB target, or null to use the default. This has no effect on non-CosmosDB targets. + * + * @return the targetRUs value + */ + public Integer targetRUs() { + return this.targetRUs; + } + + /** + * Set the RUs that should be configured on a CosmosDB target, or null to use the default. This has no effect on non-CosmosDB targets. + * + * @param targetRUs the targetRUs value to set + * @return the MongoDbCollectionSettings object itself. + */ + public MongoDbCollectionSettings withTargetRUs(Integer targetRUs) { + this.targetRUs = targetRUs; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCommandInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCommandInput.java new file mode 100644 index 000000000000..17fce63ee2c4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbCommandInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the input to the 'cancel' and 'restart' MongoDB migration + * commands. + */ +public class MongoDbCommandInput { + /** + * The qualified name of a database or collection to act upon, or null to + * act upon the entire migration. + */ + @JsonProperty(value = "objectName") + private String objectName; + + /** + * Get the qualified name of a database or collection to act upon, or null to act upon the entire migration. + * + * @return the objectName value + */ + public String objectName() { + return this.objectName; + } + + /** + * Set the qualified name of a database or collection to act upon, or null to act upon the entire migration. + * + * @param objectName the objectName value to set + * @return the MongoDbCommandInput object itself. + */ + public MongoDbCommandInput withObjectName(String objectName) { + this.objectName = objectName; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbConnectionInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbConnectionInfo.java new file mode 100644 index 000000000000..ce158e77c957 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbConnectionInfo.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Describes a connection to a MongoDB data source. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("MongoDbConnectionInfo") +public class MongoDbConnectionInfo extends ConnectionInfo { + /** + * A MongoDB connection string or blob container URL. The user name and + * password can be specified here or in the userName and password + * properties. + */ + @JsonProperty(value = "connectionString", required = true) + private String connectionString; + + /** + * Get a MongoDB connection string or blob container URL. The user name and password can be specified here or in the userName and password properties. + * + * @return the connectionString value + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set a MongoDB connection string or blob container URL. The user name and password can be specified here or in the userName and password properties. + * + * @param connectionString the connectionString value to set + * @return the MongoDbConnectionInfo object itself. + */ + public MongoDbConnectionInfo withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseInfo.java new file mode 100644 index 000000000000..dbcbeb4ad727 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseInfo.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a database within a MongoDB data source. + */ +public class MongoDbDatabaseInfo extends MongoDbObjectInfo { + /** + * A list of supported collections in a MongoDB database. + */ + @JsonProperty(value = "collections", required = true) + private List collections; + + /** + * Whether the database has sharding enabled. Note that the migration task + * will enable sharding on the target if necessary. + */ + @JsonProperty(value = "supportsSharding", required = true) + private boolean supportsSharding; + + /** + * Get a list of supported collections in a MongoDB database. + * + * @return the collections value + */ + public List collections() { + return this.collections; + } + + /** + * Set a list of supported collections in a MongoDB database. + * + * @param collections the collections value to set + * @return the MongoDbDatabaseInfo object itself. + */ + public MongoDbDatabaseInfo withCollections(List collections) { + this.collections = collections; + return this; + } + + /** + * Get whether the database has sharding enabled. Note that the migration task will enable sharding on the target if necessary. + * + * @return the supportsSharding value + */ + public boolean supportsSharding() { + return this.supportsSharding; + } + + /** + * Set whether the database has sharding enabled. Note that the migration task will enable sharding on the target if necessary. + * + * @param supportsSharding the supportsSharding value to set + * @return the MongoDbDatabaseInfo object itself. + */ + public MongoDbDatabaseInfo withSupportsSharding(boolean supportsSharding) { + this.supportsSharding = supportsSharding; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseProgress.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseProgress.java new file mode 100644 index 000000000000..c5f286cf38ef --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseProgress.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the progress of a database. + */ +public class MongoDbDatabaseProgress extends MongoDbProgress { + /** + * The progress of the collections in the database. The keys are the + * unqualified names of the collections. + */ + @JsonProperty(value = "collections") + private Map collections; + + /** + * Get the progress of the collections in the database. The keys are the unqualified names of the collections. + * + * @return the collections value + */ + public Map collections() { + return this.collections; + } + + /** + * Set the progress of the collections in the database. The keys are the unqualified names of the collections. + * + * @param collections the collections value to set + * @return the MongoDbDatabaseProgress object itself. + */ + public MongoDbDatabaseProgress withCollections(Map collections) { + this.collections = collections; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseSettings.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseSettings.java new file mode 100644 index 000000000000..0e7f7c8cd739 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbDatabaseSettings.java @@ -0,0 +1,73 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes how an individual MongoDB database should be migrated. + */ +public class MongoDbDatabaseSettings { + /** + * The collections on the source database to migrate to the target. The + * keys are the unqualified names of the collections. + */ + @JsonProperty(value = "collections", required = true) + private Map collections; + + /** + * The RUs that should be configured on a CosmosDB target, or null to use + * the default, or 0 if throughput should not be provisioned for the + * database. This has no effect on non-CosmosDB targets. + */ + @JsonProperty(value = "targetRUs") + private Integer targetRUs; + + /** + * Get the collections on the source database to migrate to the target. The keys are the unqualified names of the collections. + * + * @return the collections value + */ + public Map collections() { + return this.collections; + } + + /** + * Set the collections on the source database to migrate to the target. The keys are the unqualified names of the collections. + * + * @param collections the collections value to set + * @return the MongoDbDatabaseSettings object itself. + */ + public MongoDbDatabaseSettings withCollections(Map collections) { + this.collections = collections; + return this; + } + + /** + * Get the RUs that should be configured on a CosmosDB target, or null to use the default, or 0 if throughput should not be provisioned for the database. This has no effect on non-CosmosDB targets. + * + * @return the targetRUs value + */ + public Integer targetRUs() { + return this.targetRUs; + } + + /** + * Set the RUs that should be configured on a CosmosDB target, or null to use the default, or 0 if throughput should not be provisioned for the database. This has no effect on non-CosmosDB targets. + * + * @param targetRUs the targetRUs value to set + * @return the MongoDbDatabaseSettings object itself. + */ + public MongoDbDatabaseSettings withTargetRUs(Integer targetRUs) { + this.targetRUs = targetRUs; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbError.java new file mode 100644 index 000000000000..0f469781023a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbError.java @@ -0,0 +1,124 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes an error or warning that occurred during a MongoDB migration. + */ +public class MongoDbError { + /** + * The non-localized, machine-readable code that describes the error or + * warning. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The number of times the error or warning has occurred. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * The localized, human-readable message that describes the error or + * warning. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The type of error or warning. Possible values include: 'Error', + * 'ValidationError', 'Warning'. + */ + @JsonProperty(value = "type") + private MongoDbErrorType type; + + /** + * Get the non-localized, machine-readable code that describes the error or warning. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the non-localized, machine-readable code that describes the error or warning. + * + * @param code the code value to set + * @return the MongoDbError object itself. + */ + public MongoDbError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the number of times the error or warning has occurred. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set the number of times the error or warning has occurred. + * + * @param count the count value to set + * @return the MongoDbError object itself. + */ + public MongoDbError withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the localized, human-readable message that describes the error or warning. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the localized, human-readable message that describes the error or warning. + * + * @param message the message value to set + * @return the MongoDbError object itself. + */ + public MongoDbError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the type of error or warning. Possible values include: 'Error', 'ValidationError', 'Warning'. + * + * @return the type value + */ + public MongoDbErrorType type() { + return this.type; + } + + /** + * Set the type of error or warning. Possible values include: 'Error', 'ValidationError', 'Warning'. + * + * @param type the type value to set + * @return the MongoDbError object itself. + */ + public MongoDbError withType(MongoDbErrorType type) { + this.type = type; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbErrorType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbErrorType.java new file mode 100644 index 000000000000..5d9fb53dccef --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbErrorType.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MongoDbErrorType. + */ +public final class MongoDbErrorType extends ExpandableStringEnum { + /** Static value Error for MongoDbErrorType. */ + public static final MongoDbErrorType ERROR = fromString("Error"); + + /** Static value ValidationError for MongoDbErrorType. */ + public static final MongoDbErrorType VALIDATION_ERROR = fromString("ValidationError"); + + /** Static value Warning for MongoDbErrorType. */ + public static final MongoDbErrorType WARNING = fromString("Warning"); + + /** + * Creates or finds a MongoDbErrorType from its string representation. + * @param name a name to look for + * @return the corresponding MongoDbErrorType + */ + @JsonCreator + public static MongoDbErrorType fromString(String name) { + return fromString(name, MongoDbErrorType.class); + } + + /** + * @return known MongoDbErrorType values + */ + public static Collection values() { + return values(MongoDbErrorType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbFinishCommand.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbFinishCommand.java new file mode 100644 index 000000000000..da5c4f742f58 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbFinishCommand.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.azuredatabasemigrationservice.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation.CommandPropertiesInner; + +/** + * Properties for the command that finishes a migration in whole or in part. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") +@JsonTypeName("finish") +public class MongoDbFinishCommand extends CommandPropertiesInner { + /** + * Command input. + */ + @JsonProperty(value = "input") + private MongoDbFinishCommandInput input; + + /** + * Get command input. + * + * @return the input value + */ + public MongoDbFinishCommandInput input() { + return this.input; + } + + /** + * Set command input. + * + * @param input the input value to set + * @return the MongoDbFinishCommand object itself. + */ + public MongoDbFinishCommand withInput(MongoDbFinishCommandInput input) { + this.input = input; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbFinishCommandInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbFinishCommandInput.java new file mode 100644 index 000000000000..e5c97c43946b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbFinishCommandInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the input to the 'finish' MongoDB migration command. + */ +public class MongoDbFinishCommandInput extends MongoDbCommandInput { + /** + * If true, replication for the affected objects will be stopped + * immediately. If false, the migrator will finish replaying queued events + * before finishing the replication. + */ + @JsonProperty(value = "immediate", required = true) + private boolean immediate; + + /** + * Get if true, replication for the affected objects will be stopped immediately. If false, the migrator will finish replaying queued events before finishing the replication. + * + * @return the immediate value + */ + public boolean immediate() { + return this.immediate; + } + + /** + * Set if true, replication for the affected objects will be stopped immediately. If false, the migrator will finish replaying queued events before finishing the replication. + * + * @param immediate the immediate value to set + * @return the MongoDbFinishCommandInput object itself. + */ + public MongoDbFinishCommandInput withImmediate(boolean immediate) { + this.immediate = immediate; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationProgress.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationProgress.java new file mode 100644 index 000000000000..04b4da907c65 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationProgress.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the progress of the overall migration. + */ +public class MongoDbMigrationProgress extends MongoDbProgress { + /** + * The progress of the databases in the migration. The keys are the names + * of the databases. + */ + @JsonProperty(value = "databases") + private Map databases; + + /** + * Get the progress of the databases in the migration. The keys are the names of the databases. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * Set the progress of the databases in the migration. The keys are the names of the databases. + * + * @param databases the databases value to set + * @return the MongoDbMigrationProgress object itself. + */ + public MongoDbMigrationProgress withDatabases(Map databases) { + this.databases = databases; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationSettings.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationSettings.java new file mode 100644 index 000000000000..eff1a6960731 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationSettings.java @@ -0,0 +1,181 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes how a MongoDB data migration should be performed. + */ +public class MongoDbMigrationSettings { + /** + * The RU limit on a CosmosDB target that collections will be temporarily + * increased to (if lower) during the initial copy of a migration, from + * 10,000 to 1,000,000, or 0 to use the default boost (which is generally + * the maximum), or null to not boost the RUs. This setting has no effect + * on non-CosmosDB targets. + */ + @JsonProperty(value = "boostRUs") + private Integer boostRUs; + + /** + * The databases on the source cluster to migrate to the target. The keys + * are the names of the databases. + */ + @JsonProperty(value = "databases", required = true) + private Map databases; + + /** + * Describes how changes will be replicated from the source to the target. + * The default is OneTime. Possible values include: 'Disabled', 'OneTime', + * 'Continuous'. + */ + @JsonProperty(value = "replication") + private MongoDbReplication replication; + + /** + * Settings used to connect to the source cluster. + */ + @JsonProperty(value = "source", required = true) + private MongoDbConnectionInfo source; + + /** + * Settings used to connect to the target cluster. + */ + @JsonProperty(value = "target", required = true) + private MongoDbConnectionInfo target; + + /** + * Settings used to limit the resource usage of the migration. + */ + @JsonProperty(value = "throttling") + private MongoDbThrottlingSettings throttling; + + /** + * Get the RU limit on a CosmosDB target that collections will be temporarily increased to (if lower) during the initial copy of a migration, from 10,000 to 1,000,000, or 0 to use the default boost (which is generally the maximum), or null to not boost the RUs. This setting has no effect on non-CosmosDB targets. + * + * @return the boostRUs value + */ + public Integer boostRUs() { + return this.boostRUs; + } + + /** + * Set the RU limit on a CosmosDB target that collections will be temporarily increased to (if lower) during the initial copy of a migration, from 10,000 to 1,000,000, or 0 to use the default boost (which is generally the maximum), or null to not boost the RUs. This setting has no effect on non-CosmosDB targets. + * + * @param boostRUs the boostRUs value to set + * @return the MongoDbMigrationSettings object itself. + */ + public MongoDbMigrationSettings withBoostRUs(Integer boostRUs) { + this.boostRUs = boostRUs; + return this; + } + + /** + * Get the databases on the source cluster to migrate to the target. The keys are the names of the databases. + * + * @return the databases value + */ + public Map databases() { + return this.databases; + } + + /** + * Set the databases on the source cluster to migrate to the target. The keys are the names of the databases. + * + * @param databases the databases value to set + * @return the MongoDbMigrationSettings object itself. + */ + public MongoDbMigrationSettings withDatabases(Map databases) { + this.databases = databases; + return this; + } + + /** + * Get describes how changes will be replicated from the source to the target. The default is OneTime. Possible values include: 'Disabled', 'OneTime', 'Continuous'. + * + * @return the replication value + */ + public MongoDbReplication replication() { + return this.replication; + } + + /** + * Set describes how changes will be replicated from the source to the target. The default is OneTime. Possible values include: 'Disabled', 'OneTime', 'Continuous'. + * + * @param replication the replication value to set + * @return the MongoDbMigrationSettings object itself. + */ + public MongoDbMigrationSettings withReplication(MongoDbReplication replication) { + this.replication = replication; + return this; + } + + /** + * Get settings used to connect to the source cluster. + * + * @return the source value + */ + public MongoDbConnectionInfo source() { + return this.source; + } + + /** + * Set settings used to connect to the source cluster. + * + * @param source the source value to set + * @return the MongoDbMigrationSettings object itself. + */ + public MongoDbMigrationSettings withSource(MongoDbConnectionInfo source) { + this.source = source; + return this; + } + + /** + * Get settings used to connect to the target cluster. + * + * @return the target value + */ + public MongoDbConnectionInfo target() { + return this.target; + } + + /** + * Set settings used to connect to the target cluster. + * + * @param target the target value to set + * @return the MongoDbMigrationSettings object itself. + */ + public MongoDbMigrationSettings withTarget(MongoDbConnectionInfo target) { + this.target = target; + return this; + } + + /** + * Get settings used to limit the resource usage of the migration. + * + * @return the throttling value + */ + public MongoDbThrottlingSettings throttling() { + return this.throttling; + } + + /** + * Set settings used to limit the resource usage of the migration. + * + * @param throttling the throttling value to set + * @return the MongoDbMigrationSettings object itself. + */ + public MongoDbMigrationSettings withThrottling(MongoDbThrottlingSettings throttling) { + this.throttling = throttling; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationState.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationState.java new file mode 100644 index 000000000000..ed3708f961be --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbMigrationState.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MongoDbMigrationState. + */ +public final class MongoDbMigrationState extends ExpandableStringEnum { + /** Static value NotStarted for MongoDbMigrationState. */ + public static final MongoDbMigrationState NOT_STARTED = fromString("NotStarted"); + + /** Static value ValidatingInput for MongoDbMigrationState. */ + public static final MongoDbMigrationState VALIDATING_INPUT = fromString("ValidatingInput"); + + /** Static value Initializing for MongoDbMigrationState. */ + public static final MongoDbMigrationState INITIALIZING = fromString("Initializing"); + + /** Static value Restarting for MongoDbMigrationState. */ + public static final MongoDbMigrationState RESTARTING = fromString("Restarting"); + + /** Static value Copying for MongoDbMigrationState. */ + public static final MongoDbMigrationState COPYING = fromString("Copying"); + + /** Static value InitialReplay for MongoDbMigrationState. */ + public static final MongoDbMigrationState INITIAL_REPLAY = fromString("InitialReplay"); + + /** Static value Replaying for MongoDbMigrationState. */ + public static final MongoDbMigrationState REPLAYING = fromString("Replaying"); + + /** Static value Finalizing for MongoDbMigrationState. */ + public static final MongoDbMigrationState FINALIZING = fromString("Finalizing"); + + /** Static value Complete for MongoDbMigrationState. */ + public static final MongoDbMigrationState COMPLETE = fromString("Complete"); + + /** Static value Canceled for MongoDbMigrationState. */ + public static final MongoDbMigrationState CANCELED = fromString("Canceled"); + + /** Static value Failed for MongoDbMigrationState. */ + public static final MongoDbMigrationState FAILED = fromString("Failed"); + + /** + * Creates or finds a MongoDbMigrationState from its string representation. + * @param name a name to look for + * @return the corresponding MongoDbMigrationState + */ + @JsonCreator + public static MongoDbMigrationState fromString(String name) { + return fromString(name, MongoDbMigrationState.class); + } + + /** + * @return known MongoDbMigrationState values + */ + public static Collection values() { + return values(MongoDbMigrationState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbObjectInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbObjectInfo.java new file mode 100644 index 000000000000..b3c168a6b7b1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbObjectInfo.java @@ -0,0 +1,149 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a database or collection within a MongoDB data source. + */ +public class MongoDbObjectInfo { + /** + * The average document size, or -1 if the average size is unknown. + */ + @JsonProperty(value = "averageDocumentSize", required = true) + private long averageDocumentSize; + + /** + * The estimated total data size, in bytes, or -1 if the size is unknown. + */ + @JsonProperty(value = "dataSize", required = true) + private long dataSize; + + /** + * The estimated total number of documents, or -1 if the document count is + * unknown. + */ + @JsonProperty(value = "documentCount", required = true) + private long documentCount; + + /** + * The unqualified name of the database or collection. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The qualified name of the database or collection. For a collection, this + * is the database-qualified name. + */ + @JsonProperty(value = "qualifiedName", required = true) + private String qualifiedName; + + /** + * Get the average document size, or -1 if the average size is unknown. + * + * @return the averageDocumentSize value + */ + public long averageDocumentSize() { + return this.averageDocumentSize; + } + + /** + * Set the average document size, or -1 if the average size is unknown. + * + * @param averageDocumentSize the averageDocumentSize value to set + * @return the MongoDbObjectInfo object itself. + */ + public MongoDbObjectInfo withAverageDocumentSize(long averageDocumentSize) { + this.averageDocumentSize = averageDocumentSize; + return this; + } + + /** + * Get the estimated total data size, in bytes, or -1 if the size is unknown. + * + * @return the dataSize value + */ + public long dataSize() { + return this.dataSize; + } + + /** + * Set the estimated total data size, in bytes, or -1 if the size is unknown. + * + * @param dataSize the dataSize value to set + * @return the MongoDbObjectInfo object itself. + */ + public MongoDbObjectInfo withDataSize(long dataSize) { + this.dataSize = dataSize; + return this; + } + + /** + * Get the estimated total number of documents, or -1 if the document count is unknown. + * + * @return the documentCount value + */ + public long documentCount() { + return this.documentCount; + } + + /** + * Set the estimated total number of documents, or -1 if the document count is unknown. + * + * @param documentCount the documentCount value to set + * @return the MongoDbObjectInfo object itself. + */ + public MongoDbObjectInfo withDocumentCount(long documentCount) { + this.documentCount = documentCount; + return this; + } + + /** + * Get the unqualified name of the database or collection. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unqualified name of the database or collection. + * + * @param name the name value to set + * @return the MongoDbObjectInfo object itself. + */ + public MongoDbObjectInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get the qualified name of the database or collection. For a collection, this is the database-qualified name. + * + * @return the qualifiedName value + */ + public String qualifiedName() { + return this.qualifiedName; + } + + /** + * Set the qualified name of the database or collection. For a collection, this is the database-qualified name. + * + * @param qualifiedName the qualifiedName value to set + * @return the MongoDbObjectInfo object itself. + */ + public MongoDbObjectInfo withQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbProgress.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbProgress.java new file mode 100644 index 000000000000..4b2ebcba3f92 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbProgress.java @@ -0,0 +1,396 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class for MongoDB migration outputs. + */ +public class MongoDbProgress { + /** + * The number of document bytes copied during the Copying stage. + */ + @JsonProperty(value = "bytesCopied", required = true) + private long bytesCopied; + + /** + * The number of documents copied during the Copying stage. + */ + @JsonProperty(value = "documentsCopied", required = true) + private long documentsCopied; + + /** + * The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. TimeSpan + * format). + */ + @JsonProperty(value = "elapsedTime", required = true) + private String elapsedTime; + + /** + * The errors and warnings that have occurred for the current object. The + * keys are the error codes. + */ + @JsonProperty(value = "errors", required = true) + private Map errors; + + /** + * The number of oplog events awaiting replay. + */ + @JsonProperty(value = "eventsPending", required = true) + private long eventsPending; + + /** + * The number of oplog events replayed so far. + */ + @JsonProperty(value = "eventsReplayed", required = true) + private long eventsReplayed; + + /** + * The timestamp of the last oplog event received, or null if no oplog + * event has been received yet. + */ + @JsonProperty(value = "lastEventTime") + private DateTime lastEventTime; + + /** + * The timestamp of the last oplog event replayed, or null if no oplog + * event has been replayed yet. + */ + @JsonProperty(value = "lastReplayTime") + private DateTime lastReplayTime; + + /** + * The name of the progress object. For a collection, this is the + * unqualified collection name. For a database, this is the database name. + * For the overall migration, this is null. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The qualified name of the progress object. For a collection, this is the + * database-qualified name. For a database, this is the database name. For + * the overall migration, this is null. + */ + @JsonProperty(value = "qualifiedName") + private String qualifiedName; + + /** + * The type of progress object. Possible values include: 'Migration', + * 'Database', 'Collection'. + */ + @JsonProperty(value = "resultType", required = true) + private String resultType; + + /** + * Possible values include: 'NotStarted', 'ValidatingInput', + * 'Initializing', 'Restarting', 'Copying', 'InitialReplay', 'Replaying', + * 'Finalizing', 'Complete', 'Canceled', 'Failed'. + */ + @JsonProperty(value = "state", required = true) + private MongoDbMigrationState state; + + /** + * The total number of document bytes on the source at the beginning of the + * Copying stage, or -1 if the total size was unknown. + */ + @JsonProperty(value = "totalBytes", required = true) + private long totalBytes; + + /** + * The total number of documents on the source at the beginning of the + * Copying stage, or -1 if the total count was unknown. + */ + @JsonProperty(value = "totalDocuments", required = true) + private long totalDocuments; + + /** + * Get the number of document bytes copied during the Copying stage. + * + * @return the bytesCopied value + */ + public long bytesCopied() { + return this.bytesCopied; + } + + /** + * Set the number of document bytes copied during the Copying stage. + * + * @param bytesCopied the bytesCopied value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withBytesCopied(long bytesCopied) { + this.bytesCopied = bytesCopied; + return this; + } + + /** + * Get the number of documents copied during the Copying stage. + * + * @return the documentsCopied value + */ + public long documentsCopied() { + return this.documentsCopied; + } + + /** + * Set the number of documents copied during the Copying stage. + * + * @param documentsCopied the documentsCopied value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withDocumentsCopied(long documentsCopied) { + this.documentsCopied = documentsCopied; + return this; + } + + /** + * Get the elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. TimeSpan format). + * + * @return the elapsedTime value + */ + public String elapsedTime() { + return this.elapsedTime; + } + + /** + * Set the elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. TimeSpan format). + * + * @param elapsedTime the elapsedTime value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withElapsedTime(String elapsedTime) { + this.elapsedTime = elapsedTime; + return this; + } + + /** + * Get the errors and warnings that have occurred for the current object. The keys are the error codes. + * + * @return the errors value + */ + public Map errors() { + return this.errors; + } + + /** + * Set the errors and warnings that have occurred for the current object. The keys are the error codes. + * + * @param errors the errors value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withErrors(Map errors) { + this.errors = errors; + return this; + } + + /** + * Get the number of oplog events awaiting replay. + * + * @return the eventsPending value + */ + public long eventsPending() { + return this.eventsPending; + } + + /** + * Set the number of oplog events awaiting replay. + * + * @param eventsPending the eventsPending value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withEventsPending(long eventsPending) { + this.eventsPending = eventsPending; + return this; + } + + /** + * Get the number of oplog events replayed so far. + * + * @return the eventsReplayed value + */ + public long eventsReplayed() { + return this.eventsReplayed; + } + + /** + * Set the number of oplog events replayed so far. + * + * @param eventsReplayed the eventsReplayed value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withEventsReplayed(long eventsReplayed) { + this.eventsReplayed = eventsReplayed; + return this; + } + + /** + * Get the timestamp of the last oplog event received, or null if no oplog event has been received yet. + * + * @return the lastEventTime value + */ + public DateTime lastEventTime() { + return this.lastEventTime; + } + + /** + * Set the timestamp of the last oplog event received, or null if no oplog event has been received yet. + * + * @param lastEventTime the lastEventTime value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withLastEventTime(DateTime lastEventTime) { + this.lastEventTime = lastEventTime; + return this; + } + + /** + * Get the timestamp of the last oplog event replayed, or null if no oplog event has been replayed yet. + * + * @return the lastReplayTime value + */ + public DateTime lastReplayTime() { + return this.lastReplayTime; + } + + /** + * Set the timestamp of the last oplog event replayed, or null if no oplog event has been replayed yet. + * + * @param lastReplayTime the lastReplayTime value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withLastReplayTime(DateTime lastReplayTime) { + this.lastReplayTime = lastReplayTime; + return this; + } + + /** + * Get the name of the progress object. For a collection, this is the unqualified collection name. For a database, this is the database name. For the overall migration, this is null. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the progress object. For a collection, this is the unqualified collection name. For a database, this is the database name. For the overall migration, this is null. + * + * @param name the name value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withName(String name) { + this.name = name; + return this; + } + + /** + * Get the qualified name of the progress object. For a collection, this is the database-qualified name. For a database, this is the database name. For the overall migration, this is null. + * + * @return the qualifiedName value + */ + public String qualifiedName() { + return this.qualifiedName; + } + + /** + * Set the qualified name of the progress object. For a collection, this is the database-qualified name. For a database, this is the database name. For the overall migration, this is null. + * + * @param qualifiedName the qualifiedName value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withQualifiedName(String qualifiedName) { + this.qualifiedName = qualifiedName; + return this; + } + + /** + * Get the type of progress object. Possible values include: 'Migration', 'Database', 'Collection'. + * + * @return the resultType value + */ + public String resultType() { + return this.resultType; + } + + /** + * Set the type of progress object. Possible values include: 'Migration', 'Database', 'Collection'. + * + * @param resultType the resultType value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withResultType(String resultType) { + this.resultType = resultType; + return this; + } + + /** + * Get possible values include: 'NotStarted', 'ValidatingInput', 'Initializing', 'Restarting', 'Copying', 'InitialReplay', 'Replaying', 'Finalizing', 'Complete', 'Canceled', 'Failed'. + * + * @return the state value + */ + public MongoDbMigrationState state() { + return this.state; + } + + /** + * Set possible values include: 'NotStarted', 'ValidatingInput', 'Initializing', 'Restarting', 'Copying', 'InitialReplay', 'Replaying', 'Finalizing', 'Complete', 'Canceled', 'Failed'. + * + * @param state the state value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withState(MongoDbMigrationState state) { + this.state = state; + return this; + } + + /** + * Get the total number of document bytes on the source at the beginning of the Copying stage, or -1 if the total size was unknown. + * + * @return the totalBytes value + */ + public long totalBytes() { + return this.totalBytes; + } + + /** + * Set the total number of document bytes on the source at the beginning of the Copying stage, or -1 if the total size was unknown. + * + * @param totalBytes the totalBytes value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withTotalBytes(long totalBytes) { + this.totalBytes = totalBytes; + return this; + } + + /** + * Get the total number of documents on the source at the beginning of the Copying stage, or -1 if the total count was unknown. + * + * @return the totalDocuments value + */ + public long totalDocuments() { + return this.totalDocuments; + } + + /** + * Set the total number of documents on the source at the beginning of the Copying stage, or -1 if the total count was unknown. + * + * @param totalDocuments the totalDocuments value to set + * @return the MongoDbProgress object itself. + */ + public MongoDbProgress withTotalDocuments(long totalDocuments) { + this.totalDocuments = totalDocuments; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbReplication.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbReplication.java new file mode 100644 index 000000000000..dbe888b069a2 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbReplication.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MongoDbReplication. + */ +public final class MongoDbReplication extends ExpandableStringEnum { + /** Static value Disabled for MongoDbReplication. */ + public static final MongoDbReplication DISABLED = fromString("Disabled"); + + /** Static value OneTime for MongoDbReplication. */ + public static final MongoDbReplication ONE_TIME = fromString("OneTime"); + + /** Static value Continuous for MongoDbReplication. */ + public static final MongoDbReplication CONTINUOUS = fromString("Continuous"); + + /** + * Creates or finds a MongoDbReplication from its string representation. + * @param name a name to look for + * @return the corresponding MongoDbReplication + */ + @JsonCreator + public static MongoDbReplication fromString(String name) { + return fromString(name, MongoDbReplication.class); + } + + /** + * @return known MongoDbReplication values + */ + public static Collection values() { + return values(MongoDbReplication.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbRestartCommand.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbRestartCommand.java new file mode 100644 index 000000000000..397172aa0372 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbRestartCommand.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.azuredatabasemigrationservice.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation.CommandPropertiesInner; + +/** + * Properties for the command that restarts a migration in whole or in part. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") +@JsonTypeName("restart") +public class MongoDbRestartCommand extends CommandPropertiesInner { + /** + * Command input. + */ + @JsonProperty(value = "input") + private MongoDbCommandInput input; + + /** + * Get command input. + * + * @return the input value + */ + public MongoDbCommandInput input() { + return this.input; + } + + /** + * Set command input. + * + * @param input the input value to set + * @return the MongoDbRestartCommand object itself. + */ + public MongoDbRestartCommand withInput(MongoDbCommandInput input) { + this.input = input; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyField.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyField.java new file mode 100644 index 000000000000..24f0f6a13ed4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyField.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a field reference within a MongoDB shard key. + */ +public class MongoDbShardKeyField { + /** + * The name of the field. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The field ordering. Possible values include: 'Forward', 'Reverse', + * 'Hashed'. + */ + @JsonProperty(value = "order", required = true) + private MongoDbShardKeyOrder order; + + /** + * Get the name of the field. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the field. + * + * @param name the name value to set + * @return the MongoDbShardKeyField object itself. + */ + public MongoDbShardKeyField withName(String name) { + this.name = name; + return this; + } + + /** + * Get the field ordering. Possible values include: 'Forward', 'Reverse', 'Hashed'. + * + * @return the order value + */ + public MongoDbShardKeyOrder order() { + return this.order; + } + + /** + * Set the field ordering. Possible values include: 'Forward', 'Reverse', 'Hashed'. + * + * @param order the order value to set + * @return the MongoDbShardKeyField object itself. + */ + public MongoDbShardKeyField withOrder(MongoDbShardKeyOrder order) { + this.order = order; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyInfo.java new file mode 100644 index 000000000000..ff97eb06151f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyInfo.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a MongoDB shard key. + */ +public class MongoDbShardKeyInfo { + /** + * The fields within the shard key. + */ + @JsonProperty(value = "fields", required = true) + private List fields; + + /** + * Whether the shard key is unique. + */ + @JsonProperty(value = "isUnique", required = true) + private boolean isUnique; + + /** + * Get the fields within the shard key. + * + * @return the fields value + */ + public List fields() { + return this.fields; + } + + /** + * Set the fields within the shard key. + * + * @param fields the fields value to set + * @return the MongoDbShardKeyInfo object itself. + */ + public MongoDbShardKeyInfo withFields(List fields) { + this.fields = fields; + return this; + } + + /** + * Get whether the shard key is unique. + * + * @return the isUnique value + */ + public boolean isUnique() { + return this.isUnique; + } + + /** + * Set whether the shard key is unique. + * + * @param isUnique the isUnique value to set + * @return the MongoDbShardKeyInfo object itself. + */ + public MongoDbShardKeyInfo withIsUnique(boolean isUnique) { + this.isUnique = isUnique; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyOrder.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyOrder.java new file mode 100644 index 000000000000..56a75391e789 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeyOrder.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MongoDbShardKeyOrder. + */ +public final class MongoDbShardKeyOrder extends ExpandableStringEnum { + /** Static value Forward for MongoDbShardKeyOrder. */ + public static final MongoDbShardKeyOrder FORWARD = fromString("Forward"); + + /** Static value Reverse for MongoDbShardKeyOrder. */ + public static final MongoDbShardKeyOrder REVERSE = fromString("Reverse"); + + /** Static value Hashed for MongoDbShardKeyOrder. */ + public static final MongoDbShardKeyOrder HASHED = fromString("Hashed"); + + /** + * Creates or finds a MongoDbShardKeyOrder from its string representation. + * @param name a name to look for + * @return the corresponding MongoDbShardKeyOrder + */ + @JsonCreator + public static MongoDbShardKeyOrder fromString(String name) { + return fromString(name, MongoDbShardKeyOrder.class); + } + + /** + * @return known MongoDbShardKeyOrder values + */ + public static Collection values() { + return values(MongoDbShardKeyOrder.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeySetting.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeySetting.java new file mode 100644 index 000000000000..5188248af688 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbShardKeySetting.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a MongoDB shard key. + */ +public class MongoDbShardKeySetting { + /** + * The fields within the shard key. + */ + @JsonProperty(value = "fields", required = true) + private List fields; + + /** + * Whether the shard key is unique. + */ + @JsonProperty(value = "isUnique", required = true) + private boolean isUnique; + + /** + * Get the fields within the shard key. + * + * @return the fields value + */ + public List fields() { + return this.fields; + } + + /** + * Set the fields within the shard key. + * + * @param fields the fields value to set + * @return the MongoDbShardKeySetting object itself. + */ + public MongoDbShardKeySetting withFields(List fields) { + this.fields = fields; + return this; + } + + /** + * Get whether the shard key is unique. + * + * @return the isUnique value + */ + public boolean isUnique() { + return this.isUnique; + } + + /** + * Set whether the shard key is unique. + * + * @param isUnique the isUnique value to set + * @return the MongoDbShardKeySetting object itself. + */ + public MongoDbShardKeySetting withIsUnique(boolean isUnique) { + this.isUnique = isUnique; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbThrottlingSettings.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbThrottlingSettings.java new file mode 100644 index 000000000000..a0893aa18001 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MongoDbThrottlingSettings.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifies resource limits for the migration. + */ +public class MongoDbThrottlingSettings { + /** + * The percentage of CPU time that the migrator will try to avoid using, + * from 0 to 100. + */ + @JsonProperty(value = "minFreeCpu") + private Integer minFreeCpu; + + /** + * The number of megabytes of RAM that the migrator will try to avoid + * using. + */ + @JsonProperty(value = "minFreeMemoryMb") + private Integer minFreeMemoryMb; + + /** + * The maximum number of work items (e.g. collection copies) that will be + * processed in parallel. + */ + @JsonProperty(value = "maxParallelism") + private Integer maxParallelism; + + /** + * Get the percentage of CPU time that the migrator will try to avoid using, from 0 to 100. + * + * @return the minFreeCpu value + */ + public Integer minFreeCpu() { + return this.minFreeCpu; + } + + /** + * Set the percentage of CPU time that the migrator will try to avoid using, from 0 to 100. + * + * @param minFreeCpu the minFreeCpu value to set + * @return the MongoDbThrottlingSettings object itself. + */ + public MongoDbThrottlingSettings withMinFreeCpu(Integer minFreeCpu) { + this.minFreeCpu = minFreeCpu; + return this; + } + + /** + * Get the number of megabytes of RAM that the migrator will try to avoid using. + * + * @return the minFreeMemoryMb value + */ + public Integer minFreeMemoryMb() { + return this.minFreeMemoryMb; + } + + /** + * Set the number of megabytes of RAM that the migrator will try to avoid using. + * + * @param minFreeMemoryMb the minFreeMemoryMb value to set + * @return the MongoDbThrottlingSettings object itself. + */ + public MongoDbThrottlingSettings withMinFreeMemoryMb(Integer minFreeMemoryMb) { + this.minFreeMemoryMb = minFreeMemoryMb; + return this; + } + + /** + * Get the maximum number of work items (e.g. collection copies) that will be processed in parallel. + * + * @return the maxParallelism value + */ + public Integer maxParallelism() { + return this.maxParallelism; + } + + /** + * Set the maximum number of work items (e.g. collection copies) that will be processed in parallel. + * + * @param maxParallelism the maxParallelism value to set + * @return the MongoDbThrottlingSettings object itself. + */ + public MongoDbThrottlingSettings withMaxParallelism(Integer maxParallelism) { + this.maxParallelism = maxParallelism; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MySqlConnectionInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MySqlConnectionInfo.java new file mode 100644 index 000000000000..351f0f324035 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MySqlConnectionInfo.java @@ -0,0 +1,73 @@ +/** + * 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.azuredatabasemigrationservice.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 MySQL server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("MySqlConnectionInfo") +public class MySqlConnectionInfo extends ConnectionInfo { + /** + * Name of the server. + */ + @JsonProperty(value = "serverName", required = true) + private String serverName; + + /** + * Port for Server. + */ + @JsonProperty(value = "port", required = true) + private int port; + + /** + * Get name of the server. + * + * @return the serverName value + */ + public String serverName() { + return this.serverName; + } + + /** + * Set name of the server. + * + * @param serverName the serverName value to set + * @return the MySqlConnectionInfo object itself. + */ + public MySqlConnectionInfo withServerName(String serverName) { + this.serverName = serverName; + return this; + } + + /** + * Get port for Server. + * + * @return the port value + */ + public int port() { + return this.port; + } + + /** + * Set port for Server. + * + * @param port the port value to set + * @return the MySqlConnectionInfo object itself. + */ + public MySqlConnectionInfo withPort(int port) { + this.port = port; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MySqlTargetPlatformType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MySqlTargetPlatformType.java new file mode 100644 index 000000000000..e5e79ddf3fb6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/MySqlTargetPlatformType.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for MySqlTargetPlatformType. + */ +public final class MySqlTargetPlatformType extends ExpandableStringEnum { + /** Static value AzureDbForMySQL for MySqlTargetPlatformType. */ + public static final MySqlTargetPlatformType AZURE_DB_FOR_MY_SQL = fromString("AzureDbForMySQL"); + + /** + * Creates or finds a MySqlTargetPlatformType from its string representation. + * @param name a name to look for + * @return the corresponding MySqlTargetPlatformType + */ + @JsonCreator + public static MySqlTargetPlatformType fromString(String name) { + return fromString(name, MySqlTargetPlatformType.class); + } + + /** + * @return known MySqlTargetPlatformType values + */ + public static Collection values() { + return values(MySqlTargetPlatformType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameAvailabilityRequest.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameAvailabilityRequest.java new file mode 100644 index 000000000000..74d8d4a67347 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameAvailabilityRequest.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A resource type and proposed name. + */ +public class NameAvailabilityRequest { + /** + * The proposed resource name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The resource type chain (e.g. virtualMachines/extensions). + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the proposed resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the proposed resource name. + * + * @param name the name value to set + * @return the NameAvailabilityRequest object itself. + */ + public NameAvailabilityRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource type chain (e.g. virtualMachines/extensions). + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the resource type chain (e.g. virtualMachines/extensions). + * + * @param type the type value to set + * @return the NameAvailabilityRequest object itself. + */ + public NameAvailabilityRequest withType(String type) { + this.type = type; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameAvailabilityResponse.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameAvailabilityResponse.java new file mode 100644 index 000000000000..7535071c1464 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameAvailabilityResponse.java @@ -0,0 +1,35 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.NameAvailabilityResponseInner; + +/** + * Type representing NameAvailabilityResponse. + */ +public interface NameAvailabilityResponse extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + NameCheckFailureReason reason(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameCheckFailureReason.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameCheckFailureReason.java new file mode 100644 index 000000000000..2fe7642e2fa0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NameCheckFailureReason.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for NameCheckFailureReason. + */ +public final class NameCheckFailureReason extends ExpandableStringEnum { + /** Static value AlreadyExists for NameCheckFailureReason. */ + public static final NameCheckFailureReason ALREADY_EXISTS = fromString("AlreadyExists"); + + /** Static value Invalid for NameCheckFailureReason. */ + public static final NameCheckFailureReason INVALID = fromString("Invalid"); + + /** + * Creates or finds a NameCheckFailureReason from its string representation. + * @param name a name to look for + * @return the corresponding NameCheckFailureReason + */ + @JsonCreator + public static NameCheckFailureReason fromString(String name) { + return fromString(name, NameCheckFailureReason.class); + } + + /** + * @return known NameCheckFailureReason values + */ + public static Collection values() { + return values(NameCheckFailureReason.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlDataMigrationTable.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlDataMigrationTable.java new file mode 100644 index 000000000000..550e3147f928 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlDataMigrationTable.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines metadata for table to be migrated. + */ +public class NonSqlDataMigrationTable { + /** + * Source table name. + */ + @JsonProperty(value = "sourceName") + private String sourceName; + + /** + * Get source table name. + * + * @return the sourceName value + */ + public String sourceName() { + return this.sourceName; + } + + /** + * Set source table name. + * + * @param sourceName the sourceName value to set + * @return the NonSqlDataMigrationTable object itself. + */ + public NonSqlDataMigrationTable withSourceName(String sourceName) { + this.sourceName = sourceName; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlDataMigrationTableResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlDataMigrationTableResult.java new file mode 100644 index 000000000000..e132d8068c10 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlDataMigrationTableResult.java @@ -0,0 +1,125 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object used to report the data migration results of a table. + */ +public class NonSqlDataMigrationTableResult { + /** + * Result code of the data migration. Possible values include: 'Initial', + * 'Completed', 'ObjectNotExistsInSource', 'ObjectNotExistsInTarget', + * 'TargetObjectIsInaccessible', 'FatalError'. + */ + @JsonProperty(value = "resultCode", access = JsonProperty.Access.WRITE_ONLY) + private DataMigrationResultCode resultCode; + + /** + * Name of the source table. + */ + @JsonProperty(value = "sourceName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceName; + + /** + * Name of the target table. + */ + @JsonProperty(value = "targetName", access = JsonProperty.Access.WRITE_ONLY) + private String targetName; + + /** + * Number of rows in the source table. + */ + @JsonProperty(value = "sourceRowCount", access = JsonProperty.Access.WRITE_ONLY) + private Long sourceRowCount; + + /** + * Number of rows in the target table. + */ + @JsonProperty(value = "targetRowCount", access = JsonProperty.Access.WRITE_ONLY) + private Long targetRowCount; + + /** + * Time taken to migrate the data. + */ + @JsonProperty(value = "elapsedTimeInMiliseconds", access = JsonProperty.Access.WRITE_ONLY) + private Double elapsedTimeInMiliseconds; + + /** + * List of errors, if any, during migration. + */ + @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; + + /** + * Get result code of the data migration. Possible values include: 'Initial', 'Completed', 'ObjectNotExistsInSource', 'ObjectNotExistsInTarget', 'TargetObjectIsInaccessible', 'FatalError'. + * + * @return the resultCode value + */ + public DataMigrationResultCode resultCode() { + return this.resultCode; + } + + /** + * Get name of the source table. + * + * @return the sourceName value + */ + public String sourceName() { + return this.sourceName; + } + + /** + * Get name of the target table. + * + * @return the targetName value + */ + public String targetName() { + return this.targetName; + } + + /** + * Get number of rows in the source table. + * + * @return the sourceRowCount value + */ + public Long sourceRowCount() { + return this.sourceRowCount; + } + + /** + * Get number of rows in the target table. + * + * @return the targetRowCount value + */ + public Long targetRowCount() { + return this.targetRowCount; + } + + /** + * Get time taken to migrate the data. + * + * @return the elapsedTimeInMiliseconds value + */ + public Double elapsedTimeInMiliseconds() { + return this.elapsedTimeInMiliseconds; + } + + /** + * Get list of errors, if any, during migration. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlMigrationTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlMigrationTaskInput.java new file mode 100644 index 000000000000..4d0f3cb785da --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlMigrationTaskInput.java @@ -0,0 +1,148 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class for non sql migration task input. + */ +public class NonSqlMigrationTaskInput { + /** + * Information for connecting to target. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Target database name. + */ + @JsonProperty(value = "targetDatabaseName", required = true) + private String targetDatabaseName; + + /** + * Name of the migration project. + */ + @JsonProperty(value = "projectName", required = true) + private String projectName; + + /** + * A URL that points to the drop location to access project artifacts. + */ + @JsonProperty(value = "projectLocation", required = true) + private String projectLocation; + + /** + * Metadata of the tables selected for migration. + */ + @JsonProperty(value = "selectedTables", required = true) + private List selectedTables; + + /** + * Get information for connecting to target. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set information for connecting to target. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the NonSqlMigrationTaskInput object itself. + */ + public NonSqlMigrationTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * Get target database name. + * + * @return the targetDatabaseName value + */ + public String targetDatabaseName() { + return this.targetDatabaseName; + } + + /** + * Set target database name. + * + * @param targetDatabaseName the targetDatabaseName value to set + * @return the NonSqlMigrationTaskInput object itself. + */ + public NonSqlMigrationTaskInput withTargetDatabaseName(String targetDatabaseName) { + this.targetDatabaseName = targetDatabaseName; + return this; + } + + /** + * Get name of the migration project. + * + * @return the projectName value + */ + public String projectName() { + return this.projectName; + } + + /** + * Set name of the migration project. + * + * @param projectName the projectName value to set + * @return the NonSqlMigrationTaskInput object itself. + */ + public NonSqlMigrationTaskInput withProjectName(String projectName) { + this.projectName = projectName; + return this; + } + + /** + * Get a URL that points to the drop location to access project artifacts. + * + * @return the projectLocation value + */ + public String projectLocation() { + return this.projectLocation; + } + + /** + * Set a URL that points to the drop location to access project artifacts. + * + * @param projectLocation the projectLocation value to set + * @return the NonSqlMigrationTaskInput object itself. + */ + public NonSqlMigrationTaskInput withProjectLocation(String projectLocation) { + this.projectLocation = projectLocation; + return this; + } + + /** + * Get metadata of the tables selected for migration. + * + * @return the selectedTables value + */ + public List selectedTables() { + return this.selectedTables; + } + + /** + * Set metadata of the tables selected for migration. + * + * @param selectedTables the selectedTables value to set + * @return the NonSqlMigrationTaskInput object itself. + */ + public NonSqlMigrationTaskInput withSelectedTables(List selectedTables) { + this.selectedTables = selectedTables; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlMigrationTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlMigrationTaskOutput.java new file mode 100644 index 000000000000..1c3f7e902b58 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/NonSqlMigrationTaskOutput.java @@ -0,0 +1,142 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import org.joda.time.DateTime; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class for non sql migration task output. + */ +public class NonSqlMigrationTaskOutput { + /** + * Result identifier. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * 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 state 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; + + /** + * Results of the migration. The key contains the table name and the value + * the table result object. + */ + @JsonProperty(value = "dataMigrationTableResults", access = JsonProperty.Access.WRITE_ONLY) + private Map dataMigrationTableResults; + + /** + * Message about the progress of the migration. + */ + @JsonProperty(value = "progressMessage", access = JsonProperty.Access.WRITE_ONLY) + private String progressMessage; + + /** + * Name of source server. + */ + @JsonProperty(value = "sourceServerName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceServerName; + + /** + * Name of target server. + */ + @JsonProperty(value = "targetServerName", access = JsonProperty.Access.WRITE_ONLY) + private String targetServerName; + + /** + * Get result identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * 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 state 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 results of the migration. The key contains the table name and the value the table result object. + * + * @return the dataMigrationTableResults value + */ + public Map dataMigrationTableResults() { + return this.dataMigrationTableResults; + } + + /** + * Get message about the progress of the migration. + * + * @return the progressMessage value + */ + public String progressMessage() { + return this.progressMessage; + } + + /** + * Get name of source server. + * + * @return the sourceServerName value + */ + public String sourceServerName() { + return this.sourceServerName; + } + + /** + * Get name of target server. + * + * @return the targetServerName value + */ + public String targetServerName() { + return this.targetServerName; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ODataError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ODataError.java new file mode 100644 index 000000000000..2f47cd927b94 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ODataError.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error information in OData format. + */ +public class ODataError { + /** + * The machine-readable description of the error, such as 'InvalidRequest' + * or 'InternalServerError'. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The human-readable description of the error. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Inner errors that caused this error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get the machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError'. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError'. + * + * @param code the code value to set + * @return the ODataError object itself. + */ + public ODataError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the human-readable description of the error. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the human-readable description of the error. + * + * @param message the message value to set + * @return the ODataError object itself. + */ + public ODataError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get inner errors that caused this error. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set inner errors that caused this error. + * + * @param details the details value to set + * @return the ODataError object itself. + */ + public ODataError withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ObjectType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ObjectType.java new file mode 100644 index 000000000000..b11782937139 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ObjectType.java @@ -0,0 +1,50 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ObjectType. + */ +public final class ObjectType extends ExpandableStringEnum { + /** Static value StoredProcedures for ObjectType. */ + public static final ObjectType STORED_PROCEDURES = fromString("StoredProcedures"); + + /** Static value Table for ObjectType. */ + public static final ObjectType TABLE = fromString("Table"); + + /** Static value User for ObjectType. */ + public static final ObjectType USER = fromString("User"); + + /** Static value View for ObjectType. */ + public static final ObjectType VIEW = fromString("View"); + + /** Static value Function for ObjectType. */ + public static final ObjectType FUNCTION = fromString("Function"); + + /** + * Creates or finds a ObjectType from its string representation. + * @param name a name to look for + * @return the corresponding ObjectType + */ + @JsonCreator + public static ObjectType fromString(String name) { + return fromString(name, ObjectType.class); + } + + /** + * @return known ObjectType values + */ + public static Collection values() { + return values(ObjectType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Operations.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Operations.java new file mode 100644 index 000000000000..8d580845a583 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Operations.java @@ -0,0 +1,28 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/PostgreSqlConnectionInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/PostgreSqlConnectionInfo.java new file mode 100644 index 000000000000..e4556f117401 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/PostgreSqlConnectionInfo.java @@ -0,0 +1,99 @@ +/** + * 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.azuredatabasemigrationservice.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 PostgreSQL server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("PostgreSqlConnectionInfo") +public class PostgreSqlConnectionInfo extends ConnectionInfo { + /** + * Name of the server. + */ + @JsonProperty(value = "serverName", required = true) + private String serverName; + + /** + * Name of the database. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /** + * Port for Server. + */ + @JsonProperty(value = "port", required = true) + private int port; + + /** + * Get name of the server. + * + * @return the serverName value + */ + public String serverName() { + return this.serverName; + } + + /** + * Set name of the server. + * + * @param serverName the serverName value to set + * @return the PostgreSqlConnectionInfo object itself. + */ + public PostgreSqlConnectionInfo withServerName(String serverName) { + this.serverName = serverName; + return this; + } + + /** + * Get name of the database. + * + * @return the databaseName value + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set name of the database. + * + * @param databaseName the databaseName value to set + * @return the PostgreSqlConnectionInfo object itself. + */ + public PostgreSqlConnectionInfo withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get port for Server. + * + * @return the port value + */ + public int port() { + return this.port; + } + + /** + * Set port for Server. + * + * @param port the port value to set + * @return the PostgreSqlConnectionInfo object itself. + */ + public PostgreSqlConnectionInfo withPort(int port) { + this.port = port; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Project.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Project.java new file mode 100644 index 000000000000..e291c06d0770 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Project.java @@ -0,0 +1,268 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.ProjectInner; +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.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; +import java.util.Map; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing Project. + */ +public interface Project extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the creationTime value. + */ + DateTime creationTime(); + + /** + * @return the databasesInfo value. + */ + List databasesInfo(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProjectProvisioningState provisioningState(); + + /** + * @return the sourceConnectionInfo value. + */ + ConnectionInfo sourceConnectionInfo(); + + /** + * @return the sourcePlatform value. + */ + ProjectSourcePlatform sourcePlatform(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the targetConnectionInfo value. + */ + ConnectionInfo targetConnectionInfo(); + + /** + * @return the targetPlatform value. + */ + ProjectTargetPlatform targetPlatform(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the Project definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithService, DefinitionStages.WithLocation, DefinitionStages.WithSourcePlatform, DefinitionStages.WithTargetPlatform, DefinitionStages.WithCreate { + } + + /** + * Grouping of Project definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Project definition. + */ + interface Blank extends WithService { + } + + /** + * The stage of the project 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 + */ + WithLocation withExistingService(String groupName, String serviceName); + } + + /** + * The stage of the project definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource location + * @return the next definition stage + */ + WithSourcePlatform withLocation(String location); + } + + /** + * The stage of the project definition allowing to specify SourcePlatform. + */ + interface WithSourcePlatform { + /** + * Specifies sourcePlatform. + * @param sourcePlatform Source platform for the project. Possible values include: 'SQL', 'MySQL', 'PostgreSql', 'MongoDb', 'Unknown' + * @return the next definition stage + */ + WithTargetPlatform withSourcePlatform(ProjectSourcePlatform sourcePlatform); + } + + /** + * The stage of the project definition allowing to specify TargetPlatform. + */ + interface WithTargetPlatform { + /** + * Specifies targetPlatform. + * @param targetPlatform Target platform for the project. Possible values include: 'SQLDB', 'SQLMI', 'AzureDbForMySql', 'AzureDbForPostgreSql', 'MongoDb', 'Unknown' + * @return the next definition stage + */ + WithCreate withTargetPlatform(ProjectTargetPlatform targetPlatform); + } + + /** + * The stage of the project definition allowing to specify DatabasesInfo. + */ + interface WithDatabasesInfo { + /** + * Specifies databasesInfo. + * @param databasesInfo List of DatabaseInfo + * @return the next definition stage + */ + WithCreate withDatabasesInfo(List databasesInfo); + } + + /** + * The stage of the project definition allowing to specify SourceConnectionInfo. + */ + interface WithSourceConnectionInfo { + /** + * Specifies sourceConnectionInfo. + * @param sourceConnectionInfo Information for connecting to source + * @return the next definition stage + */ + WithCreate withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo); + } + + /** + * The stage of the project definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the project definition allowing to specify TargetConnectionInfo. + */ + interface WithTargetConnectionInfo { + /** + * Specifies targetConnectionInfo. + * @param targetConnectionInfo Information for connecting to target + * @return the next definition stage + */ + WithCreate withTargetConnectionInfo(ConnectionInfo targetConnectionInfo); + } + + /** + * 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.WithDatabasesInfo, DefinitionStages.WithSourceConnectionInfo, DefinitionStages.WithTags, DefinitionStages.WithTargetConnectionInfo { + } + } + /** + * The template for a Project update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithDatabasesInfo, UpdateStages.WithSourceConnectionInfo, UpdateStages.WithTags, UpdateStages.WithTargetConnectionInfo { + } + + /** + * Grouping of Project update stages. + */ + interface UpdateStages { + /** + * The stage of the project update allowing to specify DatabasesInfo. + */ + interface WithDatabasesInfo { + /** + * Specifies databasesInfo. + * @param databasesInfo List of DatabaseInfo + * @return the next update stage + */ + Update withDatabasesInfo(List databasesInfo); + } + + /** + * The stage of the project update allowing to specify SourceConnectionInfo. + */ + interface WithSourceConnectionInfo { + /** + * Specifies sourceConnectionInfo. + * @param sourceConnectionInfo Information for connecting to source + * @return the next update stage + */ + Update withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo); + } + + /** + * The stage of the project update allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next update stage + */ + Update withTags(Map tags); + } + + /** + * The stage of the project update allowing to specify TargetConnectionInfo. + */ + interface WithTargetConnectionInfo { + /** + * Specifies targetConnectionInfo. + * @param targetConnectionInfo Information for connecting to target + * @return the next update stage + */ + Update withTargetConnectionInfo(ConnectionInfo targetConnectionInfo); + } + + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectFile.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectFile.java new file mode 100644 index 000000000000..527d90bfd37a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectFile.java @@ -0,0 +1,147 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.ProjectFileInner; +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.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; + +/** + * Type representing ProjectFile. + */ +public interface ProjectFile 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. + */ + ProjectFileProperties properties(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ProjectFile definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProject, DefinitionStages.WithCreate { + } + + /** + * Grouping of ProjectFile definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ProjectFile definition. + */ + interface Blank extends WithProject { + } + + /** + * The stage of the projectfile definition allowing to specify Project. + */ + interface WithProject { + /** + * Specifies groupName, serviceName, projectName. + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @return the next definition stage + */ + WithCreate withExistingProject(String groupName, String serviceName, String projectName); + } + + /** + * The stage of the projectfile 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 projectfile definition allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Custom file properties + * @return the next definition stage + */ + WithCreate withProperties(ProjectFileProperties 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 ProjectFile update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithEtag, UpdateStages.WithProperties { + } + + /** + * Grouping of ProjectFile update stages. + */ + interface UpdateStages { + /** + * The stage of the projectfile 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 projectfile update allowing to specify Properties. + */ + interface WithProperties { + /** + * Specifies properties. + * @param properties Custom file properties + * @return the next update stage + */ + Update withProperties(ProjectFileProperties properties); + } + + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectFileProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectFileProperties.java new file mode 100644 index 000000000000..e06dcf658c1a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectFileProperties.java @@ -0,0 +1,129 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class for file properties. + */ +public class ProjectFileProperties { + /** + * Optional File extension. If submitted it should not have a leading + * period and must match the extension from filePath. + */ + @JsonProperty(value = "extension") + private String extension; + + /** + * Relative path of this file resource. This property can be set when + * creating or updating the file resource. + */ + @JsonProperty(value = "filePath") + private String filePath; + + /** + * Modification DateTime. + */ + @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastModified; + + /** + * File content type. This propery can be modified to reflect the file + * content type. + */ + @JsonProperty(value = "mediaType") + private String mediaType; + + /** + * File size. + */ + @JsonProperty(value = "size", access = JsonProperty.Access.WRITE_ONLY) + private Long size; + + /** + * Get optional File extension. If submitted it should not have a leading period and must match the extension from filePath. + * + * @return the extension value + */ + public String extension() { + return this.extension; + } + + /** + * Set optional File extension. If submitted it should not have a leading period and must match the extension from filePath. + * + * @param extension the extension value to set + * @return the ProjectFileProperties object itself. + */ + public ProjectFileProperties withExtension(String extension) { + this.extension = extension; + return this; + } + + /** + * Get relative path of this file resource. This property can be set when creating or updating the file resource. + * + * @return the filePath value + */ + public String filePath() { + return this.filePath; + } + + /** + * Set relative path of this file resource. This property can be set when creating or updating the file resource. + * + * @param filePath the filePath value to set + * @return the ProjectFileProperties object itself. + */ + public ProjectFileProperties withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get modification DateTime. + * + * @return the lastModified value + */ + public DateTime lastModified() { + return this.lastModified; + } + + /** + * Get file content type. This propery can be modified to reflect the file content type. + * + * @return the mediaType value + */ + public String mediaType() { + return this.mediaType; + } + + /** + * Set file content type. This propery can be modified to reflect the file content type. + * + * @param mediaType the mediaType value to set + * @return the ProjectFileProperties object itself. + */ + public ProjectFileProperties withMediaType(String mediaType) { + this.mediaType = mediaType; + return this; + } + + /** + * Get file size. + * + * @return the size value + */ + public Long size() { + return this.size; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectProvisioningState.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectProvisioningState.java new file mode 100644 index 000000000000..06cf1fd351af --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectProvisioningState.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProjectProvisioningState. + */ +public final class ProjectProvisioningState extends ExpandableStringEnum { + /** Static value Deleting for ProjectProvisioningState. */ + public static final ProjectProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for ProjectProvisioningState. */ + public static final ProjectProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Creates or finds a ProjectProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ProjectProvisioningState + */ + @JsonCreator + public static ProjectProvisioningState fromString(String name) { + return fromString(name, ProjectProvisioningState.class); + } + + /** + * @return known ProjectProvisioningState values + */ + public static Collection values() { + return values(ProjectProvisioningState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectSourcePlatform.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectSourcePlatform.java new file mode 100644 index 000000000000..e8147798d3a1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectSourcePlatform.java @@ -0,0 +1,50 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProjectSourcePlatform. + */ +public final class ProjectSourcePlatform extends ExpandableStringEnum { + /** Static value SQL for ProjectSourcePlatform. */ + public static final ProjectSourcePlatform SQL = fromString("SQL"); + + /** Static value MySQL for ProjectSourcePlatform. */ + public static final ProjectSourcePlatform MY_SQL = fromString("MySQL"); + + /** Static value PostgreSql for ProjectSourcePlatform. */ + public static final ProjectSourcePlatform POSTGRE_SQL = fromString("PostgreSql"); + + /** Static value MongoDb for ProjectSourcePlatform. */ + public static final ProjectSourcePlatform MONGO_DB = fromString("MongoDb"); + + /** Static value Unknown for ProjectSourcePlatform. */ + public static final ProjectSourcePlatform UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a ProjectSourcePlatform from its string representation. + * @param name a name to look for + * @return the corresponding ProjectSourcePlatform + */ + @JsonCreator + public static ProjectSourcePlatform fromString(String name) { + return fromString(name, ProjectSourcePlatform.class); + } + + /** + * @return known ProjectSourcePlatform values + */ + public static Collection values() { + return values(ProjectSourcePlatform.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTargetPlatform.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTargetPlatform.java new file mode 100644 index 000000000000..3e5761b740d6 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTargetPlatform.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProjectTargetPlatform. + */ +public final class ProjectTargetPlatform extends ExpandableStringEnum { + /** Static value SQLDB for ProjectTargetPlatform. */ + public static final ProjectTargetPlatform SQLDB = fromString("SQLDB"); + + /** Static value SQLMI for ProjectTargetPlatform. */ + public static final ProjectTargetPlatform SQLMI = fromString("SQLMI"); + + /** Static value AzureDbForMySql for ProjectTargetPlatform. */ + public static final ProjectTargetPlatform AZURE_DB_FOR_MY_SQL = fromString("AzureDbForMySql"); + + /** Static value AzureDbForPostgreSql for ProjectTargetPlatform. */ + public static final ProjectTargetPlatform AZURE_DB_FOR_POSTGRE_SQL = fromString("AzureDbForPostgreSql"); + + /** Static value MongoDb for ProjectTargetPlatform. */ + public static final ProjectTargetPlatform MONGO_DB = fromString("MongoDb"); + + /** Static value Unknown for ProjectTargetPlatform. */ + public static final ProjectTargetPlatform UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a ProjectTargetPlatform from its string representation. + * @param name a name to look for + * @return the corresponding ProjectTargetPlatform + */ + @JsonCreator + public static ProjectTargetPlatform fromString(String name) { + return fromString(name, ProjectTargetPlatform.class); + } + + /** + * @return known ProjectTargetPlatform values + */ + public static Collection values() { + return values(ProjectTargetPlatform.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTask.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTask.java new file mode 100644 index 000000000000..317be2fd998d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTask.java @@ -0,0 +1,147 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; + +/** + * Type representing ProjectTask. + */ +public interface ProjectTask 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 ProjectTask definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProject, DefinitionStages.WithCreate { + } + + /** + * Grouping of ProjectTask definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ProjectTask definition. + */ + interface Blank extends WithProject { + } + + /** + * The stage of the projecttask definition allowing to specify Project. + */ + interface WithProject { + /** + * Specifies groupName, serviceName, projectName. + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @return the next definition stage + */ + WithCreate withExistingProject(String groupName, String serviceName, String projectName); + } + + /** + * The stage of the projecttask 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 projecttask 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 ProjectTask update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithEtag, UpdateStages.WithProperties { + } + + /** + * Grouping of ProjectTask update stages. + */ + interface UpdateStages { + /** + * The stage of the projecttask 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 projecttask 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTaskProperties.java new file mode 100644 index 000000000000..36615d673156 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ProjectTaskProperties.java @@ -0,0 +1,103 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.CommandPropertiesInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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") +@JsonTypeName("Unknown") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class), + @JsonSubTypes.Type(name = "PostgreSqlConnectionInfo", value = PostgreSqlConnectionInfo.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 = "GetTDECertificates.Sql", value = GetTdeCertificatesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "Validate.MongoDb", value = ValidateMongoDbTaskProperties.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.SqlDb.Sync", value = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.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", value = MigrateSqlServerSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.MongoDb", value = MigrateMongoDbTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForMySql", value = ConnectToTargetAzureDbForMySqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTables.AzureSqlDb.Sync", value = GetUserTablesSqlSyncTaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb.Sync", value = ConnectToTargetSqlSqlDbSyncTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.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), + @JsonSubTypes.Type(name = "ConnectToSource.MySql", value = ConnectToSourceMySqlTaskProperties.class), + @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) +}) +public class ProjectTaskProperties { + /** + * Array of errors. This is ignored if submitted. + */ + @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; + + /** + * The state of the task. This is ignored if submitted. Possible values + * include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + * 'Failed', 'FailedInputValidation', 'Faulted'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private TaskState state; + + /** + * Array of command properties. + */ + @JsonProperty(value = "commands", access = JsonProperty.Access.WRITE_ONLY) + private List commands; + + /** + * Get array of errors. This is ignored if submitted. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + + /** + * Get the state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted'. + * + * @return the state value + */ + public TaskState state() { + return this.state; + } + + /** + * Get array of command properties. + * + * @return the commands value + */ + public List commands() { + return this.commands; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Projects.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Projects.java new file mode 100644 index 000000000000..f99b28f1c38f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Projects.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.ProjectsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Projects. + */ +public interface Projects extends SupportsCreating, HasInner { + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String groupName, String serviceName, String projectName); + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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 project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String groupName, String serviceName, String projectName); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QueryAnalysisValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QueryAnalysisValidationResult.java new file mode 100644 index 000000000000..d9890b033268 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QueryAnalysisValidationResult.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results for query analysis comparison between the source and target. + */ +public class QueryAnalysisValidationResult { + /** + * List of queries executed and it's execution results in source and + * target. + */ + @JsonProperty(value = "queryResults") + private QueryExecutionResult queryResults; + + /** + * Errors that are part of the execution. + */ + @JsonProperty(value = "validationErrors") + private ValidationError validationErrors; + + /** + * Get list of queries executed and it's execution results in source and target. + * + * @return the queryResults value + */ + public QueryExecutionResult queryResults() { + return this.queryResults; + } + + /** + * Set list of queries executed and it's execution results in source and target. + * + * @param queryResults the queryResults value to set + * @return the QueryAnalysisValidationResult object itself. + */ + public QueryAnalysisValidationResult withQueryResults(QueryExecutionResult queryResults) { + this.queryResults = queryResults; + return this; + } + + /** + * Get errors that are part of the execution. + * + * @return the validationErrors value + */ + public ValidationError validationErrors() { + return this.validationErrors; + } + + /** + * Set errors that are part of the execution. + * + * @param validationErrors the validationErrors value to set + * @return the QueryAnalysisValidationResult object itself. + */ + public QueryAnalysisValidationResult withValidationErrors(ValidationError validationErrors) { + this.validationErrors = validationErrors; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QueryExecutionResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QueryExecutionResult.java new file mode 100644 index 000000000000..b0f32436fd23 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QueryExecutionResult.java @@ -0,0 +1,121 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes query analysis results for execution in source and target. + */ +public class QueryExecutionResult { + /** + * Query text retrieved from the source server. + */ + @JsonProperty(value = "queryText") + private String queryText; + + /** + * Total no. of statements in the batch. + */ + @JsonProperty(value = "statementsInBatch") + private Long statementsInBatch; + + /** + * Query analysis result from the source. + */ + @JsonProperty(value = "sourceResult") + private ExecutionStatistics sourceResult; + + /** + * Query analysis result from the target. + */ + @JsonProperty(value = "targetResult") + private ExecutionStatistics targetResult; + + /** + * Get query text retrieved from the source server. + * + * @return the queryText value + */ + public String queryText() { + return this.queryText; + } + + /** + * Set query text retrieved from the source server. + * + * @param queryText the queryText value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withQueryText(String queryText) { + this.queryText = queryText; + return this; + } + + /** + * Get total no. of statements in the batch. + * + * @return the statementsInBatch value + */ + public Long statementsInBatch() { + return this.statementsInBatch; + } + + /** + * Set total no. of statements in the batch. + * + * @param statementsInBatch the statementsInBatch value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withStatementsInBatch(Long statementsInBatch) { + this.statementsInBatch = statementsInBatch; + return this; + } + + /** + * Get query analysis result from the source. + * + * @return the sourceResult value + */ + public ExecutionStatistics sourceResult() { + return this.sourceResult; + } + + /** + * Set query analysis result from the source. + * + * @param sourceResult the sourceResult value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withSourceResult(ExecutionStatistics sourceResult) { + this.sourceResult = sourceResult; + return this; + } + + /** + * Get query analysis result from the target. + * + * @return the targetResult value + */ + public ExecutionStatistics targetResult() { + return this.targetResult; + } + + /** + * Set query analysis result from the target. + * + * @param targetResult the targetResult value to set + * @return the QueryExecutionResult object itself. + */ + public QueryExecutionResult withTargetResult(ExecutionStatistics targetResult) { + this.targetResult = targetResult; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Quota.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Quota.java new file mode 100644 index 000000000000..3fe71e9aaaed --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Quota.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.QuotaInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; + +/** + * Type representing Quota. + */ +public interface Quota extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + Double currentValue(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the limit value. + */ + Double limit(); + + /** + * @return the name value. + */ + QuotaName name(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QuotaName.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QuotaName.java new file mode 100644 index 000000000000..3133f3729744 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/QuotaName.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The name of the quota. + */ +public class QuotaName { + /** + * The localized name of the quota. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * The unlocalized name (or ID) of the quota. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the localized name of the quota. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set the localized name of the quota. + * + * @param localizedValue the localizedValue value to set + * @return the QuotaName object itself. + */ + public QuotaName withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + + /** + * Get the unlocalized name (or ID) of the quota. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the unlocalized name (or ID) of the quota. + * + * @param value the value value to set + * @return the QuotaName object itself. + */ + public QuotaName withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ReportableException.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ReportableException.java new file mode 100644 index 000000000000..65a5095a31dd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ReportableException.java @@ -0,0 +1,173 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Exception object for all custom exceptions. + */ +public class ReportableException { + /** + * Error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Actionable steps for this exception. + */ + @JsonProperty(value = "actionableMessage") + private String actionableMessage; + + /** + * The path to the file where exception occurred. + */ + @JsonProperty(value = "filePath") + private String filePath; + + /** + * The line number where exception occurred. + */ + @JsonProperty(value = "lineNumber") + private String lineNumber; + + /** + * Coded numerical value that is assigned to a specific exception. + */ + @JsonProperty(value = "hResult") + private Integer hResult; + + /** + * Stack trace. + */ + @JsonProperty(value = "stackTrace") + private String stackTrace; + + /** + * Get error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set error message. + * + * @param message the message value to set + * @return the ReportableException object itself. + */ + public ReportableException withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get actionable steps for this exception. + * + * @return the actionableMessage value + */ + public String actionableMessage() { + return this.actionableMessage; + } + + /** + * Set actionable steps for this exception. + * + * @param actionableMessage the actionableMessage value to set + * @return the ReportableException object itself. + */ + public ReportableException withActionableMessage(String actionableMessage) { + this.actionableMessage = actionableMessage; + return this; + } + + /** + * Get the path to the file where exception occurred. + * + * @return the filePath value + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the path to the file where exception occurred. + * + * @param filePath the filePath value to set + * @return the ReportableException object itself. + */ + public ReportableException withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get the line number where exception occurred. + * + * @return the lineNumber value + */ + public String lineNumber() { + return this.lineNumber; + } + + /** + * Set the line number where exception occurred. + * + * @param lineNumber the lineNumber value to set + * @return the ReportableException object itself. + */ + public ReportableException withLineNumber(String lineNumber) { + this.lineNumber = lineNumber; + return this; + } + + /** + * Get coded numerical value that is assigned to a specific exception. + * + * @return the hResult value + */ + public Integer hResult() { + return this.hResult; + } + + /** + * Set coded numerical value that is assigned to a specific exception. + * + * @param hResult the hResult value to set + * @return the ReportableException object itself. + */ + public ReportableException withHResult(Integer hResult) { + this.hResult = hResult; + return this; + } + + /** + * Get stack trace. + * + * @return the stackTrace value + */ + public String stackTrace() { + return this.stackTrace; + } + + /** + * Set stack trace. + * + * @param stackTrace the stackTrace value to set + * @return the ReportableException object itself. + */ + public ReportableException withStackTrace(String stackTrace) { + this.stackTrace = stackTrace; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSku.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSku.java new file mode 100644 index 000000000000..9ca31f28ebbf --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSku.java @@ -0,0 +1,81 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.ResourceSkuInner; +import java.util.List; + +/** + * Type representing ResourceSku. + */ +public interface ResourceSku extends HasInner, HasManager { + /** + * @return the apiVersions value. + */ + List apiVersions(); + + /** + * @return the capabilities value. + */ + List capabilities(); + + /** + * @return the capacity value. + */ + ResourceSkuCapacity capacity(); + + /** + * @return the costs value. + */ + List costs(); + + /** + * @return the family value. + */ + String family(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the locations value. + */ + List locations(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the restrictions value. + */ + List restrictions(); + + /** + * @return the size value. + */ + String size(); + + /** + * @return the tier value. + */ + String tier(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapabilities.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapabilities.java new file mode 100644 index 000000000000..a240fb6b2ecc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapabilities.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes The SKU capabilites object. + */ +public class ResourceSkuCapabilities { + /** + * An invariant to describe the feature. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * An invariant if the feature is measured by quantity. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** + * Get an invariant to describe the feature. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get an invariant if the feature is measured by quantity. + * + * @return the value value + */ + public String value() { + return this.value; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapacity.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapacity.java new file mode 100644 index 000000000000..db8c73031693 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapacity.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes scaling information of a SKU. + */ +public class ResourceSkuCapacity { + /** + * The minimum capacity. + */ + @JsonProperty(value = "minimum", access = JsonProperty.Access.WRITE_ONLY) + private Long minimum; + + /** + * The maximum capacity. + */ + @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY) + private Long maximum; + + /** + * The default capacity. + */ + @JsonProperty(value = "default", access = JsonProperty.Access.WRITE_ONLY) + private Long defaultProperty; + + /** + * The scale type applicable to the SKU. Possible values include: + * 'Automatic', 'Manual', 'None'. + */ + @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuCapacityScaleType scaleType; + + /** + * Get the minimum capacity. + * + * @return the minimum value + */ + public Long minimum() { + return this.minimum; + } + + /** + * Get the maximum capacity. + * + * @return the maximum value + */ + public Long maximum() { + return this.maximum; + } + + /** + * Get the default capacity. + * + * @return the defaultProperty value + */ + public Long defaultProperty() { + return this.defaultProperty; + } + + /** + * Get the scale type applicable to the SKU. Possible values include: 'Automatic', 'Manual', 'None'. + * + * @return the scaleType value + */ + public ResourceSkuCapacityScaleType scaleType() { + return this.scaleType; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapacityScaleType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapacityScaleType.java new file mode 100644 index 000000000000..252402e62a48 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCapacityScaleType.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ResourceSkuCapacityScaleType. + */ +public final class ResourceSkuCapacityScaleType extends ExpandableStringEnum { + /** Static value Automatic for ResourceSkuCapacityScaleType. */ + public static final ResourceSkuCapacityScaleType AUTOMATIC = fromString("Automatic"); + + /** Static value Manual for ResourceSkuCapacityScaleType. */ + public static final ResourceSkuCapacityScaleType MANUAL = fromString("Manual"); + + /** Static value None for ResourceSkuCapacityScaleType. */ + public static final ResourceSkuCapacityScaleType NONE = fromString("None"); + + /** + * Creates or finds a ResourceSkuCapacityScaleType from its string representation. + * @param name a name to look for + * @return the corresponding ResourceSkuCapacityScaleType + */ + @JsonCreator + public static ResourceSkuCapacityScaleType fromString(String name) { + return fromString(name, ResourceSkuCapacityScaleType.class); + } + + /** + * @return known ResourceSkuCapacityScaleType values + */ + public static Collection values() { + return values(ResourceSkuCapacityScaleType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCosts.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCosts.java new file mode 100644 index 000000000000..30b830c09d01 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuCosts.java @@ -0,0 +1,62 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes metadata for retrieving price info. + */ +public class ResourceSkuCosts { + /** + * Used for querying price from commerce. + */ + @JsonProperty(value = "meterID", access = JsonProperty.Access.WRITE_ONLY) + private String meterID; + + /** + * The multiplier is needed to extend the base metered cost. + */ + @JsonProperty(value = "quantity", access = JsonProperty.Access.WRITE_ONLY) + private Long quantity; + + /** + * An invariant to show the extended unit. + */ + @JsonProperty(value = "extendedUnit", access = JsonProperty.Access.WRITE_ONLY) + private String extendedUnit; + + /** + * Get used for querying price from commerce. + * + * @return the meterID value + */ + public String meterID() { + return this.meterID; + } + + /** + * Get the multiplier is needed to extend the base metered cost. + * + * @return the quantity value + */ + public Long quantity() { + return this.quantity; + } + + /** + * Get an invariant to show the extended unit. + * + * @return the extendedUnit value + */ + public String extendedUnit() { + return this.extendedUnit; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictions.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictions.java new file mode 100644 index 000000000000..5c7de9a24bc3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictions.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes scaling information of a SKU. + */ +public class ResourceSkuRestrictions { + /** + * The type of restrictions. Possible values include: 'location'. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuRestrictionsType type; + + /** + * The value of restrictions. If the restriction type is set to location. + * This would be different locations where the SKU is restricted. + */ + @JsonProperty(value = "values", access = JsonProperty.Access.WRITE_ONLY) + private List values; + + /** + * The reason code for restriction. Possible values include: 'QuotaId', + * 'NotAvailableForSubscription'. + */ + @JsonProperty(value = "reasonCode", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuRestrictionsReasonCode reasonCode; + + /** + * Get the type of restrictions. Possible values include: 'location'. + * + * @return the type value + */ + public ResourceSkuRestrictionsType type() { + return this.type; + } + + /** + * Get the value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Get the reason code for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. + * + * @return the reasonCode value + */ + public ResourceSkuRestrictionsReasonCode reasonCode() { + return this.reasonCode; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictionsReasonCode.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictionsReasonCode.java new file mode 100644 index 000000000000..e1cff1f65c81 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictionsReasonCode.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ResourceSkuRestrictionsReasonCode. + */ +public final class ResourceSkuRestrictionsReasonCode extends ExpandableStringEnum { + /** Static value QuotaId for ResourceSkuRestrictionsReasonCode. */ + public static final ResourceSkuRestrictionsReasonCode QUOTA_ID = fromString("QuotaId"); + + /** Static value NotAvailableForSubscription for ResourceSkuRestrictionsReasonCode. */ + public static final ResourceSkuRestrictionsReasonCode NOT_AVAILABLE_FOR_SUBSCRIPTION = fromString("NotAvailableForSubscription"); + + /** + * Creates or finds a ResourceSkuRestrictionsReasonCode from its string representation. + * @param name a name to look for + * @return the corresponding ResourceSkuRestrictionsReasonCode + */ + @JsonCreator + public static ResourceSkuRestrictionsReasonCode fromString(String name) { + return fromString(name, ResourceSkuRestrictionsReasonCode.class); + } + + /** + * @return known ResourceSkuRestrictionsReasonCode values + */ + public static Collection values() { + return values(ResourceSkuRestrictionsReasonCode.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictionsType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictionsType.java new file mode 100644 index 000000000000..d0dadaa300ac --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkuRestrictionsType.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ResourceSkuRestrictionsType. + */ +public final class ResourceSkuRestrictionsType extends ExpandableStringEnum { + /** Static value location for ResourceSkuRestrictionsType. */ + public static final ResourceSkuRestrictionsType LOCATION = fromString("location"); + + /** + * Creates or finds a ResourceSkuRestrictionsType from its string representation. + * @param name a name to look for + * @return the corresponding ResourceSkuRestrictionsType + */ + @JsonCreator + public static ResourceSkuRestrictionsType fromString(String name) { + return fromString(name, ResourceSkuRestrictionsType.class); + } + + /** + * @return known ResourceSkuRestrictionsType values + */ + public static Collection values() { + return values(ResourceSkuRestrictionsType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkus.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkus.java new file mode 100644 index 000000000000..91702482973d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ResourceSkus.java @@ -0,0 +1,28 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.ResourceSkusInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ResourceSkus. + */ +public interface ResourceSkus extends HasInner { + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaComparisonValidationResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaComparisonValidationResult.java new file mode 100644 index 000000000000..0b853e02d2dc --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaComparisonValidationResult.java @@ -0,0 +1,122 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results for schema comparison between the source and target. + */ +public class SchemaComparisonValidationResult { + /** + * List of schema differences between the source and target databases. + */ + @JsonProperty(value = "schemaDifferences") + private SchemaComparisonValidationResultType schemaDifferences; + + /** + * List of errors that happened while performing schema compare validation. + */ + @JsonProperty(value = "validationErrors") + private ValidationError validationErrors; + + /** + * Count of source database objects. + */ + @JsonProperty(value = "sourceDatabaseObjectCount") + private Map sourceDatabaseObjectCount; + + /** + * Count of target database objects. + */ + @JsonProperty(value = "targetDatabaseObjectCount") + private Map targetDatabaseObjectCount; + + /** + * Get list of schema differences between the source and target databases. + * + * @return the schemaDifferences value + */ + public SchemaComparisonValidationResultType schemaDifferences() { + return this.schemaDifferences; + } + + /** + * Set list of schema differences between the source and target databases. + * + * @param schemaDifferences the schemaDifferences value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withSchemaDifferences(SchemaComparisonValidationResultType schemaDifferences) { + this.schemaDifferences = schemaDifferences; + return this; + } + + /** + * Get list of errors that happened while performing schema compare validation. + * + * @return the validationErrors value + */ + public ValidationError validationErrors() { + return this.validationErrors; + } + + /** + * Set list of errors that happened while performing schema compare validation. + * + * @param validationErrors the validationErrors value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withValidationErrors(ValidationError validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + /** + * Get count of source database objects. + * + * @return the sourceDatabaseObjectCount value + */ + public Map sourceDatabaseObjectCount() { + return this.sourceDatabaseObjectCount; + } + + /** + * Set count of source database objects. + * + * @param sourceDatabaseObjectCount the sourceDatabaseObjectCount value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withSourceDatabaseObjectCount(Map sourceDatabaseObjectCount) { + this.sourceDatabaseObjectCount = sourceDatabaseObjectCount; + return this; + } + + /** + * Get count of target database objects. + * + * @return the targetDatabaseObjectCount value + */ + public Map targetDatabaseObjectCount() { + return this.targetDatabaseObjectCount; + } + + /** + * Set count of target database objects. + * + * @param targetDatabaseObjectCount the targetDatabaseObjectCount value to set + * @return the SchemaComparisonValidationResult object itself. + */ + public SchemaComparisonValidationResult withTargetDatabaseObjectCount(Map targetDatabaseObjectCount) { + this.targetDatabaseObjectCount = targetDatabaseObjectCount; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaComparisonValidationResultType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaComparisonValidationResultType.java new file mode 100644 index 000000000000..3259b8fae8aa --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaComparisonValidationResultType.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description about the errors happen while performing migration validation. + */ +public class SchemaComparisonValidationResultType { + /** + * Name of the object that has the difference. + */ + @JsonProperty(value = "objectName") + private String objectName; + + /** + * Type of the object that has the difference. e.g + * (Table/View/StoredProcedure). Possible values include: + * 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + */ + @JsonProperty(value = "objectType") + private ObjectType objectType; + + /** + * Update action type with respect to target. Possible values include: + * 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget'. + */ + @JsonProperty(value = "updateAction") + private UpdateActionType updateAction; + + /** + * Get name of the object that has the difference. + * + * @return the objectName value + */ + public String objectName() { + return this.objectName; + } + + /** + * Set name of the object that has the difference. + * + * @param objectName the objectName value to set + * @return the SchemaComparisonValidationResultType object itself. + */ + public SchemaComparisonValidationResultType withObjectName(String objectName) { + this.objectName = objectName; + return this; + } + + /** + * Get type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @return the objectType value + */ + public ObjectType objectType() { + return this.objectType; + } + + /** + * Set type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function'. + * + * @param objectType the objectType value to set + * @return the SchemaComparisonValidationResultType object itself. + */ + public SchemaComparisonValidationResultType withObjectType(ObjectType objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget'. + * + * @return the updateAction value + */ + public UpdateActionType updateAction() { + return this.updateAction; + } + + /** + * Set update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget'. + * + * @param updateAction the updateAction value to set + * @return the SchemaComparisonValidationResultType object itself. + */ + public SchemaComparisonValidationResultType withUpdateAction(UpdateActionType updateAction) { + this.updateAction = updateAction; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationOption.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationOption.java new file mode 100644 index 000000000000..98a7fa1a8fb7 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationOption.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SchemaMigrationOption. + */ +public final class SchemaMigrationOption extends ExpandableStringEnum { + /** Static value None for SchemaMigrationOption. */ + public static final SchemaMigrationOption NONE = fromString("None"); + + /** Static value ExtractFromSource for SchemaMigrationOption. */ + public static final SchemaMigrationOption EXTRACT_FROM_SOURCE = fromString("ExtractFromSource"); + + /** Static value UseStorageFile for SchemaMigrationOption. */ + public static final SchemaMigrationOption USE_STORAGE_FILE = fromString("UseStorageFile"); + + /** + * Creates or finds a SchemaMigrationOption from its string representation. + * @param name a name to look for + * @return the corresponding SchemaMigrationOption + */ + @JsonCreator + public static SchemaMigrationOption fromString(String name) { + return fromString(name, SchemaMigrationOption.class); + } + + /** + * @return known SchemaMigrationOption values + */ + public static Collection values() { + return values(SchemaMigrationOption.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationSetting.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationSetting.java new file mode 100644 index 000000000000..82c9b203520d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationSetting.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings for migrating schema from source to target. + */ +public class SchemaMigrationSetting { + /** + * Option on how to migrate the schema. Possible values include: 'None', + * 'ExtractFromSource', 'UseStorageFile'. + */ + @JsonProperty(value = "schemaOption") + private SchemaMigrationOption schemaOption; + + /** + * Resource Identifier of a file resource containing the uploaded schema + * file. + */ + @JsonProperty(value = "fileId") + private String fileId; + + /** + * Get option on how to migrate the schema. Possible values include: 'None', 'ExtractFromSource', 'UseStorageFile'. + * + * @return the schemaOption value + */ + public SchemaMigrationOption schemaOption() { + return this.schemaOption; + } + + /** + * Set option on how to migrate the schema. Possible values include: 'None', 'ExtractFromSource', 'UseStorageFile'. + * + * @param schemaOption the schemaOption value to set + * @return the SchemaMigrationSetting object itself. + */ + public SchemaMigrationSetting withSchemaOption(SchemaMigrationOption schemaOption) { + this.schemaOption = schemaOption; + return this; + } + + /** + * Get resource Identifier of a file resource containing the uploaded schema file. + * + * @return the fileId value + */ + public String fileId() { + return this.fileId; + } + + /** + * Set resource Identifier of a file resource containing the uploaded schema file. + * + * @param fileId the fileId value to set + * @return the SchemaMigrationSetting object itself. + */ + public SchemaMigrationSetting withFileId(String fileId) { + this.fileId = fileId; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationStage.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationStage.java new file mode 100644 index 000000000000..72d43d500ef5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SchemaMigrationStage.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SchemaMigrationStage. + */ +public final class SchemaMigrationStage extends ExpandableStringEnum { + /** Static value NotStarted for SchemaMigrationStage. */ + public static final SchemaMigrationStage NOT_STARTED = fromString("NotStarted"); + + /** Static value ValidatingInputs for SchemaMigrationStage. */ + public static final SchemaMigrationStage VALIDATING_INPUTS = fromString("ValidatingInputs"); + + /** Static value CollectingObjects for SchemaMigrationStage. */ + public static final SchemaMigrationStage COLLECTING_OBJECTS = fromString("CollectingObjects"); + + /** Static value DownloadingScript for SchemaMigrationStage. */ + public static final SchemaMigrationStage DOWNLOADING_SCRIPT = fromString("DownloadingScript"); + + /** Static value GeneratingScript for SchemaMigrationStage. */ + public static final SchemaMigrationStage GENERATING_SCRIPT = fromString("GeneratingScript"); + + /** Static value UploadingScript for SchemaMigrationStage. */ + public static final SchemaMigrationStage UPLOADING_SCRIPT = fromString("UploadingScript"); + + /** Static value DeployingSchema for SchemaMigrationStage. */ + public static final SchemaMigrationStage DEPLOYING_SCHEMA = fromString("DeployingSchema"); + + /** Static value Completed for SchemaMigrationStage. */ + public static final SchemaMigrationStage COMPLETED = fromString("Completed"); + + /** Static value CompletedWithWarnings for SchemaMigrationStage. */ + public static final SchemaMigrationStage COMPLETED_WITH_WARNINGS = fromString("CompletedWithWarnings"); + + /** Static value Failed for SchemaMigrationStage. */ + public static final SchemaMigrationStage FAILED = fromString("Failed"); + + /** + * Creates or finds a SchemaMigrationStage from its string representation. + * @param name a name to look for + * @return the corresponding SchemaMigrationStage + */ + @JsonCreator + public static SchemaMigrationStage fromString(String name) { + return fromString(name, SchemaMigrationStage.class); + } + + /** + * @return known SchemaMigrationStage values + */ + public static Collection values() { + return values(SchemaMigrationStage.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SelectedCertificateInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SelectedCertificateInput.java new file mode 100644 index 000000000000..b92105ada8d5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SelectedCertificateInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Info for ertificate to be exported for TDE enabled databases. + */ +public class SelectedCertificateInput { + /** + * Name of certificate to be exported. + */ + @JsonProperty(value = "certificateName", required = true) + private String certificateName; + + /** + * Password to use for encrypting the exported certificate. + */ + @JsonProperty(value = "password", required = true) + private String password; + + /** + * Get name of certificate to be exported. + * + * @return the certificateName value + */ + public String certificateName() { + return this.certificateName; + } + + /** + * Set name of certificate to be exported. + * + * @param certificateName the certificateName value to set + * @return the SelectedCertificateInput object itself. + */ + public SelectedCertificateInput withCertificateName(String certificateName) { + this.certificateName = certificateName; + return this; + } + + /** + * Get password to use for encrypting the exported certificate. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set password to use for encrypting the exported certificate. + * + * @param password the password value to set + * @return the SelectedCertificateInput object itself. + */ + public SelectedCertificateInput withPassword(String password) { + this.password = password; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServerLevelPermissionsGroup.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServerLevelPermissionsGroup.java new file mode 100644 index 000000000000..f332a3b6e0f0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServerLevelPermissionsGroup.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ServerLevelPermissionsGroup. + */ +public final class ServerLevelPermissionsGroup extends ExpandableStringEnum { + /** Static value Default for ServerLevelPermissionsGroup. */ + public static final ServerLevelPermissionsGroup DEFAULT = fromString("Default"); + + /** Static value MigrationFromSqlServerToAzureDB for ServerLevelPermissionsGroup. */ + public static final ServerLevelPermissionsGroup MIGRATION_FROM_SQL_SERVER_TO_AZURE_DB = fromString("MigrationFromSqlServerToAzureDB"); + + /** Static value MigrationFromSqlServerToAzureMI for ServerLevelPermissionsGroup. */ + public static final ServerLevelPermissionsGroup MIGRATION_FROM_SQL_SERVER_TO_AZURE_MI = fromString("MigrationFromSqlServerToAzureMI"); + + /** Static value MigrationFromMySQLToAzureDBForMySQL for ServerLevelPermissionsGroup. */ + public static final ServerLevelPermissionsGroup MIGRATION_FROM_MY_SQLTO_AZURE_DBFOR_MY_SQL = fromString("MigrationFromMySQLToAzureDBForMySQL"); + + /** + * Creates or finds a ServerLevelPermissionsGroup from its string representation. + * @param name a name to look for + * @return the corresponding ServerLevelPermissionsGroup + */ + @JsonCreator + public static ServerLevelPermissionsGroup fromString(String name) { + return fromString(name, ServerLevelPermissionsGroup.class); + } + + /** + * @return known ServerLevelPermissionsGroup values + */ + public static Collection values() { + return values(ServerLevelPermissionsGroup.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServerProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServerProperties.java new file mode 100644 index 000000000000..5b581f6edeac --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServerProperties.java @@ -0,0 +1,107 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Server properties for Oracle, MySQL type source. + */ +public class ServerProperties { + /** + * Name of the server platform. + */ + @JsonProperty(value = "serverPlatform", access = JsonProperty.Access.WRITE_ONLY) + private String serverPlatform; + + /** + * Name of the server. + */ + @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) + private String serverName; + + /** + * Version of the database server. + */ + @JsonProperty(value = "serverVersion", access = JsonProperty.Access.WRITE_ONLY) + private String serverVersion; + + /** + * Edition of the database server. + */ + @JsonProperty(value = "serverEdition", access = JsonProperty.Access.WRITE_ONLY) + private String serverEdition; + + /** + * Version of the operating system. + */ + @JsonProperty(value = "serverOperatingSystemVersion", access = JsonProperty.Access.WRITE_ONLY) + private String serverOperatingSystemVersion; + + /** + * Number of databases in the server. + */ + @JsonProperty(value = "serverDatabaseCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer serverDatabaseCount; + + /** + * Get name of the server platform. + * + * @return the serverPlatform value + */ + public String serverPlatform() { + return this.serverPlatform; + } + + /** + * Get name of the server. + * + * @return the serverName value + */ + public String serverName() { + return this.serverName; + } + + /** + * Get version of the database server. + * + * @return the serverVersion value + */ + public String serverVersion() { + return this.serverVersion; + } + + /** + * Get edition of the database server. + * + * @return the serverEdition value + */ + public String serverEdition() { + return this.serverEdition; + } + + /** + * Get version of the operating system. + * + * @return the serverOperatingSystemVersion value + */ + public String serverOperatingSystemVersion() { + return this.serverOperatingSystemVersion; + } + + /** + * Get number of databases in the server. + * + * @return the serverDatabaseCount value + */ + public Integer serverDatabaseCount() { + return this.serverDatabaseCount; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceOperation.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceOperation.java new file mode 100644 index 000000000000..27b3f004b591 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceOperation.java @@ -0,0 +1,30 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.DataMigrationManager; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.ServiceOperationInner; + +/** + * Type representing ServiceOperation. + */ +public interface ServiceOperation extends HasInner, HasManager { + /** + * @return the display value. + */ + ServiceOperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceOperationDisplay.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceOperationDisplay.java new file mode 100644 index 000000000000..0129f85b4e01 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceOperationDisplay.java @@ -0,0 +1,121 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Localized display text. + */ +public class ServiceOperationDisplay { + /** + * The localized resource provider name. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * The localized resource type name. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * The localized operation name. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The localized operation description. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the localized resource provider name. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the localized resource provider name. + * + * @param provider the provider value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the localized resource type name. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set the localized resource type name. + * + * @param resource the resource value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the localized operation name. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set the localized operation name. + * + * @param operation the operation value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the localized operation description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the localized operation description. + * + * @param description the description value to set + * @return the ServiceOperationDisplay object itself. + */ + public ServiceOperationDisplay withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceProvisioningState.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceProvisioningState.java new file mode 100644 index 000000000000..a3a754a1e2de --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceProvisioningState.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ServiceProvisioningState. + */ +public final class ServiceProvisioningState extends ExpandableStringEnum { + /** Static value Accepted for ServiceProvisioningState. */ + public static final ServiceProvisioningState ACCEPTED = fromString("Accepted"); + + /** Static value Deleting for ServiceProvisioningState. */ + public static final ServiceProvisioningState DELETING = fromString("Deleting"); + + /** Static value Deploying for ServiceProvisioningState. */ + public static final ServiceProvisioningState DEPLOYING = fromString("Deploying"); + + /** Static value Stopped for ServiceProvisioningState. */ + public static final ServiceProvisioningState STOPPED = fromString("Stopped"); + + /** Static value Stopping for ServiceProvisioningState. */ + public static final ServiceProvisioningState STOPPING = fromString("Stopping"); + + /** Static value Starting for ServiceProvisioningState. */ + public static final ServiceProvisioningState STARTING = fromString("Starting"); + + /** Static value FailedToStart for ServiceProvisioningState. */ + public static final ServiceProvisioningState FAILED_TO_START = fromString("FailedToStart"); + + /** Static value FailedToStop for ServiceProvisioningState. */ + public static final ServiceProvisioningState FAILED_TO_STOP = fromString("FailedToStop"); + + /** Static value Succeeded for ServiceProvisioningState. */ + public static final ServiceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ServiceProvisioningState. */ + public static final ServiceProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a ServiceProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ServiceProvisioningState + */ + @JsonCreator + public static ServiceProvisioningState fromString(String name) { + return fromString(name, ServiceProvisioningState.class); + } + + /** + * @return known ServiceProvisioningState values + */ + public static Collection values() { + return values(ServiceProvisioningState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceScalability.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceScalability.java new file mode 100644 index 000000000000..6c6eec6315ce --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceScalability.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ServiceScalability. + */ +public final class ServiceScalability extends ExpandableStringEnum { + /** Static value none for ServiceScalability. */ + public static final ServiceScalability NONE = fromString("none"); + + /** Static value manual for ServiceScalability. */ + public static final ServiceScalability MANUAL = fromString("manual"); + + /** Static value automatic for ServiceScalability. */ + public static final ServiceScalability AUTOMATIC = fromString("automatic"); + + /** + * Creates or finds a ServiceScalability from its string representation. + * @param name a name to look for + * @return the corresponding ServiceScalability + */ + @JsonCreator + public static ServiceScalability fromString(String name) { + return fromString(name, ServiceScalability.class); + } + + /** + * @return known ServiceScalability values + */ + public static Collection values() { + return values(ServiceScalability.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceSku.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceSku.java new file mode 100644 index 000000000000..7ab65e176b3c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ServiceSku.java @@ -0,0 +1,151 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An Azure SKU instance. + */ +public class ServiceSku { + /** + * The unique name of the SKU, such as 'P3'. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The tier of the SKU, such as 'Basic', 'General Purpose', or 'Business + * Critical'. + */ + @JsonProperty(value = "tier") + private String tier; + + /** + * The SKU family, used when the service has multiple performance classes + * within a tier, such as 'A', 'D', etc. for virtual machines. + */ + @JsonProperty(value = "family") + private String family; + + /** + * The size of the SKU, used when the name alone does not denote a service + * size or when a SKU has multiple performance classes within a family, + * e.g. 'A1' for virtual machines. + */ + @JsonProperty(value = "size") + private String size; + + /** + * The capacity of the SKU, if it supports scaling. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Get the unique name of the SKU, such as 'P3'. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the unique name of the SKU, such as 'P3'. + * + * @param name the name value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier of the SKU, such as 'Basic', 'General Purpose', or 'Business Critical'. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier of the SKU, such as 'Basic', 'General Purpose', or 'Business Critical'. + * + * @param tier the tier value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get the SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set the SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines. + * + * @param family the family value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set the size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines. + * + * @param size the size value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the capacity of the SKU, if it supports scaling. + * + * @return the capacity value + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity of the SKU, if it supports scaling. + * + * @param capacity the capacity value to set + * @return the ServiceSku object itself. + */ + public ServiceSku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Services.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Services.java new file mode 100644 index 000000000000..3b148ac5f048 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Services.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.ServicesInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.AvailableServiceSku; + +/** + * Type representing Services. + */ +public interface Services extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Check service health status. + * The services resource is the top-level resource that represents the Database Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 checkStatusAsync(String groupName, String serviceName); + + /** + * Start service. + * The services resource is the top-level resource that represents the Database Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + Completable startAsync(String groupName, String serviceName); + + /** + * Stop service. + * The services resource is the top-level resource that represents the Database Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + Completable stopAsync(String groupName, String serviceName); + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters); + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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 listSkusAsync(final String groupName, final String serviceName); + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Severity.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Severity.java new file mode 100644 index 000000000000..67344eda2576 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Severity.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Severity. + */ +public final class Severity extends ExpandableStringEnum { + /** Static value Message for Severity. */ + public static final Severity MESSAGE = fromString("Message"); + + /** Static value Warning for Severity. */ + public static final Severity WARNING = fromString("Warning"); + + /** Static value Error for Severity. */ + public static final Severity ERROR = fromString("Error"); + + /** + * Creates or finds a Severity from its string representation. + * @param name a name to look for + * @return the corresponding Severity + */ + @JsonCreator + public static Severity fromString(String name) { + return fromString(name, Severity.class); + } + + /** + * @return known Severity values + */ + public static Collection values() { + return values(Severity.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlConnectionInfo.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlConnectionInfo.java new file mode 100644 index 000000000000..efb235ec1b0e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlConnectionInfo.java @@ -0,0 +1,181 @@ +/** + * 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.azuredatabasemigrationservice.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 SQL database server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("SqlConnectionInfo") +public class SqlConnectionInfo extends ConnectionInfo { + /** + * Data source in the format + * Protocol:MachineName\SQLServerInstanceName,PortNumber. + */ + @JsonProperty(value = "dataSource", required = true) + private String dataSource; + + /** + * Authentication type to use for connection. Possible values include: + * 'None', 'WindowsAuthentication', 'SqlAuthentication', + * 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. + */ + @JsonProperty(value = "authentication") + private AuthenticationType authentication; + + /** + * Whether to encrypt the connection. + */ + @JsonProperty(value = "encryptConnection") + private Boolean encryptConnection; + + /** + * Additional connection settings. + */ + @JsonProperty(value = "additionalSettings") + private String additionalSettings; + + /** + * Whether to trust the server certificate. + */ + @JsonProperty(value = "trustServerCertificate") + private Boolean trustServerCertificate; + + /** + * Server platform type for connection. Possible values include: + * 'SqlOnPrem'. + */ + @JsonProperty(value = "platform") + private SqlSourcePlatform platform; + + /** + * Get data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber. + * + * @return the dataSource value + */ + public String dataSource() { + return this.dataSource; + } + + /** + * Set data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber. + * + * @param dataSource the dataSource value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withDataSource(String dataSource) { + this.dataSource = dataSource; + return this; + } + + /** + * Get authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SqlAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. + * + * @return the authentication value + */ + public AuthenticationType authentication() { + return this.authentication; + } + + /** + * Set authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SqlAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. + * + * @param authentication the authentication value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withAuthentication(AuthenticationType authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get whether to encrypt the connection. + * + * @return the encryptConnection value + */ + public Boolean encryptConnection() { + return this.encryptConnection; + } + + /** + * Set whether to encrypt the connection. + * + * @param encryptConnection the encryptConnection value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withEncryptConnection(Boolean encryptConnection) { + this.encryptConnection = encryptConnection; + return this; + } + + /** + * Get additional connection settings. + * + * @return the additionalSettings value + */ + public String additionalSettings() { + return this.additionalSettings; + } + + /** + * Set additional connection settings. + * + * @param additionalSettings the additionalSettings value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withAdditionalSettings(String additionalSettings) { + this.additionalSettings = additionalSettings; + return this; + } + + /** + * Get whether to trust the server certificate. + * + * @return the trustServerCertificate value + */ + public Boolean trustServerCertificate() { + return this.trustServerCertificate; + } + + /** + * Set whether to trust the server certificate. + * + * @param trustServerCertificate the trustServerCertificate value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withTrustServerCertificate(Boolean trustServerCertificate) { + this.trustServerCertificate = trustServerCertificate; + return this; + } + + /** + * Get server platform type for connection. Possible values include: 'SqlOnPrem'. + * + * @return the platform value + */ + public SqlSourcePlatform platform() { + return this.platform; + } + + /** + * Set server platform type for connection. Possible values include: 'SqlOnPrem'. + * + * @param platform the platform value to set + * @return the SqlConnectionInfo object itself. + */ + public SqlConnectionInfo withPlatform(SqlSourcePlatform platform) { + this.platform = platform; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlMigrationTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlMigrationTaskInput.java new file mode 100644 index 000000000000..e657cd0dda54 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlMigrationTaskInput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class for migration task input. + */ +public class SqlMigrationTaskInput { + /** + * Information for connecting to source. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Information for connecting to target. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Get information for connecting to source. + * + * @return the sourceConnectionInfo value + */ + public SqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set information for connecting to source. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the SqlMigrationTaskInput object itself. + */ + public SqlMigrationTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get information for connecting to target. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set information for connecting to target. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the SqlMigrationTaskInput object itself. + */ + public SqlMigrationTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlSourcePlatform.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlSourcePlatform.java new file mode 100644 index 000000000000..ad1d76012d06 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SqlSourcePlatform.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SqlSourcePlatform. + */ +public final class SqlSourcePlatform extends ExpandableStringEnum { + /** Static value SqlOnPrem for SqlSourcePlatform. */ + public static final SqlSourcePlatform SQL_ON_PREM = fromString("SqlOnPrem"); + + /** + * Creates or finds a SqlSourcePlatform from its string representation. + * @param name a name to look for + * @return the corresponding SqlSourcePlatform + */ + @JsonCreator + public static SqlSourcePlatform fromString(String name) { + return fromString(name, SqlSourcePlatform.class); + } + + /** + * @return known SqlSourcePlatform values + */ + public static Collection values() { + return values(SqlSourcePlatform.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/StartMigrationScenarioServerRoleResult.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/StartMigrationScenarioServerRoleResult.java new file mode 100644 index 000000000000..084ab9c9da47 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/StartMigrationScenarioServerRoleResult.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Server role migration result. + */ +public class StartMigrationScenarioServerRoleResult { + /** + * Name of server role. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * 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 exceptions and warnings. + */ + @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) + private List exceptionsAndWarnings; + + /** + * Get name of server role. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * 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 exceptions and warnings. + * + * @return the exceptionsAndWarnings value + */ + public List exceptionsAndWarnings() { + return this.exceptionsAndWarnings; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncDatabaseMigrationReportingState.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncDatabaseMigrationReportingState.java new file mode 100644 index 000000000000..cf9e805c5ee2 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncDatabaseMigrationReportingState.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SyncDatabaseMigrationReportingState. + */ +public final class SyncDatabaseMigrationReportingState extends ExpandableStringEnum { + /** Static value UNDEFINED for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState UNDEFINED = fromString("UNDEFINED"); + + /** Static value CONFIGURING for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState CONFIGURING = fromString("CONFIGURING"); + + /** Static value INITIALIAZING for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState INITIALIAZING = fromString("INITIALIAZING"); + + /** Static value STARTING for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState STARTING = fromString("STARTING"); + + /** Static value RUNNING for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState RUNNING = fromString("RUNNING"); + + /** Static value READY_TO_COMPLETE for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState READY_TO_COMPLETE = fromString("READY_TO_COMPLETE"); + + /** Static value COMPLETING for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState COMPLETING = fromString("COMPLETING"); + + /** Static value COMPLETE for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState COMPLETE = fromString("COMPLETE"); + + /** Static value CANCELLING for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState CANCELLING = fromString("CANCELLING"); + + /** Static value CANCELLED for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState CANCELLED = fromString("CANCELLED"); + + /** Static value FAILED for SyncDatabaseMigrationReportingState. */ + public static final SyncDatabaseMigrationReportingState FAILED = fromString("FAILED"); + + /** + * Creates or finds a SyncDatabaseMigrationReportingState from its string representation. + * @param name a name to look for + * @return the corresponding SyncDatabaseMigrationReportingState + */ + @JsonCreator + public static SyncDatabaseMigrationReportingState fromString(String name) { + return fromString(name, SyncDatabaseMigrationReportingState.class); + } + + /** + * @return known SyncDatabaseMigrationReportingState values + */ + public static Collection values() { + return values(SyncDatabaseMigrationReportingState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncMigrationDatabaseErrorEvent.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncMigrationDatabaseErrorEvent.java new file mode 100644 index 000000000000..501b4eab57d9 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncMigrationDatabaseErrorEvent.java @@ -0,0 +1,62 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Database migration errors for online migration. + */ +public class SyncMigrationDatabaseErrorEvent { + /** + * String value of timestamp. + */ + @JsonProperty(value = "timestampString", access = JsonProperty.Access.WRITE_ONLY) + private String timestampString; + + /** + * Event type. + */ + @JsonProperty(value = "eventTypeString", access = JsonProperty.Access.WRITE_ONLY) + private String eventTypeString; + + /** + * Event text. + */ + @JsonProperty(value = "eventText", access = JsonProperty.Access.WRITE_ONLY) + private String eventText; + + /** + * Get string value of timestamp. + * + * @return the timestampString value + */ + public String timestampString() { + return this.timestampString; + } + + /** + * Get event type. + * + * @return the eventTypeString value + */ + public String eventTypeString() { + return this.eventTypeString; + } + + /** + * Get event text. + * + * @return the eventText value + */ + public String eventText() { + return this.eventText; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncTableMigrationState.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncTableMigrationState.java new file mode 100644 index 000000000000..d2a7151049ce --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/SyncTableMigrationState.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SyncTableMigrationState. + */ +public final class SyncTableMigrationState extends ExpandableStringEnum { + /** Static value BEFORE_LOAD for SyncTableMigrationState. */ + public static final SyncTableMigrationState BEFORE_LOAD = fromString("BEFORE_LOAD"); + + /** Static value FULL_LOAD for SyncTableMigrationState. */ + public static final SyncTableMigrationState FULL_LOAD = fromString("FULL_LOAD"); + + /** Static value COMPLETED for SyncTableMigrationState. */ + public static final SyncTableMigrationState COMPLETED = fromString("COMPLETED"); + + /** Static value CANCELED for SyncTableMigrationState. */ + public static final SyncTableMigrationState CANCELED = fromString("CANCELED"); + + /** Static value ERROR for SyncTableMigrationState. */ + public static final SyncTableMigrationState ERROR = fromString("ERROR"); + + /** Static value FAILED for SyncTableMigrationState. */ + public static final SyncTableMigrationState FAILED = fromString("FAILED"); + + /** + * Creates or finds a SyncTableMigrationState from its string representation. + * @param name a name to look for + * @return the corresponding SyncTableMigrationState + */ + @JsonCreator + public static SyncTableMigrationState fromString(String name) { + return fromString(name, SyncTableMigrationState.class); + } + + /** + * @return known SyncTableMigrationState values + */ + public static Collection values() { + return values(SyncTableMigrationState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/TaskState.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/TaskState.java new file mode 100644 index 000000000000..c7cbe99eed97 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/TaskState.java @@ -0,0 +1,59 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TaskState. + */ +public final class TaskState extends ExpandableStringEnum { + /** Static value Unknown for TaskState. */ + public static final TaskState UNKNOWN = fromString("Unknown"); + + /** Static value Queued for TaskState. */ + public static final TaskState QUEUED = fromString("Queued"); + + /** Static value Running for TaskState. */ + public static final TaskState RUNNING = fromString("Running"); + + /** Static value Canceled for TaskState. */ + public static final TaskState CANCELED = fromString("Canceled"); + + /** Static value Succeeded for TaskState. */ + public static final TaskState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for TaskState. */ + public static final TaskState FAILED = fromString("Failed"); + + /** Static value FailedInputValidation for TaskState. */ + public static final TaskState FAILED_INPUT_VALIDATION = fromString("FailedInputValidation"); + + /** Static value Faulted for TaskState. */ + public static final TaskState FAULTED = fromString("Faulted"); + + /** + * Creates or finds a TaskState from its string representation. + * @param name a name to look for + * @return the corresponding TaskState + */ + @JsonCreator + public static TaskState fromString(String name) { + return fromString(name, TaskState.class); + } + + /** + * @return known TaskState values + */ + public static Collection values() { + return values(TaskState.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Tasks.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Tasks.java new file mode 100644 index 000000000000..6e2714c34111 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Tasks.java @@ -0,0 +1,87 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.CommandPropertiesInner; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.TasksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Tasks. + */ +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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable cancelAsync(String groupName, String serviceName, String projectName, String taskName); + + /** + * Execute a command on a task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. This method executes a command on a running task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters Command to execute + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable commandAsync(String groupName, String serviceName, String projectName, String taskName, CommandPropertiesInner parameters); + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String groupName, String serviceName, String projectName, String taskName); + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String groupName, final String serviceName, final String projectName); + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String groupName, String serviceName, String projectName, String taskName); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/UpdateActionType.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/UpdateActionType.java new file mode 100644 index 000000000000..e74e6729907b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/UpdateActionType.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for UpdateActionType. + */ +public final class UpdateActionType extends ExpandableStringEnum { + /** Static value DeletedOnTarget for UpdateActionType. */ + public static final UpdateActionType DELETED_ON_TARGET = fromString("DeletedOnTarget"); + + /** Static value ChangedOnTarget for UpdateActionType. */ + public static final UpdateActionType CHANGED_ON_TARGET = fromString("ChangedOnTarget"); + + /** Static value AddedOnTarget for UpdateActionType. */ + public static final UpdateActionType ADDED_ON_TARGET = fromString("AddedOnTarget"); + + /** + * Creates or finds a UpdateActionType from its string representation. + * @param name a name to look for + * @return the corresponding UpdateActionType + */ + @JsonCreator + public static UpdateActionType fromString(String name) { + return fromString(name, UpdateActionType.class); + } + + /** + * @return known UpdateActionType values + */ + public static Collection values() { + return values(UpdateActionType.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Usages.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Usages.java new file mode 100644 index 000000000000..8aefaf040e7b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/Usages.java @@ -0,0 +1,29 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation.UsagesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Usages. + */ +public interface Usages extends HasInner { + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java new file mode 100644 index 000000000000..ed8ee7cfda2c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.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.azuredatabasemigrationservice.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 DB + * sync migrations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ValidateMigrationInput.SqlServer.SqlDb.Sync") +public class ValidateMigrationInputSqlServerSqlDbSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ValidateSyncMigrationInputSqlServerTaskInput 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 ValidateSyncMigrationInputSqlServerTaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ValidateMigrationInputSqlServerSqlDbSyncTaskProperties object itself. + */ + public ValidateMigrationInputSqlServerSqlDbSyncTaskProperties withInput(ValidateSyncMigrationInputSqlServerTaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskInput.java new file mode 100644 index 000000000000..e43aad35cbac --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskInput.java @@ -0,0 +1,203 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for task that validates migration input for SQL to Azure SQL Managed + * Instance. + */ +public class ValidateMigrationInputSqlServerSqlMITaskInput { + /** + * Information for connecting to source. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Information for connecting to target. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Logins to migrate. + */ + @JsonProperty(value = "selectedLogins") + private List selectedLogins; + + /** + * Backup file share information for all selected databases. + */ + @JsonProperty(value = "backupFileShare") + private FileShare backupFileShare; + + /** + * SAS URI of Azure Storage Account Container to be used for storing backup + * files. + */ + @JsonProperty(value = "backupBlobShare", required = true) + private BlobShare backupBlobShare; + + /** + * Backup Mode to specify whether to use existing backup or create new + * backup. Possible values include: 'CreateBackup', 'ExistingBackup'. + */ + @JsonProperty(value = "backupMode") + private BackupMode backupMode; + + /** + * Get information for connecting to source. + * + * @return the sourceConnectionInfo value + */ + public SqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set information for connecting to source. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get information for connecting to target. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set information for connecting to target. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * 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 ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + + /** + * Get logins to migrate. + * + * @return the selectedLogins value + */ + public List selectedLogins() { + return this.selectedLogins; + } + + /** + * Set logins to migrate. + * + * @param selectedLogins the selectedLogins value to set + * @return the ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput withSelectedLogins(List selectedLogins) { + this.selectedLogins = selectedLogins; + 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 ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput withBackupFileShare(FileShare backupFileShare) { + this.backupFileShare = backupFileShare; + return this; + } + + /** + * Get sAS URI of Azure Storage Account Container to be used for storing backup files. + * + * @return the backupBlobShare value + */ + public BlobShare backupBlobShare() { + return this.backupBlobShare; + } + + /** + * Set sAS URI of Azure Storage Account Container to be used for storing backup files. + * + * @param backupBlobShare the backupBlobShare value to set + * @return the ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput withBackupBlobShare(BlobShare backupBlobShare) { + this.backupBlobShare = backupBlobShare; + return this; + } + + /** + * Get backup Mode to specify whether to use existing backup or create new backup. Possible values include: 'CreateBackup', 'ExistingBackup'. + * + * @return the backupMode value + */ + public BackupMode backupMode() { + return this.backupMode; + } + + /** + * Set backup Mode to specify whether to use existing backup or create new backup. Possible values include: 'CreateBackup', 'ExistingBackup'. + * + * @param backupMode the backupMode value to set + * @return the ValidateMigrationInputSqlServerSqlMITaskInput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskInput withBackupMode(BackupMode backupMode) { + this.backupMode = backupMode; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskOutput.java new file mode 100644 index 000000000000..9bd306fdf3b3 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskOutput.java @@ -0,0 +1,150 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for task that validates migration input for SQL to Azure SQL Managed + * Instance migrations. + */ +public class ValidateMigrationInputSqlServerSqlMITaskOutput { + /** + * Result 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 the RestoreDatabaseName. + */ + @JsonProperty(value = "restoreDatabaseNameErrors", access = JsonProperty.Access.WRITE_ONLY) + private List restoreDatabaseNameErrors; + + /** + * Errors associated with the BackupFolder path. + */ + @JsonProperty(value = "backupFolderErrors", access = JsonProperty.Access.WRITE_ONLY) + private List backupFolderErrors; + + /** + * Errors associated with backup share user name and password credentials. + */ + @JsonProperty(value = "backupShareCredentialsErrors", access = JsonProperty.Access.WRITE_ONLY) + private List backupShareCredentialsErrors; + + /** + * Errors associated with the storage account provided. + */ + @JsonProperty(value = "backupStorageAccountErrors", access = JsonProperty.Access.WRITE_ONLY) + private List backupStorageAccountErrors; + + /** + * Errors associated with existing backup files. + */ + @JsonProperty(value = "existingBackupErrors", access = JsonProperty.Access.WRITE_ONLY) + private List existingBackupErrors; + + /** + * Information about backup files when existing backup mode is used. + */ + @JsonProperty(value = "databaseBackupInfo") + private DatabaseBackupInfo databaseBackupInfo; + + /** + * Get result 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 the RestoreDatabaseName. + * + * @return the restoreDatabaseNameErrors value + */ + public List restoreDatabaseNameErrors() { + return this.restoreDatabaseNameErrors; + } + + /** + * Get errors associated with the BackupFolder path. + * + * @return the backupFolderErrors value + */ + public List backupFolderErrors() { + return this.backupFolderErrors; + } + + /** + * Get errors associated with backup share user name and password credentials. + * + * @return the backupShareCredentialsErrors value + */ + public List backupShareCredentialsErrors() { + return this.backupShareCredentialsErrors; + } + + /** + * Get errors associated with the storage account provided. + * + * @return the backupStorageAccountErrors value + */ + public List backupStorageAccountErrors() { + return this.backupStorageAccountErrors; + } + + /** + * Get errors associated with existing backup files. + * + * @return the existingBackupErrors value + */ + public List existingBackupErrors() { + return this.existingBackupErrors; + } + + /** + * Get information about backup files when existing backup mode is used. + * + * @return the databaseBackupInfo value + */ + public DatabaseBackupInfo databaseBackupInfo() { + return this.databaseBackupInfo; + } + + /** + * Set information about backup files when existing backup mode is used. + * + * @param databaseBackupInfo the databaseBackupInfo value to set + * @return the ValidateMigrationInputSqlServerSqlMITaskOutput object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskOutput withDatabaseBackupInfo(DatabaseBackupInfo databaseBackupInfo) { + this.databaseBackupInfo = databaseBackupInfo; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.java new file mode 100644 index 000000000000..32aa5984b9d5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMigrationInputSqlServerSqlMITaskProperties.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.azuredatabasemigrationservice.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. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("ValidateMigrationInput.SqlServer.AzureSqlDbMI") +public class ValidateMigrationInputSqlServerSqlMITaskProperties extends ProjectTaskProperties { + /** + * Task input. + */ + @JsonProperty(value = "input") + private ValidateMigrationInputSqlServerSqlMITaskInput 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 ValidateMigrationInputSqlServerSqlMITaskInput input() { + return this.input; + } + + /** + * Set task input. + * + * @param input the input value to set + * @return the ValidateMigrationInputSqlServerSqlMITaskProperties object itself. + */ + public ValidateMigrationInputSqlServerSqlMITaskProperties withInput(ValidateMigrationInputSqlServerSqlMITaskInput 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMongoDbTaskProperties.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMongoDbTaskProperties.java new file mode 100644 index 000000000000..801eb27b1b07 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateMongoDbTaskProperties.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.azuredatabasemigrationservice.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 between MongoDB data + * sources. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") +@JsonTypeName("Validate.MongoDb") +public class ValidateMongoDbTaskProperties extends ProjectTaskProperties { + /** + * The input property. + */ + @JsonProperty(value = "input") + private MongoDbMigrationSettings input; + + /** + * An array containing a single MongoDbMigrationProgress object. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private List output; + + /** + * Get the input value. + * + * @return the input value + */ + public MongoDbMigrationSettings input() { + return this.input; + } + + /** + * Set the input value. + * + * @param input the input value to set + * @return the ValidateMongoDbTaskProperties object itself. + */ + public ValidateMongoDbTaskProperties withInput(MongoDbMigrationSettings input) { + this.input = input; + return this; + } + + /** + * Get an array containing a single MongoDbMigrationProgress object. + * + * @return the output value + */ + public List output() { + return this.output; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateSyncMigrationInputSqlServerTaskInput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateSyncMigrationInputSqlServerTaskInput.java new file mode 100644 index 000000000000..20bf969e5809 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateSyncMigrationInputSqlServerTaskInput.java @@ -0,0 +1,96 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Input for task that validates migration input for SQL sync migrations. + */ +public class ValidateSyncMigrationInputSqlServerTaskInput { + /** + * Information for connecting to source SQL server. + */ + @JsonProperty(value = "sourceConnectionInfo", required = true) + private SqlConnectionInfo sourceConnectionInfo; + + /** + * Information for connecting to target. + */ + @JsonProperty(value = "targetConnectionInfo", required = true) + private SqlConnectionInfo targetConnectionInfo; + + /** + * Databases to migrate. + */ + @JsonProperty(value = "selectedDatabases", required = true) + private List selectedDatabases; + + /** + * Get information for connecting to source SQL server. + * + * @return the sourceConnectionInfo value + */ + public SqlConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set information for connecting to source SQL server. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the ValidateSyncMigrationInputSqlServerTaskInput object itself. + */ + public ValidateSyncMigrationInputSqlServerTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get information for connecting to target. + * + * @return the targetConnectionInfo value + */ + public SqlConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set information for connecting to target. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ValidateSyncMigrationInputSqlServerTaskInput object itself. + */ + public ValidateSyncMigrationInputSqlServerTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * 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 ValidateSyncMigrationInputSqlServerTaskInput object itself. + */ + public ValidateSyncMigrationInputSqlServerTaskInput withSelectedDatabases(List selectedDatabases) { + this.selectedDatabases = selectedDatabases; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateSyncMigrationInputSqlServerTaskOutput.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateSyncMigrationInputSqlServerTaskOutput.java new file mode 100644 index 000000000000..cd289899b5ac --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidateSyncMigrationInputSqlServerTaskOutput.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Output for task that validates migration input for SQL sync migrations. + */ +public class ValidateSyncMigrationInputSqlServerTaskOutput { + /** + * 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidationError.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidationError.java new file mode 100644 index 000000000000..02281636cb89 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidationError.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description about the errors happen while performing migration validation. + */ +public class ValidationError { + /** + * Error Text. + */ + @JsonProperty(value = "text") + private String text; + + /** + * Severity of the error. Possible values include: 'Message', 'Warning', + * 'Error'. + */ + @JsonProperty(value = "severity") + private Severity severity; + + /** + * Get error Text. + * + * @return the text value + */ + public String text() { + return this.text; + } + + /** + * Set error Text. + * + * @param text the text value to set + * @return the ValidationError object itself. + */ + public ValidationError withText(String text) { + this.text = text; + return this; + } + + /** + * Get severity of the error. Possible values include: 'Message', 'Warning', 'Error'. + * + * @return the severity value + */ + public Severity severity() { + return this.severity; + } + + /** + * Set severity of the error. Possible values include: 'Message', 'Warning', 'Error'. + * + * @param severity the severity value to set + * @return the ValidationError object itself. + */ + public ValidationError withSeverity(Severity severity) { + this.severity = severity; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidationStatus.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidationStatus.java new file mode 100644 index 000000000000..67e3f577fab1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/ValidationStatus.java @@ -0,0 +1,59 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ValidationStatus. + */ +public final class ValidationStatus extends ExpandableStringEnum { + /** Static value Default for ValidationStatus. */ + public static final ValidationStatus DEFAULT = fromString("Default"); + + /** Static value NotStarted for ValidationStatus. */ + public static final ValidationStatus NOT_STARTED = fromString("NotStarted"); + + /** Static value Initialized for ValidationStatus. */ + public static final ValidationStatus INITIALIZED = fromString("Initialized"); + + /** Static value InProgress for ValidationStatus. */ + public static final ValidationStatus IN_PROGRESS = fromString("InProgress"); + + /** Static value Completed for ValidationStatus. */ + public static final ValidationStatus COMPLETED = fromString("Completed"); + + /** Static value CompletedWithIssues for ValidationStatus. */ + public static final ValidationStatus COMPLETED_WITH_ISSUES = fromString("CompletedWithIssues"); + + /** Static value Stopped for ValidationStatus. */ + public static final ValidationStatus STOPPED = fromString("Stopped"); + + /** Static value Failed for ValidationStatus. */ + public static final ValidationStatus FAILED = fromString("Failed"); + + /** + * Creates or finds a ValidationStatus from its string representation. + * @param name a name to look for + * @return the corresponding ValidationStatus + */ + @JsonCreator + public static ValidationStatus fromString(String name) { + return fromString(name, ValidationStatus.class); + } + + /** + * @return known ValidationStatus values + */ + public static Collection values() { + return values(ValidationStatus.class); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/WaitStatistics.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/WaitStatistics.java new file mode 100644 index 000000000000..7fca168c6d34 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/WaitStatistics.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.azuredatabasemigrationservice.v2018_07_15_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Wait statistics gathered during query batch execution. + */ +public class WaitStatistics { + /** + * Type of the Wait. + */ + @JsonProperty(value = "waitType") + private String waitType; + + /** + * Total wait time in millisecond(s). + */ + @JsonProperty(value = "waitTimeMs") + private Double waitTimeMs; + + /** + * Total no. of waits. + */ + @JsonProperty(value = "waitCount") + private Long waitCount; + + /** + * Get type of the Wait. + * + * @return the waitType value + */ + public String waitType() { + return this.waitType; + } + + /** + * Set type of the Wait. + * + * @param waitType the waitType value to set + * @return the WaitStatistics object itself. + */ + public WaitStatistics withWaitType(String waitType) { + this.waitType = waitType; + return this; + } + + /** + * Get total wait time in millisecond(s). + * + * @return the waitTimeMs value + */ + public Double waitTimeMs() { + return this.waitTimeMs; + } + + /** + * Set total wait time in millisecond(s). + * + * @param waitTimeMs the waitTimeMs value to set + * @return the WaitStatistics object itself. + */ + public WaitStatistics withWaitTimeMs(Double waitTimeMs) { + this.waitTimeMs = waitTimeMs; + return this; + } + + /** + * Get total no. of waits. + * + * @return the waitCount value + */ + public Long waitCount() { + return this.waitCount; + } + + /** + * Set total no. of waits. + * + * @param waitCount the waitCount value to set + * @return the WaitStatistics object itself. + */ + public WaitStatistics withWaitCount(Long waitCount) { + this.waitCount = waitCount; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/AvailableServiceSkuImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/AvailableServiceSkuImpl.java new file mode 100644 index 000000000000..cf577e5be917 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/AvailableServiceSkuImpl.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.AvailableServiceSku; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.AvailableServiceSkuCapacity; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.AvailableServiceSkuSku; + +class AvailableServiceSkuImpl extends WrapperImpl implements AvailableServiceSku { + private final DataMigrationManager manager; + + AvailableServiceSkuImpl(AvailableServiceSkuInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + + + @Override + public AvailableServiceSkuCapacity capacity() { + return this.inner().capacity(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public AvailableServiceSkuSku sku() { + return this.inner().sku(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/AvailableServiceSkuInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/AvailableServiceSkuInner.java new file mode 100644 index 000000000000..c3effe8aa5bd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/AvailableServiceSkuInner.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.AvailableServiceSkuSku; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.AvailableServiceSkuCapacity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the available service SKU. + */ +public class AvailableServiceSkuInner { + /** + * The resource type, including the provider namespace. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /** + * SKU name, tier, etc. + */ + @JsonProperty(value = "sku") + private AvailableServiceSkuSku sku; + + /** + * A description of the scaling capacities of the SKU. + */ + @JsonProperty(value = "capacity") + private AvailableServiceSkuCapacity capacity; + + /** + * Get the resource type, including the provider namespace. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resource type, including the provider namespace. + * + * @param resourceType the resourceType value to set + * @return the AvailableServiceSkuInner object itself. + */ + public AvailableServiceSkuInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get sKU name, tier, etc. + * + * @return the sku value + */ + public AvailableServiceSkuSku sku() { + return this.sku; + } + + /** + * Set sKU name, tier, etc. + * + * @param sku the sku value to set + * @return the AvailableServiceSkuInner object itself. + */ + public AvailableServiceSkuInner withSku(AvailableServiceSkuSku sku) { + this.sku = sku; + return this; + } + + /** + * Get a description of the scaling capacities of the SKU. + * + * @return the capacity value + */ + public AvailableServiceSkuCapacity capacity() { + return this.capacity; + } + + /** + * Set a description of the scaling capacities of the SKU. + * + * @param capacity the capacity value to set + * @return the AvailableServiceSkuInner object itself. + */ + public AvailableServiceSkuInner withCapacity(AvailableServiceSkuCapacity capacity) { + this.capacity = capacity; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/CommandPropertiesImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/CommandPropertiesImpl.java new file mode 100644 index 000000000000..f63c9fbe84ae --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/CommandPropertiesImpl.java @@ -0,0 +1,39 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.CommandProperties; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ODataError; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.CommandState; + +class CommandPropertiesImpl extends WrapperImpl implements CommandProperties { + private final DataMigrationManager manager; + CommandPropertiesImpl(CommandPropertiesInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public List errors() { + return this.inner().errors(); + } + + @Override + public CommandState state() { + return this.inner().state(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/CommandPropertiesInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/CommandPropertiesInner.java new file mode 100644 index 000000000000..c26acca7d60e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/CommandPropertiesInner.java @@ -0,0 +1,88 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ODataError; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.CommandState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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") +@JsonTypeName("Unknown") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class), + @JsonSubTypes.Type(name = "PostgreSqlConnectionInfo", value = PostgreSqlConnectionInfo.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 = "GetTDECertificates.Sql", value = GetTdeCertificatesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "Validate.MongoDb", value = ValidateMongoDbTaskProperties.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "ValidateMigrationInput.SqlServer.SqlDb.Sync", value = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.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", value = MigrateSqlServerSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "Migrate.MongoDb", value = MigrateMongoDbTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureDbForMySql", value = ConnectToTargetAzureDbForMySqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTables.AzureSqlDb.Sync", value = GetUserTablesSqlSyncTaskProperties.class), + @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb.Sync", value = ConnectToTargetSqlSqlDbSyncTaskProperties.class), + @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.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), + @JsonSubTypes.Type(name = "ConnectToSource.MySql", value = ConnectToSourceMySqlTaskProperties.class), + @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) +}) +public class CommandPropertiesInner { + /** + * Array of errors. This is ignored if submitted. + */ + @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; + + /** + * The state of the command. This is ignored if submitted. Possible values + * include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private CommandState state; + + /** + * Get array of errors. This is ignored if submitted. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + + /** + * Get the state of the command. This is ignored if submitted. Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', 'Failed'. + * + * @return the state value + */ + public CommandState state() { + return this.state; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationManager.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationManager.java new file mode 100644 index 000000000000..62387e932025 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationManager.java @@ -0,0 +1,171 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkus; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Services; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Tasks; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Projects; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Usages; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Operations; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Files; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure DataMigration resource management. + */ +public final class DataMigrationManager extends ManagerCore { + private ResourceSkus resourceSkus; + private Services services; + private Tasks tasks; + private Projects projects; + private Usages usages; + private Operations operations; + private Files files; + /** + * Get a Configurable instance that can be used to create DataMigrationManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new DataMigrationManager.ConfigurableImpl(); + } + /** + * Creates an instance of DataMigrationManager that exposes DataMigration resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the DataMigrationManager + */ + public static DataMigrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new DataMigrationManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of DataMigrationManager that exposes DataMigration resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the DataMigrationManager + */ + public static DataMigrationManager authenticate(RestClient restClient, String subscriptionId) { + return new DataMigrationManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of DataMigrationManager that exposes DataMigration management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing DataMigration management API entry points that work across subscriptions + */ + DataMigrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage ResourceSkus. + */ + public ResourceSkus resourceSkus() { + if (this.resourceSkus == null) { + this.resourceSkus = new ResourceSkusImpl(this); + } + return this.resourceSkus; + } + + /** + * @return Entry point to manage Services. + */ + public Services services() { + if (this.services == null) { + this.services = new ServicesImpl(this); + } + return this.services; + } + + /** + * @return Entry point to manage Tasks. + */ + public Tasks tasks() { + if (this.tasks == null) { + this.tasks = new TasksImpl(this); + } + return this.tasks; + } + + /** + * @return Entry point to manage Projects. + */ + public Projects projects() { + if (this.projects == null) { + this.projects = new ProjectsImpl(this); + } + return this.projects; + } + + /** + * @return Entry point to manage Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(this); + } + return this.usages; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage Files. + */ + public Files files() { + if (this.files == null) { + this.files = new FilesImpl(this); + } + return this.files; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public DataMigrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return DataMigrationManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private DataMigrationManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new DataMigrationServiceClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceClientImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceClientImpl.java new file mode 100644 index 000000000000..06f8c5be3b27 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceClientImpl.java @@ -0,0 +1,280 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the DataMigrationServiceClientImpl class. + */ +public class DataMigrationServiceClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Version of the API. */ + private String apiVersion; + + /** + * Gets Version of the API. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** Identifier of the subscription. */ + private String subscriptionId; + + /** + * Gets Identifier of the subscription. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Identifier of the subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public DataMigrationServiceClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The ResourceSkusInner object to access its operations. + */ + private ResourceSkusInner resourceSkus; + + /** + * Gets the ResourceSkusInner object to access its operations. + * @return the ResourceSkusInner object. + */ + public ResourceSkusInner resourceSkus() { + return this.resourceSkus; + } + + /** + * The ServicesInner object to access its operations. + */ + private ServicesInner services; + + /** + * Gets the ServicesInner object to access its operations. + * @return the ServicesInner object. + */ + public ServicesInner services() { + return this.services; + } + + /** + * The TasksInner object to access its operations. + */ + private TasksInner tasks; + + /** + * Gets the TasksInner object to access its operations. + * @return the TasksInner object. + */ + public TasksInner tasks() { + return this.tasks; + } + + /** + * The ProjectsInner object to access its operations. + */ + private ProjectsInner projects; + + /** + * Gets the ProjectsInner object to access its operations. + * @return the ProjectsInner object. + */ + public ProjectsInner projects() { + return this.projects; + } + + /** + * The UsagesInner object to access its operations. + */ + private UsagesInner usages; + + /** + * Gets the UsagesInner object to access its operations. + * @return the UsagesInner object. + */ + public UsagesInner usages() { + return this.usages; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The FilesInner object to access its operations. + */ + private FilesInner files; + + /** + * Gets the FilesInner object to access its operations. + * @return the FilesInner object. + */ + public FilesInner files() { + return this.files; + } + + /** + * Initializes an instance of DataMigrationServiceClient client. + * + * @param credentials the management credentials for Azure + */ + public DataMigrationServiceClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of DataMigrationServiceClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public DataMigrationServiceClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of DataMigrationServiceClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public DataMigrationServiceClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2018-07-15-preview"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.resourceSkus = new ResourceSkusInner(restClient().retrofit(), this); + this.services = new ServicesInner(restClient().retrofit(), this); + this.tasks = new TasksInner(restClient().retrofit(), this); + this.projects = new ProjectsInner(restClient().retrofit(), this); + this.usages = new UsagesInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.files = new FilesInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "DataMigrationServiceClient", "2018-07-15-preview"); + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceImpl.java new file mode 100644 index 000000000000..fe415e4e30bd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceImpl.java @@ -0,0 +1,108 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.DataMigrationService; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ServiceProvisioningState; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ServiceSku; + +class DataMigrationServiceImpl extends GroupableResourceCoreImpl implements DataMigrationService, DataMigrationService.Definition, DataMigrationService.Update { + DataMigrationServiceImpl(String name, DataMigrationServiceInner inner, DataMigrationManager manager) { + super(name, inner, manager); + } + + @Override + public Observable createResourceAsync() { + ServicesInner client = this.manager().inner().services(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ServicesInner client = this.manager().inner().services(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ServicesInner client = this.manager().inner().services(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public ServiceProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String publicKey() { + return this.inner().publicKey(); + } + + @Override + public ServiceSku sku() { + return this.inner().sku(); + } + + @Override + public String virtualSubnetId() { + return this.inner().virtualSubnetId(); + } + + @Override + public DataMigrationServiceImpl withVirtualSubnetId(String virtualSubnetId) { + this.inner().withVirtualSubnetId(virtualSubnetId); + return this; + } + + @Override + public DataMigrationServiceImpl withEtag(String etag) { + this.inner().withEtag(etag); + return this; + } + + @Override + public DataMigrationServiceImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public DataMigrationServiceImpl withPublicKey(String publicKey) { + this.inner().withPublicKey(publicKey); + return this; + } + + @Override + public DataMigrationServiceImpl withSku(ServiceSku sku) { + this.inner().withSku(sku); + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceInner.java new file mode 100644 index 000000000000..901cb99863e5 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceInner.java @@ -0,0 +1,171 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ServiceProvisioningState; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ServiceSku; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * A Database Migration Service resource. + */ +@JsonFlatten +public class DataMigrationServiceInner extends Resource { + /** + * HTTP strong entity tag value. Ignored if submitted. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * The resource kind. Only 'vm' (the default) is supported. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * The resource's provisioning state. Possible values include: 'Accepted', + * 'Deleting', 'Deploying', 'Stopped', 'Stopping', 'Starting', + * 'FailedToStart', 'FailedToStop', 'Succeeded', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ServiceProvisioningState provisioningState; + + /** + * The public key of the service, used to encrypt secrets sent to the + * service. + */ + @JsonProperty(value = "properties.publicKey") + private String publicKey; + + /** + * The ID of the Microsoft.Network/virtualNetworks/subnets resource to + * which the service should be joined. + */ + @JsonProperty(value = "properties.virtualSubnetId", required = true) + private String virtualSubnetId; + + /** + * Service SKU. + */ + @JsonProperty(value = "sku") + private ServiceSku sku; + + /** + * Get hTTP strong entity tag value. Ignored if submitted. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set hTTP strong entity tag value. Ignored if submitted. + * + * @param etag the etag value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get the resource kind. Only 'vm' (the default) is supported. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set the resource kind. Only 'vm' (the default) is supported. + * + * @param kind the kind value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the resource's provisioning state. Possible values include: 'Accepted', 'Deleting', 'Deploying', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop', 'Succeeded', 'Failed'. + * + * @return the provisioningState value + */ + public ServiceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the public key of the service, used to encrypt secrets sent to the service. + * + * @return the publicKey value + */ + public String publicKey() { + return this.publicKey; + } + + /** + * Set the public key of the service, used to encrypt secrets sent to the service. + * + * @param publicKey the publicKey value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withPublicKey(String publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * Get the ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined. + * + * @return the virtualSubnetId value + */ + public String virtualSubnetId() { + return this.virtualSubnetId; + } + + /** + * Set the ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined. + * + * @param virtualSubnetId the virtualSubnetId value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withVirtualSubnetId(String virtualSubnetId) { + this.virtualSubnetId = virtualSubnetId; + return this; + } + + /** + * Get service SKU. + * + * @return the sku value + */ + public ServiceSku sku() { + return this.sku; + } + + /** + * Set service SKU. + * + * @param sku the sku value to set + * @return the DataMigrationServiceInner object itself. + */ + public DataMigrationServiceInner withSku(ServiceSku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceStatusResponseImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceStatusResponseImpl.java new file mode 100644 index 000000000000..20d9944bec18 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceStatusResponseImpl.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.DataMigrationServiceStatusResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class DataMigrationServiceStatusResponseImpl extends WrapperImpl implements DataMigrationServiceStatusResponse { + private final DataMigrationManager manager; + DataMigrationServiceStatusResponseImpl(DataMigrationServiceStatusResponseInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public String agentVersion() { + return this.inner().agentVersion(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public List supportedTaskTypes() { + return this.inner().supportedTaskTypes(); + } + + @Override + public String vmSize() { + return this.inner().vmSize(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceStatusResponseInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceStatusResponseInner.java new file mode 100644 index 000000000000..092e6515a284 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/DataMigrationServiceStatusResponseInner.java @@ -0,0 +1,124 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Service health status. + */ +public class DataMigrationServiceStatusResponseInner { + /** + * The DMS instance agent version. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * The machine-readable status, such as 'Initializing', 'Offline', + * 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', + * 'FailedToStart', 'FailedToStop' or 'Failed'. + */ + @JsonProperty(value = "status") + private String status; + + /** + * The services virtual machine size, such as 'Standard_D2_v2'. + */ + @JsonProperty(value = "vmSize") + private String vmSize; + + /** + * The list of supported task types. + */ + @JsonProperty(value = "supportedTaskTypes") + private List supportedTaskTypes; + + /** + * Get the DMS instance agent version. + * + * @return the agentVersion value + */ + public String agentVersion() { + return this.agentVersion; + } + + /** + * Set the DMS instance agent version. + * + * @param agentVersion the agentVersion value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get the machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed'. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed'. + * + * @param status the status value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the services virtual machine size, such as 'Standard_D2_v2'. + * + * @return the vmSize value + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set the services virtual machine size, such as 'Standard_D2_v2'. + * + * @param vmSize the vmSize value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withVmSize(String vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the list of supported task types. + * + * @return the supportedTaskTypes value + */ + public List supportedTaskTypes() { + return this.supportedTaskTypes; + } + + /** + * Set the list of supported task types. + * + * @param supportedTaskTypes the supportedTaskTypes value to set + * @return the DataMigrationServiceStatusResponseInner object itself. + */ + public DataMigrationServiceStatusResponseInner withSupportedTaskTypes(List supportedTaskTypes) { + this.supportedTaskTypes = supportedTaskTypes; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FileStorageInfoImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FileStorageInfoImpl.java new file mode 100644 index 000000000000..25f4eb5361e4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FileStorageInfoImpl.java @@ -0,0 +1,37 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.FileStorageInfo; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.Map; + +class FileStorageInfoImpl extends WrapperImpl implements FileStorageInfo { + private final DataMigrationManager manager; + FileStorageInfoImpl(FileStorageInfoInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Map headers() { + return this.inner().headers(); + } + + @Override + public String uri() { + return this.inner().uri(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FileStorageInfoInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FileStorageInfoInner.java new file mode 100644 index 000000000000..b38d7e91e150 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FileStorageInfoInner.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * File storage information. + */ +public class FileStorageInfoInner { + /** + * A URI that can be used to access the file content. + */ + @JsonProperty(value = "uri") + private String uri; + + /** + * The headers property. + */ + @JsonProperty(value = "headers") + private Map headers; + + /** + * Get a URI that can be used to access the file content. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Set a URI that can be used to access the file content. + * + * @param uri the uri value to set + * @return the FileStorageInfoInner object itself. + */ + public FileStorageInfoInner withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the headers value. + * + * @return the headers value + */ + public Map headers() { + return this.headers; + } + + /** + * Set the headers value. + * + * @param headers the headers value to set + * @return the FileStorageInfoInner object itself. + */ + public FileStorageInfoInner withHeaders(Map headers) { + this.headers = headers; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FilesImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FilesImpl.java new file mode 100644 index 000000000000..c4ed7c4bc8fb --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FilesImpl.java @@ -0,0 +1,106 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Files; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.FileStorageInfo; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectFile; + +class FilesImpl extends WrapperImpl implements Files { + private final DataMigrationManager manager; + + FilesImpl(DataMigrationManager manager) { + super(manager.inner().files()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ProjectFileImpl define(String name) { + return wrapModel(name); + } + + private ProjectFileImpl wrapModel(ProjectFileInner inner) { + return new ProjectFileImpl(inner, manager()); + } + + private ProjectFileImpl wrapModel(String name) { + return new ProjectFileImpl(name, this.manager()); + } + + @Override + public Observable readAsync(String groupName, String serviceName, String projectName, String fileName) { + FilesInner client = this.inner(); + return client.readAsync(groupName, serviceName, projectName, fileName) + .map(new Func1() { + @Override + public FileStorageInfo call(FileStorageInfoInner inner) { + return new FileStorageInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable readWriteAsync(String groupName, String serviceName, String projectName, String fileName) { + FilesInner client = this.inner(); + return client.readWriteAsync(groupName, serviceName, projectName, fileName) + .map(new Func1() { + @Override + public FileStorageInfo call(FileStorageInfoInner inner) { + return new FileStorageInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync(final String groupName, final String serviceName, final String projectName) { + FilesInner client = this.inner(); + return client.listAsync(groupName, serviceName, projectName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProjectFile call(ProjectFileInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String groupName, String serviceName, String projectName, String fileName) { + FilesInner client = this.inner(); + return client.getAsync(groupName, serviceName, projectName, fileName) + .map(new Func1() { + @Override + public ProjectFile call(ProjectFileInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String groupName, String serviceName, String projectName, String fileName) { + FilesInner client = this.inner(); + return client.deleteAsync(groupName, serviceName, projectName, fileName).toCompletable(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FilesInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FilesInner.java new file mode 100644 index 000000000000..6ee4a0433963 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/FilesInner.java @@ -0,0 +1,993 @@ +/** + * 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.azuredatabasemigrationservice.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.azuredatabasemigrationservice.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 Files. + */ +public class FilesInner { + /** The Retrofit service to perform REST calls. */ + private FilesService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of FilesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public FilesInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(FilesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Files to be + * used by Retrofit to perform actually REST calls. + */ + interface FilesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Files list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Files get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Path("fileName") String fileName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Files createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Path("fileName") String fileName, @Body ProjectFileInner 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.azuredatabasemigrationservice.v2018_07_15_preview.Files delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Path("fileName") String fileName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Files update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Path("fileName") String fileName, @Body ProjectFileInner 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.azuredatabasemigrationservice.v2018_07_15_preview.Files read" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}/read") + Observable> read(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Path("fileName") String fileName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Files readWrite" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}/readwrite") + Observable> readWrite(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Path("fileName") String fileName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Files listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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<ProjectFileInner> object if successful. + */ + public PagedList list(final String groupName, final String serviceName, final String projectName) { + ServiceResponse> response = listSinglePageAsync(groupName, serviceName, projectName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param 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 projectName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(groupName, serviceName, projectName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProjectFileInner> object + */ + public Observable> listAsync(final String groupName, final String serviceName, final String projectName) { + return listWithServiceResponseAsync(groupName, serviceName, projectName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ProjectFileInner> object + */ + public Observable>> listWithServiceResponseAsync(final String groupName, final String serviceName, final String projectName) { + return listSinglePageAsync(groupName, serviceName, projectName) + .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 files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + ServiceResponse> * @param groupName Name of the resource group + ServiceResponse> * @param serviceName Name of the service + ServiceResponse> * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProjectFileInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String groupName, final String serviceName, final String projectName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, this.client.apiVersion(), 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); + } + + /** + * Get file information. + * The files resource is a nested, proxy-only resource representing a file stored under the project resource. This method retrieves information about a file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 ProjectFileInner object if successful. + */ + public ProjectFileInner get(String groupName, String serviceName, String projectName, String fileName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, fileName).toBlocking().single().body(); + } + + /** + * Get file information. + * The files resource is a nested, proxy-only resource representing a file stored under the project resource. This method retrieves information about a file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param 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 projectName, String fileName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, projectName, fileName), serviceCallback); + } + + /** + * Get file information. + * The files resource is a nested, proxy-only resource representing a file stored under the project resource. This method retrieves information about a file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectFileInner object + */ + public Observable getAsync(String groupName, String serviceName, String projectName, String fileName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, fileName).map(new Func1, ProjectFileInner>() { + @Override + public ProjectFileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get file information. + * The files resource is a nested, proxy-only resource representing a file stored under the project resource. This method retrieves information about a file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectFileInner object + */ + public Observable> getWithServiceResponseAsync(String groupName, String serviceName, String projectName, String fileName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName is required and cannot be null."); + } + if (fileName == null) { + throw new IllegalArgumentException("Parameter fileName 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, projectName, fileName, 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); + } + + /** + * Create a file resource. + * The PUT method creates a new file or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param parameters Information about the file + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 ProjectFileInner object if successful. + */ + public ProjectFileInner createOrUpdate(String groupName, String serviceName, String projectName, String fileName, ProjectFileInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, fileName, parameters).toBlocking().single().body(); + } + + /** + * Create a file resource. + * The PUT method creates a new file or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param parameters Information about the file + * @param 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 projectName, String fileName, ProjectFileInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, fileName, parameters), serviceCallback); + } + + /** + * Create a file resource. + * The PUT method creates a new file or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param parameters Information about the file + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectFileInner object + */ + public Observable createOrUpdateAsync(String groupName, String serviceName, String projectName, String fileName, ProjectFileInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, fileName, parameters).map(new Func1, ProjectFileInner>() { + @Override + public ProjectFileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a file resource. + * The PUT method creates a new file or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param parameters Information about the file + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectFileInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String groupName, String serviceName, String projectName, String fileName, ProjectFileInner 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName is required and cannot be null."); + } + if (fileName == null) { + throw new IllegalArgumentException("Parameter fileName 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, projectName, fileName, 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); + } + + /** + * Delete file. + * This method deletes a file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 projectName, String fileName) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName, fileName).toBlocking().single().body(); + } + + /** + * Delete file. + * This method deletes a file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param 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 projectName, String fileName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName, fileName), serviceCallback); + } + + /** + * Delete file. + * This method deletes a file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String groupName, String serviceName, String projectName, String fileName) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName, fileName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete file. + * This method deletes a file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, String projectName, String fileName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName is required and cannot be null."); + } + if (fileName == null) { + throw new IllegalArgumentException("Parameter fileName 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, projectName, fileName, 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); + } + + /** + * Update a file. + * This method updates an existing file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param parameters Information about the file + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 ProjectFileInner object if successful. + */ + public ProjectFileInner update(String groupName, String serviceName, String projectName, String fileName, ProjectFileInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, fileName, parameters).toBlocking().single().body(); + } + + /** + * Update a file. + * This method updates an existing file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param parameters Information about the file + * @param 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 projectName, String fileName, ProjectFileInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, projectName, fileName, parameters), serviceCallback); + } + + /** + * Update a file. + * This method updates an existing file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param parameters Information about the file + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectFileInner object + */ + public Observable updateAsync(String groupName, String serviceName, String projectName, String fileName, ProjectFileInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, fileName, parameters).map(new Func1, ProjectFileInner>() { + @Override + public ProjectFileInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update a file. + * This method updates an existing file. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param parameters Information about the file + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectFileInner object + */ + public Observable> updateWithServiceResponseAsync(String groupName, String serviceName, String projectName, String fileName, ProjectFileInner 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName is required and cannot be null."); + } + if (fileName == null) { + throw new IllegalArgumentException("Parameter fileName 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, projectName, fileName, 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); + } + + /** + * Request storage information for downloading the file content. + * This method is used for requesting storage information using which contents of the file can be downloaded. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 FileStorageInfoInner object if successful. + */ + public FileStorageInfoInner read(String groupName, String serviceName, String projectName, String fileName) { + return readWithServiceResponseAsync(groupName, serviceName, projectName, fileName).toBlocking().single().body(); + } + + /** + * Request storage information for downloading the file content. + * This method is used for requesting storage information using which contents of the file can be downloaded. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param 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 readAsync(String groupName, String serviceName, String projectName, String fileName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(readWithServiceResponseAsync(groupName, serviceName, projectName, fileName), serviceCallback); + } + + /** + * Request storage information for downloading the file content. + * This method is used for requesting storage information using which contents of the file can be downloaded. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileStorageInfoInner object + */ + public Observable readAsync(String groupName, String serviceName, String projectName, String fileName) { + return readWithServiceResponseAsync(groupName, serviceName, projectName, fileName).map(new Func1, FileStorageInfoInner>() { + @Override + public FileStorageInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Request storage information for downloading the file content. + * This method is used for requesting storage information using which contents of the file can be downloaded. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileStorageInfoInner object + */ + public Observable> readWithServiceResponseAsync(String groupName, String serviceName, String projectName, String fileName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName is required and cannot be null."); + } + if (fileName == null) { + throw new IllegalArgumentException("Parameter fileName 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.read(this.client.subscriptionId(), groupName, serviceName, projectName, fileName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = readDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse readDelegate(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); + } + + /** + * Request information for reading and writing file content. + * This method is used for requesting information for reading and writing the file content. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 FileStorageInfoInner object if successful. + */ + public FileStorageInfoInner readWrite(String groupName, String serviceName, String projectName, String fileName) { + return readWriteWithServiceResponseAsync(groupName, serviceName, projectName, fileName).toBlocking().single().body(); + } + + /** + * Request information for reading and writing file content. + * This method is used for requesting information for reading and writing the file content. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @param 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 readWriteAsync(String groupName, String serviceName, String projectName, String fileName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(readWriteWithServiceResponseAsync(groupName, serviceName, projectName, fileName), serviceCallback); + } + + /** + * Request information for reading and writing file content. + * This method is used for requesting information for reading and writing the file content. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileStorageInfoInner object + */ + public Observable readWriteAsync(String groupName, String serviceName, String projectName, String fileName) { + return readWriteWithServiceResponseAsync(groupName, serviceName, projectName, fileName).map(new Func1, FileStorageInfoInner>() { + @Override + public FileStorageInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Request information for reading and writing file content. + * This method is used for requesting information for reading and writing the file content. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param fileName Name of the File + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FileStorageInfoInner object + */ + public Observable> readWriteWithServiceResponseAsync(String groupName, String serviceName, String projectName, String fileName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName is required and cannot be null."); + } + if (fileName == null) { + throw new IllegalArgumentException("Parameter fileName 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.readWrite(this.client.subscriptionId(), groupName, serviceName, projectName, fileName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = readWriteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse readWriteDelegate(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 files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + * @param 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<ProjectFileInner> 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 files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + * @param 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 files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + * @param 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<ProjectFileInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + * @param 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<ProjectFileInner> 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 files in a project. + * The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProjectFileInner> 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/IdParsingUtils.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..da7d4b7e57f9 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/NameAvailabilityResponseImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/NameAvailabilityResponseImpl.java new file mode 100644 index 000000000000..ea783df1b207 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/NameAvailabilityResponseImpl.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.NameAvailabilityResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.NameCheckFailureReason; + +class NameAvailabilityResponseImpl extends WrapperImpl implements NameAvailabilityResponse { + private final DataMigrationManager manager; + NameAvailabilityResponseImpl(NameAvailabilityResponseInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public NameCheckFailureReason reason() { + return this.inner().reason(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/NameAvailabilityResponseInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/NameAvailabilityResponseInner.java new file mode 100644 index 000000000000..7ac67e822007 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/NameAvailabilityResponseInner.java @@ -0,0 +1,99 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.NameCheckFailureReason; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Indicates whether a proposed resource name is available. + */ +public class NameAvailabilityResponseInner { + /** + * If true, the name is valid and available. If false, 'reason' describes + * why not. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /** + * The reason why the name is not available, if nameAvailable is false. + * Possible values include: 'AlreadyExists', 'Invalid'. + */ + @JsonProperty(value = "reason") + private NameCheckFailureReason reason; + + /** + * The localized reason why the name is not available, if nameAvailable is + * false. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get if true, the name is valid and available. If false, 'reason' describes why not. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set if true, the name is valid and available. If false, 'reason' describes why not. + * + * @param nameAvailable the nameAvailable value to set + * @return the NameAvailabilityResponseInner object itself. + */ + public NameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid'. + * + * @return the reason value + */ + public NameCheckFailureReason reason() { + return this.reason; + } + + /** + * Set the reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid'. + * + * @param reason the reason value to set + * @return the NameAvailabilityResponseInner object itself. + */ + public NameAvailabilityResponseInner withReason(NameCheckFailureReason reason) { + this.reason = reason; + return this; + } + + /** + * Get the localized reason why the name is not available, if nameAvailable is false. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the localized reason why the name is not available, if nameAvailable is false. + * + * @param message the message value to set + * @return the NameAvailabilityResponseInner object itself. + */ + public NameAvailabilityResponseInner withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/OperationsImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/OperationsImpl.java new file mode 100644 index 000000000000..c69df9c06b11 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/OperationsImpl.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. + * abc + */ + +package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ServiceOperation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final DataMigrationManager manager; + + OperationsImpl(DataMigrationManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceOperation call(ServiceOperationInner inner) { + return new ServiceOperationImpl(inner, manager()); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/OperationsInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/OperationsInner.java new file mode 100644 index 000000000000..3348e184a868 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/OperationsInner.java @@ -0,0 +1,293 @@ +/** + * 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.azuredatabasemigrationservice.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.azuredatabasemigrationservice.v2018_07_15_preview.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +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 Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Operations list" }) + @GET("providers/Microsoft.DataMigration/operations") + Observable> list(@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.azuredatabasemigrationservice.v2018_07_15_preview.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + * @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<ServiceOperationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceOperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceOperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceOperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), 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); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + * @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<ServiceOperationInner> 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 available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + * @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 available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + * @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<ServiceOperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + * @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<ServiceOperationInner> 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 available resource provider actions (operations). + * Lists all available actions exposed by the Database Migration Service resource provider. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceOperationInner> 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/PageImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/PageImpl.java new file mode 100644 index 000000000000..543af4aa7f53 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectFileImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectFileImpl.java new file mode 100644 index 000000000000..3b16c453c05d --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectFileImpl.java @@ -0,0 +1,120 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectFile; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectFileProperties; + +class ProjectFileImpl extends CreatableUpdatableImpl implements ProjectFile, ProjectFile.Definition, ProjectFile.Update { + private final DataMigrationManager manager; + private String groupName; + private String serviceName; + private String projectName; + private String fileName; + + ProjectFileImpl(String name, DataMigrationManager manager) { + super(name, new ProjectFileInner()); + this.manager = manager; + // Set resource name + this.fileName = name; + // + } + + ProjectFileImpl(ProjectFileInner inner, DataMigrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.fileName = inner.name(); + // set resource ancestor and positional variables + this.groupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "services"); + this.projectName = IdParsingUtils.getValueFromIdByName(inner.id(), "projects"); + this.fileName = IdParsingUtils.getValueFromIdByName(inner.id(), "files"); + // + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + FilesInner client = this.manager().inner().files(); + return client.createOrUpdateAsync(this.groupName, this.serviceName, this.projectName, this.fileName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + FilesInner client = this.manager().inner().files(); + return client.updateAsync(this.groupName, this.serviceName, this.projectName, this.fileName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + FilesInner client = this.manager().inner().files(); + return client.getAsync(this.groupName, this.serviceName, this.projectName, this.fileName); + } + + @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 ProjectFileProperties properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ProjectFileImpl withExistingProject(String groupName, String serviceName, String projectName) { + this.groupName = groupName; + this.serviceName = serviceName; + this.projectName = projectName; + return this; + } + + @Override + public ProjectFileImpl withEtag(String etag) { + this.inner().withEtag(etag); + return this; + } + + @Override + public ProjectFileImpl withProperties(ProjectFileProperties properties) { + this.inner().withProperties(properties); + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectFileInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectFileInner.java new file mode 100644 index 000000000000..cba4a445f98f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectFileInner.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectFileProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * A file resource. + */ +public class ProjectFileInner extends ProxyResource { + /** + * HTTP strong entity tag value. This is ignored if submitted. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * Custom file properties. + */ + @JsonProperty(value = "properties") + private ProjectFileProperties properties; + + /** + * Get hTTP strong entity tag value. This is ignored if submitted. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set hTTP strong entity tag value. This is ignored if submitted. + * + * @param etag the etag value to set + * @return the ProjectFileInner object itself. + */ + public ProjectFileInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get custom file properties. + * + * @return the properties value + */ + public ProjectFileProperties properties() { + return this.properties; + } + + /** + * Set custom file properties. + * + * @param properties the properties value to set + * @return the ProjectFileInner object itself. + */ + public ProjectFileInner withProperties(ProjectFileProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectImpl.java new file mode 100644 index 000000000000..358bf2275fc0 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectImpl.java @@ -0,0 +1,189 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Project; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.Map; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectSourcePlatform; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectTargetPlatform; +import org.joda.time.DateTime; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ConnectionInfo; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.DatabaseInfo; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectProvisioningState; + +class ProjectImpl extends CreatableUpdatableImpl implements Project, Project.Definition, Project.Update { + private final DataMigrationManager manager; + private String groupName; + private String serviceName; + private String projectName; + + ProjectImpl(String name, DataMigrationManager manager) { + super(name, new ProjectInner()); + this.manager = manager; + // Set resource name + this.projectName = name; + // + } + + ProjectImpl(ProjectInner inner, DataMigrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.projectName = inner.name(); + // set resource ancestor and positional variables + this.groupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "services"); + this.projectName = IdParsingUtils.getValueFromIdByName(inner.id(), "projects"); + // + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ProjectsInner client = this.manager().inner().projects(); + return client.createOrUpdateAsync(this.groupName, this.serviceName, this.projectName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ProjectsInner client = this.manager().inner().projects(); + return client.updateAsync(this.groupName, this.serviceName, this.projectName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ProjectsInner client = this.manager().inner().projects(); + return client.getAsync(this.groupName, this.serviceName, this.projectName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public DateTime creationTime() { + return this.inner().creationTime(); + } + + @Override + public List databasesInfo() { + return this.inner().databasesInfo(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProjectProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public ConnectionInfo sourceConnectionInfo() { + return this.inner().sourceConnectionInfo(); + } + + @Override + public ProjectSourcePlatform sourcePlatform() { + return this.inner().sourcePlatform(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public ConnectionInfo targetConnectionInfo() { + return this.inner().targetConnectionInfo(); + } + + @Override + public ProjectTargetPlatform targetPlatform() { + return this.inner().targetPlatform(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ProjectImpl withExistingService(String groupName, String serviceName) { + this.groupName = groupName; + this.serviceName = serviceName; + return this; + } + + @Override + public ProjectImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public ProjectImpl withSourcePlatform(ProjectSourcePlatform sourcePlatform) { + this.inner().withSourcePlatform(sourcePlatform); + return this; + } + + @Override + public ProjectImpl withTargetPlatform(ProjectTargetPlatform targetPlatform) { + this.inner().withTargetPlatform(targetPlatform); + return this; + } + + @Override + public ProjectImpl withDatabasesInfo(List databasesInfo) { + this.inner().withDatabasesInfo(databasesInfo); + return this; + } + + @Override + public ProjectImpl withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo) { + this.inner().withSourceConnectionInfo(sourceConnectionInfo); + return this; + } + + @Override + public ProjectImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + + @Override + public ProjectImpl withTargetConnectionInfo(ConnectionInfo targetConnectionInfo) { + this.inner().withTargetConnectionInfo(targetConnectionInfo); + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectInner.java new file mode 100644 index 000000000000..e7aba6c2a0d4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectInner.java @@ -0,0 +1,191 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectSourcePlatform; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectTargetPlatform; +import org.joda.time.DateTime; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ConnectionInfo; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.DatabaseInfo; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * A project resource. + */ +@JsonFlatten +public class ProjectInner extends Resource { + /** + * Source platform for the project. Possible values include: 'SQL', + * 'MySQL', 'PostgreSql', 'MongoDb', 'Unknown'. + */ + @JsonProperty(value = "properties.sourcePlatform", required = true) + private ProjectSourcePlatform sourcePlatform; + + /** + * Target platform for the project. Possible values include: 'SQLDB', + * 'SQLMI', 'AzureDbForMySql', 'AzureDbForPostgreSql', 'MongoDb', + * 'Unknown'. + */ + @JsonProperty(value = "properties.targetPlatform", required = true) + private ProjectTargetPlatform targetPlatform; + + /** + * UTC Date and time when project was created. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime creationTime; + + /** + * Information for connecting to source. + */ + @JsonProperty(value = "properties.sourceConnectionInfo") + private ConnectionInfo sourceConnectionInfo; + + /** + * Information for connecting to target. + */ + @JsonProperty(value = "properties.targetConnectionInfo") + private ConnectionInfo targetConnectionInfo; + + /** + * List of DatabaseInfo. + */ + @JsonProperty(value = "properties.databasesInfo") + private List databasesInfo; + + /** + * The project's provisioning state. Possible values include: 'Deleting', + * 'Succeeded'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProjectProvisioningState provisioningState; + + /** + * Get source platform for the project. Possible values include: 'SQL', 'MySQL', 'PostgreSql', 'MongoDb', 'Unknown'. + * + * @return the sourcePlatform value + */ + public ProjectSourcePlatform sourcePlatform() { + return this.sourcePlatform; + } + + /** + * Set source platform for the project. Possible values include: 'SQL', 'MySQL', 'PostgreSql', 'MongoDb', 'Unknown'. + * + * @param sourcePlatform the sourcePlatform value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withSourcePlatform(ProjectSourcePlatform sourcePlatform) { + this.sourcePlatform = sourcePlatform; + return this; + } + + /** + * Get target platform for the project. Possible values include: 'SQLDB', 'SQLMI', 'AzureDbForMySql', 'AzureDbForPostgreSql', 'MongoDb', 'Unknown'. + * + * @return the targetPlatform value + */ + public ProjectTargetPlatform targetPlatform() { + return this.targetPlatform; + } + + /** + * Set target platform for the project. Possible values include: 'SQLDB', 'SQLMI', 'AzureDbForMySql', 'AzureDbForPostgreSql', 'MongoDb', 'Unknown'. + * + * @param targetPlatform the targetPlatform value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withTargetPlatform(ProjectTargetPlatform targetPlatform) { + this.targetPlatform = targetPlatform; + return this; + } + + /** + * Get uTC Date and time when project was created. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Get information for connecting to source. + * + * @return the sourceConnectionInfo value + */ + public ConnectionInfo sourceConnectionInfo() { + return this.sourceConnectionInfo; + } + + /** + * Set information for connecting to source. + * + * @param sourceConnectionInfo the sourceConnectionInfo value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo) { + this.sourceConnectionInfo = sourceConnectionInfo; + return this; + } + + /** + * Get information for connecting to target. + * + * @return the targetConnectionInfo value + */ + public ConnectionInfo targetConnectionInfo() { + return this.targetConnectionInfo; + } + + /** + * Set information for connecting to target. + * + * @param targetConnectionInfo the targetConnectionInfo value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withTargetConnectionInfo(ConnectionInfo targetConnectionInfo) { + this.targetConnectionInfo = targetConnectionInfo; + return this; + } + + /** + * Get list of DatabaseInfo. + * + * @return the databasesInfo value + */ + public List databasesInfo() { + return this.databasesInfo; + } + + /** + * Set list of DatabaseInfo. + * + * @param databasesInfo the databasesInfo value to set + * @return the ProjectInner object itself. + */ + public ProjectInner withDatabasesInfo(List databasesInfo) { + this.databasesInfo = databasesInfo; + return this; + } + + /** + * Get the project's provisioning state. Possible values include: 'Deleting', 'Succeeded'. + * + * @return the provisioningState value + */ + public ProjectProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectTaskImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectTaskImpl.java new file mode 100644 index 000000000000..134166cc7f2f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectTaskImpl.java @@ -0,0 +1,120 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectTask; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectTaskProperties; + +class ProjectTaskImpl extends CreatableUpdatableImpl implements ProjectTask, ProjectTask.Definition, ProjectTask.Update { + private final DataMigrationManager manager; + private String groupName; + private String serviceName; + private String projectName; + private String taskName; + + ProjectTaskImpl(String name, DataMigrationManager manager) { + super(name, new ProjectTaskInner()); + this.manager = manager; + // Set resource name + this.taskName = name; + // + } + + ProjectTaskImpl(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.projectName = IdParsingUtils.getValueFromIdByName(inner.id(), "projects"); + this.taskName = IdParsingUtils.getValueFromIdByName(inner.id(), "tasks"); + // + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + 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() { + TasksInner client = this.manager().inner().tasks(); + return client.updateAsync(this.groupName, this.serviceName, this.projectName, this.taskName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + TasksInner client = this.manager().inner().tasks(); + return client.getAsync(this.groupName, this.serviceName, this.projectName, 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 ProjectTaskImpl withExistingProject(String groupName, String serviceName, String projectName) { + this.groupName = groupName; + this.serviceName = serviceName; + this.projectName = projectName; + return this; + } + + @Override + public ProjectTaskImpl withEtag(String etag) { + this.inner().withEtag(etag); + return this; + } + + @Override + public ProjectTaskImpl withProperties(ProjectTaskProperties properties) { + this.inner().withProperties(properties); + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectTaskInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectTaskInner.java new file mode 100644 index 000000000000..fa717e7f0ae4 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectTaskInner.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectTaskProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * A task resource. + */ +public class ProjectTaskInner extends ProxyResource { + /** + * HTTP strong entity tag value. This is ignored if submitted. + */ + @JsonProperty(value = "etag") + private String etag; + + /** + * Custom task properties. + */ + @JsonProperty(value = "properties") + private ProjectTaskProperties properties; + + /** + * Get hTTP strong entity tag value. This is ignored if submitted. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Set hTTP strong entity tag value. This is ignored if submitted. + * + * @param etag the etag value to set + * @return the ProjectTaskInner object itself. + */ + public ProjectTaskInner withEtag(String etag) { + this.etag = etag; + return this; + } + + /** + * Get custom task properties. + * + * @return the properties value + */ + public ProjectTaskProperties properties() { + return this.properties; + } + + /** + * Set custom task properties. + * + * @param properties the properties value to set + * @return the ProjectTaskInner object itself. + */ + public ProjectTaskInner withProperties(ProjectTaskProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectsImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectsImpl.java new file mode 100644 index 000000000000..62f5a89f7e51 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectsImpl.java @@ -0,0 +1,81 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Projects; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Project; + +class ProjectsImpl extends WrapperImpl implements Projects { + private final DataMigrationManager manager; + + ProjectsImpl(DataMigrationManager manager) { + super(manager.inner().projects()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ProjectImpl define(String name) { + return wrapModel(name); + } + + private ProjectImpl wrapModel(ProjectInner inner) { + return new ProjectImpl(inner, manager()); + } + + private ProjectImpl wrapModel(String name) { + return new ProjectImpl(name, this.manager()); + } + + @Override + public Observable listAsync(final String groupName, final String serviceName) { + ProjectsInner 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 Project call(ProjectInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String groupName, String serviceName, String projectName) { + ProjectsInner client = this.inner(); + return client.getAsync(groupName, serviceName, projectName) + .map(new Func1() { + @Override + public Project call(ProjectInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String groupName, String serviceName, String projectName) { + ProjectsInner client = this.inner(); + return client.deleteAsync(groupName, serviceName, projectName).toCompletable(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectsInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectsInner.java new file mode 100644 index 000000000000..a35e6438c61c --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ProjectsInner.java @@ -0,0 +1,834 @@ +/** + * 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.azuredatabasemigrationservice.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.azuredatabasemigrationservice.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.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 Projects. + */ +public class ProjectsInner { + /** The Retrofit service to perform REST calls. */ + private ProjectsService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of ProjectsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ProjectsInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(ProjectsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Projects to be + * used by Retrofit to perform actually REST calls. + */ + interface ProjectsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Projects list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Projects createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Body ProjectInner 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.azuredatabasemigrationservice.v2018_07_15_preview.Projects get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Projects delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Projects update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Body ProjectInner 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.azuredatabasemigrationservice.v2018_07_15_preview.Projects listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + ServiceResponse> * @param groupName Name of the resource group + ServiceResponse> * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProjectInner> 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."); + } + return service.list(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), 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 project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 ProjectInner object if successful. + */ + public ProjectInner createOrUpdate(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).toBlocking().single().body(); + } + + /** + * Create or update project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 projectName, ProjectInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, parameters), serviceCallback); + } + + /** + * Create or update project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable createOrUpdateAsync(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).map(new Func1, ProjectInner>() { + @Override + public ProjectInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update project. + * The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String groupName, String serviceName, String projectName, ProjectInner 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 ProjectInner object if successful. + */ + public ProjectInner get(String groupName, String serviceName, String projectName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName).toBlocking().single().body(); + } + + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, projectName), serviceCallback); + } + + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable getAsync(String groupName, String serviceName, String projectName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName).map(new Func1, ProjectInner>() { + @Override + public ProjectInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get project information. + * The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable> getWithServiceResponseAsync(String groupName, String serviceName, String projectName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 projectName) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName).toBlocking().single().body(); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName), serviceCallback); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String groupName, String serviceName, String projectName) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, String projectName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, Boolean deleteRunningTasks) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName, deleteRunningTasks).toBlocking().single().body(); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, Boolean deleteRunningTasks) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete project. + * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 ProjectInner object if successful. + */ + public ProjectInner update(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).toBlocking().single().body(); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @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 projectName, ProjectInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, projectName, parameters), serviceCallback); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable updateAsync(String groupName, String serviceName, String projectName, ProjectInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).map(new Func1, ProjectInner>() { + @Override + public ProjectInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update project. + * The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param parameters Information about the project + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectInner object + */ + public Observable> updateWithServiceResponseAsync(String groupName, String serviceName, String projectName, ProjectInner 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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); + } + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + * @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<ProjectInner> 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 projects in a service. + * The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ProjectInner> 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/QuotaImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/QuotaImpl.java new file mode 100644 index 000000000000..ddd6abaf86c8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/QuotaImpl.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Quota; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.QuotaName; + +class QuotaImpl extends WrapperImpl implements Quota { + private final DataMigrationManager manager; + + QuotaImpl(QuotaInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + + + @Override + public Double currentValue() { + return this.inner().currentValue(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Double limit() { + return this.inner().limit(); + } + + @Override + public QuotaName name() { + return this.inner().name(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/QuotaInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/QuotaInner.java new file mode 100644 index 000000000000..3a12c15fc7d1 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/QuotaInner.java @@ -0,0 +1,150 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.QuotaName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a quota for or usage details about a resource. + */ +public class QuotaInner { + /** + * The current value of the quota. If null or missing, the current value + * cannot be determined in the context of the request. + */ + @JsonProperty(value = "currentValue") + private Double currentValue; + + /** + * The resource ID of the quota object. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The maximum value of the quota. If null or missing, the quota has no + * maximum, in which case it merely tracks usage. + */ + @JsonProperty(value = "limit") + private Double limit; + + /** + * The name of the quota. + */ + @JsonProperty(value = "name") + private QuotaName name; + + /** + * The unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Get the current value of the quota. If null or missing, the current value cannot be determined in the context of the request. + * + * @return the currentValue value + */ + public Double currentValue() { + return this.currentValue; + } + + /** + * Set the current value of the quota. If null or missing, the current value cannot be determined in the context of the request. + * + * @param currentValue the currentValue value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withCurrentValue(Double currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the resource ID of the quota object. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the resource ID of the quota object. + * + * @param id the id value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the maximum value of the quota. If null or missing, the quota has no maximum, in which case it merely tracks usage. + * + * @return the limit value + */ + public Double limit() { + return this.limit; + } + + /** + * Set the maximum value of the quota. If null or missing, the quota has no maximum, in which case it merely tracks usage. + * + * @param limit the limit value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withLimit(Double limit) { + this.limit = limit; + return this; + } + + /** + * Get the name of the quota. + * + * @return the name value + */ + public QuotaName name() { + return this.name; + } + + /** + * Set the name of the quota. + * + * @param name the name value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withName(QuotaName name) { + this.name = name; + return this; + } + + /** + * Get the unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + * + * @param unit the unit value to set + * @return the QuotaInner object itself. + */ + public QuotaInner withUnit(String unit) { + this.unit = unit; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkuImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkuImpl.java new file mode 100644 index 000000000000..c67c7be80e2b --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkuImpl.java @@ -0,0 +1,91 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSku; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkuCapabilities; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkuCapacity; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkuCosts; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkuRestrictions; + +class ResourceSkuImpl extends WrapperImpl implements ResourceSku { + private final DataMigrationManager manager; + ResourceSkuImpl(ResourceSkuInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public List apiVersions() { + return this.inner().apiVersions(); + } + + @Override + public List capabilities() { + return this.inner().capabilities(); + } + + @Override + public ResourceSkuCapacity capacity() { + return this.inner().capacity(); + } + + @Override + public List costs() { + return this.inner().costs(); + } + + @Override + public String family() { + return this.inner().family(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public List locations() { + return this.inner().locations(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public List restrictions() { + return this.inner().restrictions(); + } + + @Override + public String size() { + return this.inner().size(); + } + + @Override + public String tier() { + return this.inner().tier(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkuInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkuInner.java new file mode 100644 index 000000000000..012a481044f8 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkuInner.java @@ -0,0 +1,203 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkuCapacity; +import java.util.List; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkuCosts; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkuCapabilities; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkuRestrictions; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes an available DMS SKU. + */ +public class ResourceSkuInner { + /** + * The type of resource the SKU applies to. + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /** + * The name of SKU. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Specifies the tier of DMS in a scale set. + */ + @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) + private String tier; + + /** + * The Size of the SKU. + */ + @JsonProperty(value = "size", access = JsonProperty.Access.WRITE_ONLY) + private String size; + + /** + * The Family of this particular SKU. + */ + @JsonProperty(value = "family", access = JsonProperty.Access.WRITE_ONLY) + private String family; + + /** + * The Kind of resources that are supported in this SKU. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private String kind; + + /** + * Not used. + */ + @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSkuCapacity capacity; + + /** + * The set of locations that the SKU is available. + */ + @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) + private List locations; + + /** + * The api versions that support this SKU. + */ + @JsonProperty(value = "apiVersions", access = JsonProperty.Access.WRITE_ONLY) + private List apiVersions; + + /** + * Metadata for retrieving price info. + */ + @JsonProperty(value = "costs", access = JsonProperty.Access.WRITE_ONLY) + private List costs; + + /** + * A name value pair to describe the capability. + */ + @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) + private List capabilities; + + /** + * The restrictions because of which SKU cannot be used. This is empty if + * there are no restrictions. + */ + @JsonProperty(value = "restrictions", access = JsonProperty.Access.WRITE_ONLY) + private List restrictions; + + /** + * Get the type of resource the SKU applies to. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the name of SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get specifies the tier of DMS in a scale set. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Get the Size of the SKU. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Get the Family of this particular SKU. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Get the Kind of resources that are supported in this SKU. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Get not used. + * + * @return the capacity value + */ + public ResourceSkuCapacity capacity() { + return this.capacity; + } + + /** + * Get the set of locations that the SKU is available. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Get the api versions that support this SKU. + * + * @return the apiVersions value + */ + public List apiVersions() { + return this.apiVersions; + } + + /** + * Get metadata for retrieving price info. + * + * @return the costs value + */ + public List costs() { + return this.costs; + } + + /** + * Get a name value pair to describe the capability. + * + * @return the capabilities value + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Get the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + * + * @return the restrictions value + */ + public List restrictions() { + return this.restrictions; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkusImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkusImpl.java new file mode 100644 index 000000000000..bc56b655ed26 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkusImpl.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. + * abc + */ + +package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkus; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSku; + +class ResourceSkusImpl extends WrapperImpl implements ResourceSkus { + private final DataMigrationManager manager; + + ResourceSkusImpl(DataMigrationManager manager) { + super(manager.inner().resourceSkus()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + ResourceSkusInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceSku call(ResourceSkuInner inner) { + return new ResourceSkuImpl(inner, manager()); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkusInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkusInner.java new file mode 100644 index 000000000000..5856dee2c883 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ResourceSkusInner.java @@ -0,0 +1,297 @@ +/** + * 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.azuredatabasemigrationservice.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.azuredatabasemigrationservice.v2018_07_15_preview.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +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 ResourceSkus. + */ +public class ResourceSkusInner { + /** The Retrofit service to perform REST calls. */ + private ResourceSkusService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of ResourceSkusInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ResourceSkusInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(ResourceSkusService.class); + this.client = client; + } + + /** + * The interface defining all the services for ResourceSkus to be + * used by Retrofit to perform actually REST calls. + */ + interface ResourceSkusService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkus list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/skus") + Observable> list(@Path("subscriptionId") String subscriptionId, @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.azuredatabasemigrationservice.v2018_07_15_preview.ResourceSkus listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceSkuInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceSkuInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceSkuInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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(), this.client.apiVersion(), 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); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> 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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + * @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<ResourceSkuInner> 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 supported SKUs. + * The skus action returns the list of SKUs that DMS supports. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceSkuInner> 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServiceOperationImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServiceOperationImpl.java new file mode 100644 index 000000000000..884368895d03 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServiceOperationImpl.java @@ -0,0 +1,37 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ServiceOperation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ServiceOperationDisplay; + +class ServiceOperationImpl extends WrapperImpl implements ServiceOperation { + private final DataMigrationManager manager; + ServiceOperationImpl(ServiceOperationInner inner, DataMigrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ServiceOperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServiceOperationInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServiceOperationInner.java new file mode 100644 index 000000000000..181f776a29bd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServiceOperationInner.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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ServiceOperationDisplay; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of an action supported by the Database Migration Service. + */ +public class ServiceOperationInner { + /** + * The fully qualified action name, e.g. + * Microsoft.DataMigration/services/read. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized display text. + */ + @JsonProperty(value = "display") + private ServiceOperationDisplay display; + + /** + * Get the fully qualified action name, e.g. Microsoft.DataMigration/services/read. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the fully qualified action name, e.g. Microsoft.DataMigration/services/read. + * + * @param name the name value to set + * @return the ServiceOperationInner object itself. + */ + public ServiceOperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized display text. + * + * @return the display value + */ + public ServiceOperationDisplay display() { + return this.display; + } + + /** + * Set localized display text. + * + * @param display the display value to set + * @return the ServiceOperationInner object itself. + */ + public ServiceOperationInner withDisplay(ServiceOperationDisplay display) { + this.display = display; + return this; + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServicesImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServicesImpl.java new file mode 100644 index 000000000000..7c2a3ee9621e --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServicesImpl.java @@ -0,0 +1,212 @@ +/** + * 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. + * def + */ + +package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Services; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.DataMigrationService; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.DataMigrationServiceStatusResponse; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.NameAvailabilityResponse; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.NameAvailabilityRequest; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.AvailableServiceSku; + +class ServicesImpl extends GroupableResourcesCoreImpl implements Services { + protected ServicesImpl(DataMigrationManager manager) { + super(manager.inner().services(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + ServicesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + ServicesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + ServicesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + ServicesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataMigrationService call(DataMigrationServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + ServicesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + ServicesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DataMigrationService call(DataMigrationServiceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public DataMigrationServiceImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable checkStatusAsync(String groupName, String serviceName) { + ServicesInner client = this.inner(); + return client.checkStatusAsync(groupName, serviceName) + .map(new Func1() { + @Override + public DataMigrationServiceStatusResponse call(DataMigrationServiceStatusResponseInner inner) { + return new DataMigrationServiceStatusResponseImpl(inner, manager()); + } + }); + } + + @Override + public Completable startAsync(String groupName, String serviceName) { + ServicesInner client = this.inner(); + return client.startAsync(groupName, serviceName).toCompletable(); + } + + @Override + public Completable stopAsync(String groupName, String serviceName) { + ServicesInner client = this.inner(); + return client.stopAsync(groupName, serviceName).toCompletable(); + } + + @Override + public Observable checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters) { + ServicesInner client = this.inner(); + return client.checkChildrenNameAvailabilityAsync(groupName, serviceName, parameters) + .map(new Func1() { + @Override + public NameAvailabilityResponse call(NameAvailabilityResponseInner inner) { + return new NameAvailabilityResponseImpl(inner, manager()); + } + }); + } + + @Override + protected DataMigrationServiceImpl wrapModel(DataMigrationServiceInner inner) { + return new DataMigrationServiceImpl(inner.name(), inner, manager()); + } + + @Override + protected DataMigrationServiceImpl wrapModel(String name) { + return new DataMigrationServiceImpl(name, new DataMigrationServiceInner(), this.manager()); + } + + private AvailableServiceSkuImpl wrapAvailableServiceSkuModel(AvailableServiceSkuInner inner) { + return new AvailableServiceSkuImpl(inner, manager()); + } + + @Override + public Observable listSkusAsync(final String groupName, final String serviceName) { + ServicesInner client = this.inner(); + return client.listSkusAsync(groupName, serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AvailableServiceSku call(AvailableServiceSkuInner inner) { + return wrapAvailableServiceSkuModel(inner); + } + }); + } + + @Override + public Observable checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters) { + ServicesInner client = this.inner(); + return client.checkNameAvailabilityAsync(location, parameters) + .map(new Func1() { + @Override + public NameAvailabilityResponse call(NameAvailabilityResponseInner inner) { + return new NameAvailabilityResponseImpl(inner, manager()); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServicesInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServicesInner.java new file mode 100644 index 000000000000..190cf88a205f --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/ServicesInner.java @@ -0,0 +1,2240 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ApiErrorException; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.NameAvailabilityRequest; +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 Services. + */ +public class ServicesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ServicesService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of ServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServicesInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(ServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Services to be + * used by Retrofit to perform actually REST calls. + */ + interface ServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Services createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2018_07_15_preview.Services beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2018_07_15_preview.Services getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2018_07_15_preview.Services beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Body DataMigrationServiceInner 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.azuredatabasemigrationservice.v2018_07_15_preview.Services checkStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkStatus") + Observable> checkStatus(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services start" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start") + Observable> start(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services beginStart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start") + Observable> beginStart(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services stop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop") + Observable> stop(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services beginStop" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop") + Observable> beginStop(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services listSkus" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus") + Observable> listSkus(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services checkChildrenNameAvailability" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability") + Observable> checkChildrenNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Body NameAvailabilityRequest parameters, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services") + Observable> list(@Path("subscriptionId") String subscriptionId, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Body NameAvailabilityRequest parameters, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services listSkusNext" }) + @GET + Observable> listSkusNext(@Url String nextUrl, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @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.azuredatabasemigrationservice.v2018_07_15_preview.Services listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner createOrUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().last().body(); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 createOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner beginCreateOrUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().single().body(); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 beginCreateOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable beginCreateOrUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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.beginCreateOrUpdate(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(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()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The GET method retrieves information about a service instance. + * + * @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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner getByResourceGroup(String groupName, String serviceName) { + return getByResourceGroupWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The GET method retrieves information about a service instance. + * + * @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 getByResourceGroupAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The GET method retrieves information about a service instance. + * + * @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 DataMigrationServiceInner object + */ + public Observable getByResourceGroupAsync(String groupName, String serviceName) { + return getByResourceGroupWithServiceResponseAsync(groupName, serviceName).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The GET method retrieves information about a service instance. + * + * @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 DataMigrationServiceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String groupName, 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."); + } + return service.getByResourceGroup(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(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 DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public void delete(String groupName, String serviceName) { + deleteWithServiceResponseAsync(groupName, serviceName).toBlocking().last().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 deleteAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public Observable deleteAsync(String groupName, String serviceName) { + return deleteWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public Observable> deleteWithServiceResponseAsync(String groupName, 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 Boolean deleteRunningTasks = null; + Observable> observable = service.delete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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, Boolean deleteRunningTasks) { + deleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).toBlocking().last().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param deleteRunningTasks Delete the resource even if it contains running tasks + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks) { + return deleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param deleteRunningTasks Delete the resource even if it contains running tasks + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 + */ + public void beginDelete(String groupName, String serviceName) { + beginDeleteWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @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 beginDeleteAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String groupName, String serviceName) { + return beginDeleteWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String groupName, 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 Boolean deleteRunningTasks = null; + return service.beginDelete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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 beginDelete(String groupName, String serviceName, Boolean deleteRunningTasks) { + beginDeleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).toBlocking().single().body(); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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 beginDeleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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 beginDeleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks) { + return beginDeleteWithServiceResponseAsync(groupName, serviceName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The DELETE method deletes a service. Any running tasks will be canceled. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @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> beginDeleteWithServiceResponseAsync(String groupName, String serviceName, 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), groupName, serviceName, deleteRunningTasks, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner update(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().last().body(); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 updateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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); + Observable> observable = service.update(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 DataMigrationServiceInner object if successful. + */ + public DataMigrationServiceInner beginUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginUpdateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().single().body(); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about 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 beginUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable beginUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { + return beginUpdateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, DataMigrationServiceInner>() { + @Override + public DataMigrationServiceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update DMS Service Instance. + * The services resource is the top-level resource that represents the Database Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Information about the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMigrationServiceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String groupName, String serviceName, DataMigrationServiceInner 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 (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.beginUpdate(this.client.subscriptionId(), groupName, serviceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Database Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 DataMigrationServiceStatusResponseInner object if successful. + */ + public DataMigrationServiceStatusResponseInner checkStatus(String groupName, String serviceName) { + return checkStatusWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Database Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 checkStatusAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkStatusWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Database Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 DataMigrationServiceStatusResponseInner object + */ + public Observable checkStatusAsync(String groupName, String serviceName) { + return checkStatusWithServiceResponseAsync(groupName, serviceName).map(new Func1, DataMigrationServiceStatusResponseInner>() { + @Override + public DataMigrationServiceStatusResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check service health status. + * The services resource is the top-level resource that represents the Database Migration Service. This action performs a health check and returns the status of the service and virtual machine size. + * + * @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 DataMigrationServiceStatusResponseInner object + */ + public Observable> checkStatusWithServiceResponseAsync(String groupName, 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."); + } + return service.checkStatus(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkStatusDelegate(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); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Database Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public void start(String groupName, String serviceName) { + startWithServiceResponseAsync(groupName, serviceName).toBlocking().last().body(); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Database Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 startAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Database Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public Observable startAsync(String groupName, String serviceName) { + return startWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Database Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public Observable> startWithServiceResponseAsync(String groupName, 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."); + } + Observable> observable = service.start(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Database Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 + */ + public void beginStart(String groupName, String serviceName) { + beginStartWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Database Migration Service. This action starts the service and the service can be used for data migration. + * + * @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 beginStartAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Database Migration Service. This action starts the service and the service can be used for data migration. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStartAsync(String groupName, String serviceName) { + return beginStartWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Start service. + * The services resource is the top-level resource that represents the Database Migration Service. This action starts the service and the service can be used for data migration. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStartWithServiceResponseAsync(String groupName, 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."); + } + return service.beginStart(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Database Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public void stop(String groupName, String serviceName) { + stopWithServiceResponseAsync(groupName, serviceName).toBlocking().last().body(); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Database Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 stopAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Database Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public Observable stopAsync(String groupName, String serviceName) { + return stopWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Database Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public Observable> stopWithServiceResponseAsync(String groupName, 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."); + } + Observable> observable = service.stop(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Database Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 + */ + public void beginStop(String groupName, String serviceName) { + beginStopWithServiceResponseAsync(groupName, serviceName).toBlocking().single().body(); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Database Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @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 beginStopAsync(String groupName, String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(groupName, serviceName), serviceCallback); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Database Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStopAsync(String groupName, String serviceName) { + return beginStopWithServiceResponseAsync(groupName, serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop service. + * The services resource is the top-level resource that represents the Database Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStopWithServiceResponseAsync(String groupName, 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."); + } + return service.beginStop(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStopDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object if successful. + */ + public PagedList listSkus(final String groupName, final String serviceName) { + ServiceResponse> response = listSkusSinglePageAsync(groupName, serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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> listSkusAsync(final String groupName, final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSkusSinglePageAsync(groupName, serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable> listSkusAsync(final String groupName, final String serviceName) { + return listSkusWithServiceResponseAsync(groupName, serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable>> listSkusWithServiceResponseAsync(final String groupName, final String serviceName) { + return listSkusSinglePageAsync(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(listSkusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + ServiceResponse> * @param groupName Name of the resource group + ServiceResponse> * @param serviceName Name of the service + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableServiceSkuInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSkusSinglePageAsync(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."); + } + return service.listSkus(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSkusDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSkusDelegate(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); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @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 NameAvailabilityResponseInner object if successful. + */ + public NameAvailabilityResponseInner checkChildrenNameAvailability(String groupName, String serviceName, NameAvailabilityRequest parameters) { + return checkChildrenNameAvailabilityWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().single().body(); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @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 checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkChildrenNameAvailabilityWithServiceResponseAsync(groupName, serviceName, parameters), serviceCallback); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable checkChildrenNameAvailabilityAsync(String groupName, String serviceName, NameAvailabilityRequest parameters) { + return checkChildrenNameAvailabilityWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1, NameAvailabilityResponseInner>() { + @Override + public NameAvailabilityResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check nested resource name validity and availability. + * This method checks whether a proposed nested resource name is valid and available. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable> checkChildrenNameAvailabilityWithServiceResponseAsync(String groupName, String serviceName, NameAvailabilityRequest 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.checkChildrenNameAvailability(this.client.subscriptionId(), groupName, serviceName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkChildrenNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkChildrenNameAvailabilityDelegate(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 services in resource group. + * The Services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @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<DataMigrationServiceInner> object if successful. + */ + public PagedList listByResourceGroup(final String groupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(groupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @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> listByResourceGroupAsync(final String groupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(groupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable> listByResourceGroupAsync(final String groupName) { + return listByResourceGroupWithServiceResponseAsync(groupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a resource group. + * + * @param groupName Name of the resource group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String groupName) { + return listByResourceGroupSinglePageAsync(groupName) + .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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a resource group. + * + ServiceResponse> * @param groupName Name of the resource group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String groupName) { + 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(this.client.subscriptionId(), groupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(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); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a subscription. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DataMigrationServiceInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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 services in subscription. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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(), this.client.apiVersion(), 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); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @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 NameAvailabilityResponseInner object if successful. + */ + public NameAvailabilityResponseInner checkNameAvailability(String location, NameAvailabilityRequest parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).toBlocking().single().body(); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @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 checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, parameters), serviceCallback); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).map(new Func1, NameAvailabilityResponseInner>() { + @Override + public NameAvailabilityResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check name validity and availability. + * This method checks whether a proposed top-level resource name is valid and available. + * + * @param location The Azure region of the operation + * @param parameters Requested name to validate + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityResponseInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String location, NameAvailabilityRequest parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.checkNameAvailability(this.client.subscriptionId(), location, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(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 compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object if successful. + */ + public PagedList listSkusNext(final String nextPageLink) { + ServiceResponse> response = listSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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> listSkusNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSkusNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSkusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable> listSkusNextAsync(final String nextPageLink) { + return listSkusNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + * @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<AvailableServiceSkuInner> object + */ + public Observable>> listSkusNextWithServiceResponseAsync(final String nextPageLink) { + return listSkusNextSinglePageAsync(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(listSkusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get compatible SKUs. + * The services resource is the top-level resource that represents the Database Migration Service. The skus action returns the list of SKUs that a service resource can be updated to. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailableServiceSkuInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSkusNextSinglePageAsync(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.listSkusNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSkusNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSkusNextDelegate(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); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a resource group. + * + * @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<DataMigrationServiceInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a resource group. + * + * @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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a resource group. + * + * @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<DataMigrationServiceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a resource group. + * + * @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<DataMigrationServiceInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get services in resource group. + * The Services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(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); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> 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 services in subscription. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a subscription. + * + * @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 services in subscription. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get services in subscription. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a subscription. + * + * @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<DataMigrationServiceInner> 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 services in subscription. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of service resources in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DataMigrationServiceInner> 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/TasksImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/TasksImpl.java new file mode 100644 index 000000000000..c0ac2cda4069 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/TasksImpl.java @@ -0,0 +1,106 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Tasks; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.ProjectTask; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.CommandProperties; + +class TasksImpl extends WrapperImpl implements Tasks { + private final DataMigrationManager manager; + + TasksImpl(DataMigrationManager manager) { + super(manager.inner().tasks()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + @Override + public ProjectTaskImpl define(String name) { + return wrapModel(name); + } + + private ProjectTaskImpl wrapModel(ProjectTaskInner inner) { + return new ProjectTaskImpl(inner, manager()); + } + + private ProjectTaskImpl wrapModel(String name) { + return new ProjectTaskImpl(name, this.manager()); + } + + @Override + 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() { + @Override + public ProjectTask call(ProjectTaskInner inner) { + return new ProjectTaskImpl(inner, manager()); + } + }); + } + + @Override + public Observable commandAsync(String groupName, String serviceName, String projectName, String taskName, CommandPropertiesInner parameters) { + TasksInner client = this.inner(); + return client.commandAsync(groupName, serviceName, projectName, taskName, parameters) + .map(new Func1() { + @Override + public CommandProperties call(CommandPropertiesInner inner) { + return new CommandPropertiesImpl(inner, manager()); + } + }); + } + + @Override + 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>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProjectTask call(ProjectTaskInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + 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() { + @Override + public ProjectTask call(ProjectTaskInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String groupName, String serviceName, String projectName, String taskName) { + TasksInner client = this.inner(); + return client.deleteAsync(groupName, serviceName, projectName, taskName).toCompletable(); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/TasksInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/TasksInner.java new file mode 100644 index 000000000000..30f6e97bad0a --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/TasksInner.java @@ -0,0 +1,1339 @@ +/** + * 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.azuredatabasemigrationservice.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.azuredatabasemigrationservice.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 Tasks. + */ +public class TasksInner { + /** The Retrofit service to perform REST calls. */ + private TasksService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of TasksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public TasksInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(TasksService.class); + this.client = client; + } + + /** + * The interface defining all the services for Tasks to be + * used by Retrofit to perform actually REST calls. + */ + interface TasksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Tasks list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Tasks createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Tasks get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Tasks delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Tasks update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Tasks cancel" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel") + Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @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.azuredatabasemigrationservice.v2018_07_15_preview.Tasks command" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/command") + Observable> command(@Path("subscriptionId") String subscriptionId, @Path("groupName") String groupName, @Path("serviceName") String serviceName, @Path("projectName") String projectName, @Path("taskName") String taskName, @Query("api-version") String apiVersion, @Body CommandPropertiesInner parameters, @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.azuredatabasemigrationservice.v2018_07_15_preview.Tasks listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + ServiceResponse> response = listSinglePageAsync(groupName, serviceName, projectName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(groupName, serviceName, projectName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + return listWithServiceResponseAsync(groupName, serviceName, projectName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + return listSinglePageAsync(groupName, serviceName, projectName) + .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 tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName) { + 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType) { + ServiceResponse> response = listSinglePageAsync(groupName, serviceName, projectName, taskType).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(groupName, serviceName, projectName, taskType), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType) { + return listWithServiceResponseAsync(groupName, serviceName, projectName, taskType) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + * @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 projectName, final String taskType) { + return listSinglePageAsync(groupName, serviceName, projectName, 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 tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 projectName Name of the project + 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, String taskName, ProjectTaskInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).toBlocking().single().body(); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, String taskName, ProjectTaskInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters), serviceCallback); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, String taskName, ProjectTaskInner parameters) { + return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an exising one. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @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 projectName, String taskName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName).toBlocking().single().body(); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, projectName, taskName), serviceCallback); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable getAsync(String groupName, String serviceName, String projectName, String taskName) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable> getWithServiceResponseAsync(String groupName, String serviceName, String projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, String expand) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName, expand).toBlocking().single().body(); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(groupName, serviceName, projectName, taskName, expand), serviceCallback); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, String expand) { + return getWithServiceResponseAsync(groupName, serviceName, projectName, taskName, expand).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get task information. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method retrieves information about a task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @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 projectName, String taskName) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName).toBlocking().single().body(); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName), serviceCallback); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String groupName, String serviceName, String projectName, String taskName) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String groupName, String serviceName, String projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, Boolean deleteRunningTasks) { + deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks).toBlocking().single().body(); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, Boolean deleteRunningTasks, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks), serviceCallback); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, Boolean deleteRunningTasks) { + return deleteWithServiceResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The DELETE method deletes a task, canceling it first if it's running. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, String taskName, ProjectTaskInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).toBlocking().single().body(); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, String taskName, ProjectTaskInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters), serviceCallback); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, String taskName, ProjectTaskInner parameters) { + return updateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PATCH method updates an existing task, but since 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 projectName Name of the project + * @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 projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @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 projectName, String taskName) { + return cancelWithServiceResponseAsync(groupName, serviceName, projectName, taskName).toBlocking().single().body(); + } + + /** + * 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param 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 projectName, String taskName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(groupName, serviceName, projectName, taskName), serviceCallback); + } + + /** + * 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable cancelAsync(String groupName, String serviceName, String projectName, String taskName) { + return cancelWithServiceResponseAsync(groupName, serviceName, projectName, taskName).map(new Func1, ProjectTaskInner>() { + @Override + public ProjectTaskInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ProjectTaskInner object + */ + public Observable> cancelWithServiceResponseAsync(String groupName, String serviceName, String projectName, 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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, projectName, 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); + } + + /** + * Execute a command on a task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. This method executes a command on a running task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters Command to execute + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws 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 CommandPropertiesInner object if successful. + */ + public CommandPropertiesInner command(String groupName, String serviceName, String projectName, String taskName, CommandPropertiesInner parameters) { + return commandWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).toBlocking().single().body(); + } + + /** + * Execute a command on a task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. This method executes a command on a running task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters Command to execute + * @param 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 commandAsync(String groupName, String serviceName, String projectName, String taskName, CommandPropertiesInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(commandWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters), serviceCallback); + } + + /** + * Execute a command on a task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. This method executes a command on a running task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters Command to execute + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CommandPropertiesInner object + */ + public Observable commandAsync(String groupName, String serviceName, String projectName, String taskName, CommandPropertiesInner parameters) { + return commandWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).map(new Func1, CommandPropertiesInner>() { + @Override + public CommandPropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Execute a command on a task. + * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. This method executes a command on a running task. + * + * @param groupName Name of the resource group + * @param serviceName Name of the service + * @param projectName Name of the project + * @param taskName Name of the Task + * @param parameters Command to execute + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CommandPropertiesInner object + */ + public Observable> commandWithServiceResponseAsync(String groupName, String serviceName, String projectName, String taskName, CommandPropertiesInner 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 (projectName == null) { + throw new IllegalArgumentException("Parameter projectName 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."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.command(this.client.subscriptionId(), groupName, serviceName, projectName, taskName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = commandDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse commandDelegate(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 tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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 tasks in a service. + * The services resource is the top-level resource that represents the Database Migration Service. This method returns a list of 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/UsagesImpl.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/UsagesImpl.java new file mode 100644 index 000000000000..635154d1e7cd --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/UsagesImpl.java @@ -0,0 +1,53 @@ +/** + * 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.azuredatabasemigrationservice.v2018_07_15_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Usages; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Quota; + +class UsagesImpl extends WrapperImpl implements Usages { + private final DataMigrationManager manager; + + UsagesImpl(DataMigrationManager manager) { + super(manager.inner().usages()); + this.manager = manager; + } + + public DataMigrationManager manager() { + return this.manager; + } + + private QuotaImpl wrapModel(QuotaInner inner) { + return new QuotaImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String location) { + UsagesInner client = this.inner(); + return client.listAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Quota call(QuotaInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/UsagesInner.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/UsagesInner.java new file mode 100644 index 000000000000..2371345d6d78 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/UsagesInner.java @@ -0,0 +1,305 @@ +/** + * 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.azuredatabasemigrationservice.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.azuredatabasemigrationservice.v2018_07_15_preview.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +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 Usages. + */ +public class UsagesInner { + /** The Retrofit service to perform REST calls. */ + private UsagesService service; + /** The service client containing this operation class. */ + private DataMigrationServiceClientImpl client; + + /** + * Initializes an instance of UsagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public UsagesInner(Retrofit retrofit, DataMigrationServiceClientImpl client) { + this.service = retrofit.create(UsagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Usages to be + * used by Retrofit to perform actually REST calls. + */ + interface UsagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.Usages list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @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.azuredatabasemigrationservice.v2018_07_15_preview.Usages listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + * @param location The Azure region of the 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<QuotaInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + * @param location The Azure region of the operation + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<QuotaInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<QuotaInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + ServiceResponse> * @param location The Azure region of the operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<QuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location 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(), location, this.client.apiVersion(), 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); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + * @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<QuotaInner> 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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + * @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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + * @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<QuotaInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + * @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<QuotaInner> 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 resource quotas and usage information. + * This method returns region-specific quotas and resource usage information for the Database Migration Service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<QuotaInner> 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/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/package-info.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/package-info.java new file mode 100644 index 000000000000..f31666536245 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/implementation/package-info.java @@ -0,0 +1,11 @@ +// 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. + +/** + * This package contains the implementation classes for DataMigrationServiceClient. + * Data Migration Client. + */ +package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview.implementation; diff --git a/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/package-info.java b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/package-info.java new file mode 100644 index 000000000000..b735efa9e197 --- /dev/null +++ b/azuredatabasemigrationservice/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_07_15_preview/package-info.java @@ -0,0 +1,11 @@ +// 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. + +/** + * This package contains the classes for DataMigrationServiceClient. + * Data Migration Client. + */ +package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_07_15_preview;