From 3075a1666035fe323fdff920317707aa18103617 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 6 Jan 2022 04:34:27 +0000 Subject: [PATCH] CodeGen from PR 17190 in Azure/azure-rest-api-specs Merge 47099d91fb4ff46111a71341f2bbc20350a70512 into ac40996ab146d1360a4783665bb6c0b13f345aec --- .../datamigration/DataMigrationManager.java | 275 -- .../fluent/DataMigrationManagementClient.java | 88 - .../fluent/OperationsClient.java | 36 - .../datamigration/fluent/ProjectsClient.java | 175 - .../fluent/ResourceSkusClient.java | 36 - .../datamigration/fluent/ServicesClient.java | 565 ---- .../datamigration/fluent/TasksClient.java | 246 -- .../datamigration/fluent/UsagesClient.java | 39 - .../models/AvailableServiceSkuInner.java | 110 - .../models/DataMigrationServiceInner.java | 196 -- ...taMigrationServiceStatusResponseInner.java | 133 - .../models/NameAvailabilityResponseInner.java | 72 - .../fluent/models/ProjectInner.java | 218 -- .../fluent/models/ProjectTaskInner.java | 81 - .../fluent/models/QuotaInner.java | 164 - .../fluent/models/ResourceSkuInner.java | 223 -- .../fluent/models/ServiceOperationInner.java | 81 - .../fluent/models/package-info.java | 6 - .../datamigration/fluent/package-info.java | 6 - .../AvailableServiceSkuImpl.java | 43 - .../DataMigrationManagementClientBuilder.java | 146 - .../DataMigrationManagementClientImpl.java | 363 -- .../DataMigrationServiceImpl.java | 246 -- ...ataMigrationServiceStatusResponseImpl.java | 52 - .../NameAvailabilityResponseImpl.java | 42 - .../implementation/OperationsClientImpl.java | 269 -- .../implementation/OperationsImpl.java | 46 - .../implementation/ProjectImpl.java | 229 -- .../implementation/ProjectTaskImpl.java | 161 - .../implementation/ProjectsClientImpl.java | 1126 ------- .../implementation/ProjectsImpl.java | 192 -- .../implementation/QuotaImpl.java | 48 - .../implementation/ResourceSkuImpl.java | 107 - .../ResourceSkusClientImpl.java | 294 -- .../implementation/ResourceSkusImpl.java | 46 - .../implementation/ServiceOperationImpl.java | 38 - .../implementation/ServicesClientImpl.java | 2987 ----------------- .../implementation/ServicesImpl.java | 282 -- .../implementation/TasksClientImpl.java | 1513 --------- .../implementation/TasksImpl.java | 256 -- .../implementation/UsagesClientImpl.java | 311 -- .../implementation/UsagesImpl.java | 46 - .../datamigration/implementation/Utils.java | 204 -- .../implementation/package-info.java | 6 - .../models/AuthenticationType.java | 43 - .../models/AvailableServiceSku.java | 38 - .../AvailableServiceSkuAutoGenerated.java | 128 - .../models/AvailableServiceSkuCapacity.java | 128 - .../models/AzureActiveDirectoryApp.java | 119 - .../datamigration/models/BackupFileInfo.java | 102 - .../models/BackupFileStatus.java | 49 - .../datamigration/models/BackupMode.java | 34 - .../datamigration/models/BackupSetInfo.java | 289 -- .../datamigration/models/BackupType.java | 49 - .../datamigration/models/BlobShare.java | 55 - .../models/CommandProperties.java | 74 - .../datamigration/models/CommandState.java | 43 - .../models/ConnectToSourceMySqlTaskInput.java | 110 - .../ConnectToSourceMySqlTaskProperties.java | 78 - .../ConnectToSourceNonSqlTaskOutput.java | 106 - ...onnectToSourcePostgreSqlSyncTaskInput.java | 60 - ...nnectToSourcePostgreSqlSyncTaskOutput.java | 103 - ...tToSourcePostgreSqlSyncTaskProperties.java | 81 - ...ctToSourceSqlServerSyncTaskProperties.java | 80 - .../ConnectToSourceSqlServerTaskInput.java | 137 - .../ConnectToSourceSqlServerTaskOutput.java | 54 - ...ourceSqlServerTaskOutputAgentJobLevel.java | 128 - ...ourceSqlServerTaskOutputDatabaseLevel.java | 113 - ...ToSourceSqlServerTaskOutputLoginLevel.java | 112 - ...tToSourceSqlServerTaskOutputTaskLevel.java | 126 - ...onnectToSourceSqlServerTaskProperties.java | 78 - ...nnectToTargetAzureDbForMySqlTaskInput.java | 94 - ...nectToTargetAzureDbForMySqlTaskOutput.java | 103 - ...ToTargetAzureDbForMySqlTaskProperties.java | 79 - ...rgetAzureDbForPostgreSqlSyncTaskInput.java | 97 - ...getAzureDbForPostgreSqlSyncTaskOutput.java | 104 - ...zureDbForPostgreSqlSyncTaskProperties.java | 83 - .../ConnectToTargetSqlDbSyncTaskInput.java | 92 - ...onnectToTargetSqlDbSyncTaskProperties.java | 78 - .../models/ConnectToTargetSqlDbTaskInput.java | 58 - .../ConnectToTargetSqlDbTaskOutput.java | 84 - .../ConnectToTargetSqlDbTaskProperties.java | 78 - .../ConnectToTargetSqlMISyncTaskInput.java | 96 - .../ConnectToTargetSqlMISyncTaskOutput.java | 73 - ...onnectToTargetSqlMISyncTaskProperties.java | 78 - .../models/ConnectToTargetSqlMITaskInput.java | 58 - .../ConnectToTargetSqlMITaskOutput.java | 118 - .../ConnectToTargetSqlMITaskProperties.java | 78 - .../datamigration/models/ConnectionInfo.java | 91 - .../models/DataIntegrityValidationResult.java | 58 - .../DataItemMigrationSummaryResult.java | 161 - .../models/DataMigrationError.java | 65 - .../models/DataMigrationResultCode.java | 47 - .../models/DataMigrationService.java | 442 --- .../models/DataMigrationServiceList.java | 81 - .../DataMigrationServiceStatusResponse.java | 48 - .../models/DatabaseBackupInfo.java | 148 - .../models/DatabaseCompatLevel.java | 49 - .../models/DatabaseFileInfo.java | 206 -- .../models/DatabaseFileInput.java | 154 - .../models/DatabaseFileType.java | 43 - .../datamigration/models/DatabaseInfo.java | 55 - .../models/DatabaseMigrationStage.java | 46 - .../models/DatabaseMigrationState.java | 58 - .../datamigration/models/DatabaseState.java | 55 - .../models/DatabaseSummaryResult.java | 41 - .../datamigration/models/ErrorType.java | 37 - .../models/ExecutionStatistics.java | 138 - .../datamigration/models/FileShare.java | 106 - .../GetTdeCertificatesSqlTaskInput.java | 134 - .../GetTdeCertificatesSqlTaskOutput.java | 58 - .../GetTdeCertificatesSqlTaskProperties.java | 78 - .../models/GetUserTablesSqlSyncTaskInput.java | 157 - .../GetUserTablesSqlSyncTaskOutput.java | 88 - .../GetUserTablesSqlSyncTaskProperties.java | 78 - .../models/GetUserTablesSqlTaskInput.java | 91 - .../models/GetUserTablesSqlTaskOutput.java | 73 - .../GetUserTablesSqlTaskProperties.java | 78 - .../models/LoginMigrationStage.java | 55 - .../datamigration/models/LoginType.java | 49 - .../models/MiSqlConnectionInfo.java | 76 - .../MigrateMISyncCompleteCommandInput.java | 56 - .../MigrateMISyncCompleteCommandOutput.java | 54 - ...igrateMISyncCompleteCommandProperties.java | 77 - ...MySqlAzureDbForMySqlSyncDatabaseInput.java | 159 - ...rateMySqlAzureDbForMySqlSyncTaskInput.java | 131 - ...ateMySqlAzureDbForMySqlSyncTaskOutput.java | 61 - ...DbForMySqlSyncTaskOutputDatabaseError.java | 89 - ...DbForMySqlSyncTaskOutputDatabaseLevel.java | 258 -- ...SqlAzureDbForMySqlSyncTaskOutputError.java | 49 - ...bForMySqlSyncTaskOutputMigrationLevel.java | 123 - ...ureDbForMySqlSyncTaskOutputTableLevel.java | 228 -- ...ySqlAzureDbForMySqlSyncTaskProperties.java | 79 - ...AzureDbForPostgreSqlSyncDatabaseInput.java | 160 - ...eSqlAzureDbForPostgreSqlSyncTaskInput.java | 134 - ...SqlAzureDbForPostgreSqlSyncTaskOutput.java | 64 - ...PostgreSqlSyncTaskOutputDatabaseError.java | 90 - ...PostgreSqlSyncTaskOutputDatabaseLevel.java | 259 -- ...ureDbForPostgreSqlSyncTaskOutputError.java | 51 - ...ostgreSqlSyncTaskOutputMigrationLevel.java | 124 - ...ForPostgreSqlSyncTaskOutputTableLevel.java | 229 -- ...zureDbForPostgreSqlSyncTaskProperties.java | 82 - .../MigrateSqlServerSqlDbDatabaseInput.java | 132 - ...igrateSqlServerSqlDbSyncDatabaseInput.java | 233 -- .../MigrateSqlServerSqlDbSyncTaskInput.java | 105 - .../MigrateSqlServerSqlDbSyncTaskOutput.java | 57 - ...erverSqlDbSyncTaskOutputDatabaseError.java | 87 - ...erverSqlDbSyncTaskOutputDatabaseLevel.java | 257 -- ...rateSqlServerSqlDbSyncTaskOutputError.java | 48 - ...rverSqlDbSyncTaskOutputMigrationLevel.java | 137 - ...qlServerSqlDbSyncTaskOutputTableLevel.java | 227 -- ...grateSqlServerSqlDbSyncTaskProperties.java | 78 - .../MigrateSqlServerSqlDbTaskInput.java | 125 - .../MigrateSqlServerSqlDbTaskOutput.java | 60 - ...SqlServerSqlDbTaskOutputDatabaseLevel.java | 247 -- ...skOutputDatabaseLevelValidationResult.java | 182 - .../MigrateSqlServerSqlDbTaskOutputError.java | 48 - ...qlServerSqlDbTaskOutputMigrationLevel.java | 251 -- ...ateSqlServerSqlDbTaskOutputTableLevel.java | 167 - ...ServerSqlDbTaskOutputValidationResult.java | 101 - .../MigrateSqlServerSqlDbTaskProperties.java | 78 - .../MigrateSqlServerSqlMIDatabaseInput.java | 144 - .../MigrateSqlServerSqlMISyncTaskInput.java | 69 - .../MigrateSqlServerSqlMISyncTaskOutput.java | 55 - ...erverSqlMISyncTaskOutputDatabaseLevel.java | 214 -- ...rateSqlServerSqlMISyncTaskOutputError.java | 48 - ...rverSqlMISyncTaskOutputMigrationLevel.java | 197 -- ...grateSqlServerSqlMISyncTaskProperties.java | 78 - .../MigrateSqlServerSqlMITaskInput.java | 222 -- .../MigrateSqlServerSqlMITaskOutput.java | 55 - ...SqlServerSqlMITaskOutputAgentJobLevel.java | 141 - ...SqlServerSqlMITaskOutputDatabaseLevel.java | 156 - .../MigrateSqlServerSqlMITaskOutputError.java | 48 - ...ateSqlServerSqlMITaskOutputLoginLevel.java | 140 - ...qlServerSqlMITaskOutputMigrationLevel.java | 264 -- .../MigrateSqlServerSqlMITaskProperties.java | 78 - .../MigrateSyncCompleteCommandInput.java | 83 - .../MigrateSyncCompleteCommandOutput.java | 58 - .../MigrateSyncCompleteCommandProperties.java | 77 - .../models/MigrationEligibilityInfo.java | 55 - .../models/MigrationReportResult.java | 54 - .../datamigration/models/MigrationState.java | 49 - .../datamigration/models/MigrationStatus.java | 58 - .../models/MigrationTableMetadata.java | 54 - ...rationValidationDatabaseSummaryResult.java | 130 - .../models/MigrationValidationOptions.java | 112 - .../models/MySqlConnectionInfo.java | 101 - .../models/MySqlTargetPlatformType.java | 34 - .../models/NameAvailabilityRequest.java | 76 - .../models/NameAvailabilityResponse.java | 38 - .../models/NameCheckFailureReason.java | 34 - .../models/NonSqlDataMigrationTable.java | 50 - .../datamigration/models/ObjectType.java | 43 - .../datamigration/models/Operations.java | 31 - .../models/OrphanedUserInfo.java | 76 - .../models/PostgreSqlConnectionInfo.java | 128 - .../datamigration/models/Project.java | 356 -- .../datamigration/models/ProjectList.java | 81 - .../models/ProjectProvisioningState.java | 34 - .../models/ProjectSourcePlatform.java | 34 - .../models/ProjectTargetPlatform.java | 34 - .../datamigration/models/ProjectTask.java | 200 -- .../models/ProjectTaskProperties.java | 133 - .../datamigration/models/Projects.java | 156 - .../models/QueryAnalysisValidationResult.java | 60 - .../models/QueryExecutionResult.java | 90 - .../datamigration/models/Quota.java | 54 - .../datamigration/models/QuotaList.java | 82 - .../datamigration/models/QuotaName.java | 76 - .../models/ReportableException.java | 125 - .../datamigration/models/ResourceSku.java | 103 - .../models/ResourceSkuCapabilities.java | 54 - .../models/ResourceSkuCapacity.java | 84 - .../models/ResourceSkuCapacityScaleType.java | 37 - .../models/ResourceSkuCosts.java | 69 - .../models/ResourceSkuRestrictions.java | 72 - .../ResourceSkuRestrictionsReasonCode.java | 35 - .../models/ResourceSkuRestrictionsType.java | 31 - .../datamigration/models/ResourceSkus.java | 31 - .../models/ResourceSkusResult.java | 88 - .../SchemaComparisonValidationResult.java | 113 - .../SchemaComparisonValidationResultType.java | 70 - .../models/SelectedCertificateInput.java | 88 - .../models/ServerLevelPermissionsGroup.java | 53 - .../models/ServerProperties.java | 114 - .../models/ServiceOperation.java | 31 - .../models/ServiceOperationDisplay.java | 128 - .../models/ServiceOperationList.java | 81 - .../models/ServiceProvisioningState.java | 58 - .../models/ServiceScalability.java | 37 - .../datamigration/models/ServiceSku.java | 161 - .../datamigration/models/ServiceSkuList.java | 81 - .../datamigration/models/Services.java | 345 -- .../datamigration/models/Severity.java | 37 - .../models/SqlConnectionInfo.java | 206 -- .../models/SqlMigrationTaskInput.java | 92 - .../models/SqlServerSqlMISyncTaskInput.java | 227 -- .../models/SqlSourcePlatform.java | 31 - .../SyncDatabaseMigrationReportingState.java | 62 - .../SyncMigrationDatabaseErrorEvent.java | 69 - .../models/SyncTableMigrationState.java | 46 - .../datamigration/models/TaskList.java | 81 - .../datamigration/models/TaskState.java | 52 - .../datamigration/models/Tasks.java | 206 -- .../models/UpdateActionType.java | 37 - .../datamigration/models/Usages.java | 34 - ...InputSqlServerSqlDbSyncTaskProperties.java | 80 - ...ationInputSqlServerSqlMISyncTaskInput.java | 72 - ...tionInputSqlServerSqlMISyncTaskOutput.java | 74 - ...InputSqlServerSqlMISyncTaskProperties.java | 80 - ...MigrationInputSqlServerSqlMITaskInput.java | 252 -- ...igrationInputSqlServerSqlMITaskOutput.java | 177 - ...tionInputSqlServerSqlMITaskProperties.java | 80 - ...eSyncMigrationInputSqlServerTaskInput.java | 134 - ...SyncMigrationInputSqlServerTaskOutput.java | 74 - .../datamigration/models/ValidationError.java | 54 - .../models/ValidationStatus.java | 52 - .../datamigration/models/WaitStatistics.java | 69 - .../datamigration/models/package-info.java | 6 - .../datamigration/package-info.java | 6 - .../src/main/java/module-info.java | 19 - 261 files changed, 33230 deletions(-) delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/DataMigrationManager.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DataMigrationManagementClient.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/OperationsClient.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ProjectsClient.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ResourceSkusClient.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServicesClient.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/TasksClient.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/UsagesClient.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AvailableServiceSkuInner.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceInner.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceStatusResponseInner.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/NameAvailabilityResponseInner.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectInner.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectTaskInner.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/QuotaInner.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ResourceSkuInner.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ServiceOperationInner.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/package-info.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/package-info.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AvailableServiceSkuImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientBuilder.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceStatusResponseImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/NameAvailabilityResponseImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/OperationsClientImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/OperationsImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectTaskImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectsClientImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectsImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/QuotaImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkuImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkusClientImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkusImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServiceOperationImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServicesClientImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServicesImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/TasksClientImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/TasksImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/UsagesClientImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/UsagesImpl.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/Utils.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/package-info.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AuthenticationType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSku.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSkuAutoGenerated.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSkuCapacity.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AzureActiveDirectoryApp.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupFileInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupFileStatus.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupMode.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupSetInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BlobShare.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/CommandProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/CommandState.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceMySqlTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceMySqlTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceNonSqlTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerSyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputLoginLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputTaskLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbSyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbSyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectionInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataIntegrityValidationResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataItemMigrationSummaryResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationResultCode.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationService.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationServiceList.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationServiceStatusResponse.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseBackupInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseCompatLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseMigrationStage.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseMigrationState.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseState.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseSummaryResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ErrorType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ExecutionStatistics.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/FileShare.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/LoginMigrationStage.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/LoginType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MiSqlConnectionInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbDatabaseInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncDatabaseInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputTableLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputValidationResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMIDatabaseInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputLoginLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputMigrationLevel.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationEligibilityInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationReportResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationState.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationStatus.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationTableMetadata.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationValidationDatabaseSummaryResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationValidationOptions.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MySqlConnectionInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MySqlTargetPlatformType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameAvailabilityRequest.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameAvailabilityResponse.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameCheckFailureReason.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NonSqlDataMigrationTable.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ObjectType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Operations.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/OrphanedUserInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/PostgreSqlConnectionInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Project.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectList.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectProvisioningState.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectSourcePlatform.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTargetPlatform.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTask.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Projects.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QueryAnalysisValidationResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QueryExecutionResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Quota.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QuotaList.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QuotaName.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ReportableException.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSku.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapabilities.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapacity.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapacityScaleType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCosts.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictions.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictionsReasonCode.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictionsType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkus.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkusResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SchemaComparisonValidationResult.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SchemaComparisonValidationResultType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SelectedCertificateInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServerLevelPermissionsGroup.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServerProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperation.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperationDisplay.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperationList.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceProvisioningState.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceScalability.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceSku.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceSkuList.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Services.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Severity.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlConnectionInfo.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlMigrationTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlServerSqlMISyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlSourcePlatform.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncDatabaseMigrationReportingState.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncMigrationDatabaseErrorEvent.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncTableMigrationState.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/TaskList.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/TaskState.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Tasks.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/UpdateActionType.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Usages.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskProperties.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateSyncMigrationInputSqlServerTaskInput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateSyncMigrationInputSqlServerTaskOutput.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidationError.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidationStatus.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/WaitStatistics.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/package-info.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/package-info.java delete mode 100644 sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/module-info.java diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/DataMigrationManager.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/DataMigrationManager.java deleted file mode 100644 index 5ffdfecb40632..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/DataMigrationManager.java +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.DataMigrationManagementClient; -import com.azure.resourcemanager.datamigration.implementation.DataMigrationManagementClientBuilder; -import com.azure.resourcemanager.datamigration.implementation.OperationsImpl; -import com.azure.resourcemanager.datamigration.implementation.ProjectsImpl; -import com.azure.resourcemanager.datamigration.implementation.ResourceSkusImpl; -import com.azure.resourcemanager.datamigration.implementation.ServicesImpl; -import com.azure.resourcemanager.datamigration.implementation.TasksImpl; -import com.azure.resourcemanager.datamigration.implementation.UsagesImpl; -import com.azure.resourcemanager.datamigration.models.Operations; -import com.azure.resourcemanager.datamigration.models.Projects; -import com.azure.resourcemanager.datamigration.models.ResourceSkus; -import com.azure.resourcemanager.datamigration.models.Services; -import com.azure.resourcemanager.datamigration.models.Tasks; -import com.azure.resourcemanager.datamigration.models.Usages; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Entry point to DataMigrationManager. Data Migration Client. */ -public final class DataMigrationManager { - private ResourceSkus resourceSkus; - - private Services services; - - private Tasks tasks; - - private Projects projects; - - private Usages usages; - - private Operations operations; - - private final DataMigrationManagementClient clientObject; - - private DataMigrationManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new DataMigrationManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of DataMigration service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the DataMigration service API instance. - */ - public static DataMigrationManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Gets a Configurable instance that can be used to create DataMigrationManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new DataMigrationManager.Configurable(); - } - - /** The Configurable allowing configurations to be set. */ - public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private RetryPolicy retryPolicy; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of DataMigration service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the DataMigration service API instance. - */ - public DataMigrationManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.datamigration") - .append("/") - .append("1.0.0-beta.1"); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new RequestIdPolicy()); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new DataMigrationManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** @return Resource collection API of ResourceSkus. */ - public ResourceSkus resourceSkus() { - if (this.resourceSkus == null) { - this.resourceSkus = new ResourceSkusImpl(clientObject.getResourceSkus(), this); - } - return resourceSkus; - } - - /** @return Resource collection API of Services. */ - public Services services() { - if (this.services == null) { - this.services = new ServicesImpl(clientObject.getServices(), this); - } - return services; - } - - /** @return Resource collection API of Tasks. */ - public Tasks tasks() { - if (this.tasks == null) { - this.tasks = new TasksImpl(clientObject.getTasks(), this); - } - return tasks; - } - - /** @return Resource collection API of Projects. */ - public Projects projects() { - if (this.projects == null) { - this.projects = new ProjectsImpl(clientObject.getProjects(), this); - } - return projects; - } - - /** @return Resource collection API of Usages. */ - public Usages usages() { - if (this.usages == null) { - this.usages = new UsagesImpl(clientObject.getUsages(), this); - } - return usages; - } - - /** @return Resource collection API of Operations. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * @return Wrapped service client DataMigrationManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - */ - public DataMigrationManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DataMigrationManagementClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DataMigrationManagementClient.java deleted file mode 100644 index daa68b439ad0e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DataMigrationManagementClient.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for DataMigrationManagementClient class. */ -public interface DataMigrationManagementClient { - /** - * Gets Identifier of the subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the ResourceSkusClient object to access its operations. - * - * @return the ResourceSkusClient object. - */ - ResourceSkusClient getResourceSkus(); - - /** - * Gets the ServicesClient object to access its operations. - * - * @return the ServicesClient object. - */ - ServicesClient getServices(); - - /** - * Gets the TasksClient object to access its operations. - * - * @return the TasksClient object. - */ - TasksClient getTasks(); - - /** - * Gets the ProjectsClient object to access its operations. - * - * @return the ProjectsClient object. - */ - ProjectsClient getProjects(); - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - UsagesClient getUsages(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/OperationsClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/OperationsClient.java deleted file mode 100644 index e1b3352421e99..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/OperationsClient.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.ServiceOperationInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * Lists all available actions exposed by the Database Migration Service resource provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all available actions exposed by the Database Migration Service resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ProjectsClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ProjectsClient.java deleted file mode 100644 index 659400016b56d..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ProjectsClient.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectInner; - -/** An instance of this class provides access to all the operations defined in ProjectsClient. */ -public interface ProjectsClient { - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectInner createOrUpdate(String groupName, String serviceName, String projectName, ProjectInner parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String groupName, String serviceName, String projectName, ProjectInner parameters, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectInner get(String groupName, String serviceName, String projectName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String groupName, String serviceName, String projectName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String groupName, String serviceName, String projectName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String groupName, String serviceName, String projectName, Boolean deleteRunningTasks, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectInner update(String groupName, String serviceName, String projectName, ProjectInner parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String groupName, String serviceName, String projectName, ProjectInner parameters, Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ResourceSkusClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ResourceSkusClient.java deleted file mode 100644 index 9f3b034006b6b..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ResourceSkusClient.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.ResourceSkuInner; - -/** An instance of this class provides access to all the operations defined in ResourceSkusClient. */ -public interface ResourceSkusClient { - /** - * The skus action returns the list of SKUs that DMS supports. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * The skus action returns the list of SKUs that DMS supports. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServicesClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServicesClient.java deleted file mode 100644 index 9776860991a80..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServicesClient.java +++ /dev/null @@ -1,565 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.datamigration.fluent.models.AvailableServiceSkuInner; -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceInner; -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceStatusResponseInner; -import com.azure.resourcemanager.datamigration.fluent.models.NameAvailabilityResponseInner; -import com.azure.resourcemanager.datamigration.models.NameAvailabilityRequest; - -/** An instance of this class provides access to all the operations defined in ServicesClient. */ -public interface ServicesClient { - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, DataMigrationServiceInner> beginCreateOrUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, DataMigrationServiceInner> beginCreateOrUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataMigrationServiceInner createOrUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataMigrationServiceInner createOrUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataMigrationServiceInner getByResourceGroup(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(String groupName, String serviceName, Boolean deleteRunningTasks); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete( - String groupName, String serviceName, Boolean deleteRunningTasks, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String groupName, String serviceName, Boolean deleteRunningTasks); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String groupName, String serviceName, Boolean deleteRunningTasks, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, DataMigrationServiceInner> beginUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, DataMigrationServiceInner> beginUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataMigrationServiceInner update(String groupName, String serviceName, DataMigrationServiceInner parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataMigrationServiceInner update( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataMigrationServiceStatusResponseInner checkStatus(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkStatusWithResponse( - String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginStart(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginStart(String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginStop(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginStop(String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus(String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NameAvailabilityResponseInner nestedCheckNameAvailability( - String groupName, String serviceName, NameAvailabilityRequest parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response nestedCheckNameAvailabilityWithResponse( - String groupName, String serviceName, NameAvailabilityRequest parameters, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String groupName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String groupName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NameAvailabilityResponseInner checkNameAvailability(String location, NameAvailabilityRequest parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityRequest parameters, Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/TasksClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/TasksClient.java deleted file mode 100644 index 339a1febafb4d..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/TasksClient.java +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner; - -/** An instance of this class provides access to all the operations defined in TasksClient. */ -public interface TasksClient { - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String groupName, String serviceName, String projectName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String groupName, String serviceName, String projectName, String taskType, Context context); - - /** - * 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 existing 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectTaskInner createOrUpdate( - String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters); - - /** - * 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 existing 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String groupName, - String serviceName, - String projectName, - String taskName, - ProjectTaskInner parameters, - Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectTaskInner get(String groupName, String serviceName, String projectName, String taskName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String groupName, String serviceName, String projectName, String taskName, String expand, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String groupName, String serviceName, String projectName, String taskName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String groupName, - String serviceName, - String projectName, - String taskName, - Boolean deleteRunningTasks, - Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectTaskInner update( - String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String groupName, - String serviceName, - String projectName, - String taskName, - ProjectTaskInner parameters, - Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectTaskInner cancel(String groupName, String serviceName, String projectName, String taskName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelWithResponse( - String groupName, String serviceName, String projectName, String taskName, Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/UsagesClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/UsagesClient.java deleted file mode 100644 index 4e8adef0cd7e6..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/UsagesClient.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.QuotaInner; - -/** An instance of this class provides access to all the operations defined in UsagesClient. */ -public interface UsagesClient { - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * This method returns region-specific quotas and resource usage information for the Database Migration Service. - * - * @param location The Azure region of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AvailableServiceSkuInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AvailableServiceSkuInner.java deleted file mode 100644 index d7fcbe65654d7..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AvailableServiceSkuInner.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuAutoGenerated; -import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuCapacity; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes the available service SKU. */ -@Fluent -public final class AvailableServiceSkuInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableServiceSkuInner.class); - - /* - * The resource type, including the provider namespace - */ - @JsonProperty(value = "resourceType") - private String resourceType; - - /* - * SKU name, tier, etc. - */ - @JsonProperty(value = "sku") - private AvailableServiceSkuAutoGenerated sku; - - /* - * A description of the scaling capacities of the SKU - */ - @JsonProperty(value = "capacity") - private AvailableServiceSkuCapacity capacity; - - /** - * Get the resourceType property: The resource type, including the provider namespace. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Set the resourceType property: 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 the sku property: SKU name, tier, etc. - * - * @return the sku value. - */ - public AvailableServiceSkuAutoGenerated sku() { - return this.sku; - } - - /** - * Set the sku property: SKU name, tier, etc. - * - * @param sku the sku value to set. - * @return the AvailableServiceSkuInner object itself. - */ - public AvailableServiceSkuInner withSku(AvailableServiceSkuAutoGenerated sku) { - this.sku = sku; - return this; - } - - /** - * Get the capacity property: A description of the scaling capacities of the SKU. - * - * @return the capacity value. - */ - public AvailableServiceSkuCapacity capacity() { - return this.capacity; - } - - /** - * Set the capacity property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (capacity() != null) { - capacity().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceInner.java deleted file mode 100644 index 410563e414e8f..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceInner.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.models.ServiceProvisioningState; -import com.azure.resourcemanager.datamigration.models.ServiceSku; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** A Database Migration Service resource. */ -@JsonFlatten -@Fluent -public class DataMigrationServiceInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMigrationServiceInner.class); - - /* - * 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; - - /* - * Service SKU - */ - @JsonProperty(value = "sku") - private ServiceSku sku; - - /* - * The resource's provisioning state - */ - @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") - private String virtualSubnetId; - - /** - * Get the etag property: HTTP strong entity tag value. Ignored if submitted. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: 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 kind property: The resource kind. Only 'vm' (the default) is supported. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: 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 sku property: Service SKU. - * - * @return the sku value. - */ - public ServiceSku sku() { - return this.sku; - } - - /** - * Set the sku property: Service SKU. - * - * @param sku the sku value to set. - * @return the DataMigrationServiceInner object itself. - */ - public DataMigrationServiceInner withSku(ServiceSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the provisioningState property: The resource's provisioning state. - * - * @return the provisioningState value. - */ - public ServiceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the publicKey property: The public key of the service, used to encrypt secrets sent to the service. - * - * @return the publicKey value. - */ - public String publicKey() { - return this.publicKey; - } - - /** - * Set the publicKey property: The public key of the service, used to encrypt secrets sent to the service. - * - * @param publicKey the publicKey value to set. - * @return the DataMigrationServiceInner object itself. - */ - public DataMigrationServiceInner withPublicKey(String publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - * Get the virtualSubnetId property: The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the - * service should be joined. - * - * @return the virtualSubnetId value. - */ - public String virtualSubnetId() { - return this.virtualSubnetId; - } - - /** - * Set the virtualSubnetId property: The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the - * service should be joined. - * - * @param virtualSubnetId the virtualSubnetId value to set. - * @return the DataMigrationServiceInner object itself. - */ - public DataMigrationServiceInner withVirtualSubnetId(String virtualSubnetId) { - this.virtualSubnetId = virtualSubnetId; - return this; - } - - /** {@inheritDoc} */ - @Override - public DataMigrationServiceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataMigrationServiceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceStatusResponseInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceStatusResponseInner.java deleted file mode 100644 index b53702e4088b7..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceStatusResponseInner.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Service health status. */ -@Fluent -public final class DataMigrationServiceStatusResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMigrationServiceStatusResponseInner.class); - - /* - * The DMS instance agent version - */ - @JsonProperty(value = "agentVersion") - private String agentVersion; - - /* - * 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 agentVersion property: The DMS instance agent version. - * - * @return the agentVersion value. - */ - public String agentVersion() { - return this.agentVersion; - } - - /** - * Set the agentVersion property: 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 status property: 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 status property: 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 vmSize property: The services virtual machine size, such as 'Standard_D2_v2'. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: 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 supportedTaskTypes property: The list of supported task types. - * - * @return the supportedTaskTypes value. - */ - public List supportedTaskTypes() { - return this.supportedTaskTypes; - } - - /** - * Set the supportedTaskTypes property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/NameAvailabilityResponseInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/NameAvailabilityResponseInner.java deleted file mode 100644 index d80dbc0a2a7bd..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/NameAvailabilityResponseInner.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.models.NameCheckFailureReason; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Indicates whether a proposed resource name is available. */ -@Immutable -public final class NameAvailabilityResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityResponseInner.class); - - /* - * If true, the name is valid and available. If false, 'reason' describes - * why not. - */ - @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean nameAvailable; - - /* - * The reason why the name is not available, if nameAvailable is false - */ - @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) - private NameCheckFailureReason reason; - - /* - * The localized reason why the name is not available, if nameAvailable is - * false - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * Get the nameAvailable property: If true, the name is valid and available. If false, 'reason' describes why not. - * - * @return the nameAvailable value. - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Get the reason property: The reason why the name is not available, if nameAvailable is false. - * - * @return the reason value. - */ - public NameCheckFailureReason reason() { - return this.reason; - } - - /** - * Get the message property: The localized reason why the name is not available, if nameAvailable is false. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectInner.java deleted file mode 100644 index 478836c6d79e2..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectInner.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.models.ConnectionInfo; -import com.azure.resourcemanager.datamigration.models.DatabaseInfo; -import com.azure.resourcemanager.datamigration.models.ProjectProvisioningState; -import com.azure.resourcemanager.datamigration.models.ProjectSourcePlatform; -import com.azure.resourcemanager.datamigration.models.ProjectTargetPlatform; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** A project resource. */ -@JsonFlatten -@Fluent -public class ProjectInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProjectInner.class); - - /* - * Source platform for the project - */ - @JsonProperty(value = "properties.sourcePlatform") - private ProjectSourcePlatform sourcePlatform; - - /* - * Target platform for the project - */ - @JsonProperty(value = "properties.targetPlatform") - private ProjectTargetPlatform targetPlatform; - - /* - * UTC Date and time when project was created - */ - @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProjectProvisioningState provisioningState; - - /** - * Get the sourcePlatform property: Source platform for the project. - * - * @return the sourcePlatform value. - */ - public ProjectSourcePlatform sourcePlatform() { - return this.sourcePlatform; - } - - /** - * Set the sourcePlatform property: Source platform for the project. - * - * @param sourcePlatform the sourcePlatform value to set. - * @return the ProjectInner object itself. - */ - public ProjectInner withSourcePlatform(ProjectSourcePlatform sourcePlatform) { - this.sourcePlatform = sourcePlatform; - return this; - } - - /** - * Get the targetPlatform property: Target platform for the project. - * - * @return the targetPlatform value. - */ - public ProjectTargetPlatform targetPlatform() { - return this.targetPlatform; - } - - /** - * Set the targetPlatform property: Target platform for the project. - * - * @param targetPlatform the targetPlatform value to set. - * @return the ProjectInner object itself. - */ - public ProjectInner withTargetPlatform(ProjectTargetPlatform targetPlatform) { - this.targetPlatform = targetPlatform; - return this; - } - - /** - * Get the creationTime property: UTC Date and time when project was created. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Get the sourceConnectionInfo property: Information for connecting to source. - * - * @return the sourceConnectionInfo value. - */ - public ConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: Information for connecting to source. - * - * @param sourceConnectionInfo the sourceConnectionInfo value to set. - * @return the ProjectInner object itself. - */ - public ProjectInner withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo) { - this.sourceConnectionInfo = sourceConnectionInfo; - return this; - } - - /** - * Get the targetConnectionInfo property: Information for connecting to target. - * - * @return the targetConnectionInfo value. - */ - public ConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: Information for connecting to target. - * - * @param targetConnectionInfo the targetConnectionInfo value to set. - * @return the ProjectInner object itself. - */ - public ProjectInner withTargetConnectionInfo(ConnectionInfo targetConnectionInfo) { - this.targetConnectionInfo = targetConnectionInfo; - return this; - } - - /** - * Get the databasesInfo property: List of DatabaseInfo. - * - * @return the databasesInfo value. - */ - public List databasesInfo() { - return this.databasesInfo; - } - - /** - * Set the databasesInfo property: List of DatabaseInfo. - * - * @param databasesInfo the databasesInfo value to set. - * @return the ProjectInner object itself. - */ - public ProjectInner withDatabasesInfo(List databasesInfo) { - this.databasesInfo = databasesInfo; - return this; - } - - /** - * Get the provisioningState property: The project's provisioning state. - * - * @return the provisioningState value. - */ - public ProjectProvisioningState provisioningState() { - return this.provisioningState; - } - - /** {@inheritDoc} */ - @Override - public ProjectInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ProjectInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() != null) { - sourceConnectionInfo().validate(); - } - if (targetConnectionInfo() != null) { - targetConnectionInfo().validate(); - } - if (databasesInfo() != null) { - databasesInfo().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectTaskInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectTaskInner.java deleted file mode 100644 index 7e38d4be1d3d4..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectTaskInner.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.models.ProjectTaskProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A task resource. */ -@Fluent -public final class ProjectTaskInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProjectTaskInner.class); - - /* - * HTTP strong entity tag value. This is ignored if submitted. - */ - @JsonProperty(value = "etag") - private String etag; - - /* - * Custom task properties - */ - @JsonProperty(value = "properties") - private ProjectTaskProperties properties; - - /** - * Get the etag property: HTTP strong entity tag value. This is ignored if submitted. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: HTTP strong entity tag value. This is ignored if submitted. - * - * @param etag the etag value to set. - * @return the ProjectTaskInner object itself. - */ - public ProjectTaskInner withEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Get the properties property: Custom task properties. - * - * @return the properties value. - */ - public ProjectTaskProperties properties() { - return this.properties; - } - - /** - * Set the properties property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/QuotaInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/QuotaInner.java deleted file mode 100644 index d5e768228b113..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/QuotaInner.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.models.QuotaName; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes a quota for or usage details about a resource. */ -@Fluent -public final class QuotaInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaInner.class); - - /* - * The current value of the quota. If null or missing, the current value - * cannot be determined in the context of the request. - */ - @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 currentValue property: 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 currentValue property: 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 id property: The resource ID of the quota object. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: 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 limit property: 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 limit property: 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 property: The name of the quota. - * - * @return the name value. - */ - public QuotaName name() { - return this.name; - } - - /** - * Set the name property: 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 property: The unit for the quota, such as Count, Bytes, BytesPerSecond, etc. - * - * @return the unit value. - */ - public String unit() { - return this.unit; - } - - /** - * Set the unit property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() != null) { - name().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ResourceSkuInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ResourceSkuInner.java deleted file mode 100644 index 2fbc5472bd095..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ResourceSkuInner.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.models.ResourceSkuCapabilities; -import com.azure.resourcemanager.datamigration.models.ResourceSkuCapacity; -import com.azure.resourcemanager.datamigration.models.ResourceSkuCosts; -import com.azure.resourcemanager.datamigration.models.ResourceSkuRestrictions; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes an available DMS SKU. */ -@Immutable -public final class ResourceSkuInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuInner.class); - - /* - * The type of resource the SKU applies to. - */ - @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 resourceType property: The type of resource the SKU applies to. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Get the name property: The name of SKU. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the tier property: Specifies the tier of DMS in a scale set. - * - * @return the tier value. - */ - public String tier() { - return this.tier; - } - - /** - * Get the size property: The Size of the SKU. - * - * @return the size value. - */ - public String size() { - return this.size; - } - - /** - * Get the family property: The Family of this particular SKU. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Get the kind property: The Kind of resources that are supported in this SKU. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Get the capacity property: Not used. - * - * @return the capacity value. - */ - public ResourceSkuCapacity capacity() { - return this.capacity; - } - - /** - * Get the locations property: The set of locations that the SKU is available. - * - * @return the locations value. - */ - public List locations() { - return this.locations; - } - - /** - * Get the apiVersions property: The api versions that support this SKU. - * - * @return the apiVersions value. - */ - public List apiVersions() { - return this.apiVersions; - } - - /** - * Get the costs property: Metadata for retrieving price info. - * - * @return the costs value. - */ - public List costs() { - return this.costs; - } - - /** - * Get the capabilities property: A name value pair to describe the capability. - * - * @return the capabilities value. - */ - public List capabilities() { - return this.capabilities; - } - - /** - * Get the restrictions property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (capacity() != null) { - capacity().validate(); - } - if (costs() != null) { - costs().forEach(e -> e.validate()); - } - if (capabilities() != null) { - capabilities().forEach(e -> e.validate()); - } - if (restrictions() != null) { - restrictions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ServiceOperationInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ServiceOperationInner.java deleted file mode 100644 index 0809e0e4d86f0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ServiceOperationInner.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.models.ServiceOperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Description of an action supported by the Database Migration Service. */ -@Fluent -public final class ServiceOperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceOperationInner.class); - - /* - * The fully qualified action name, e.g. - * Microsoft.DataMigration/services/read - */ - @JsonProperty(value = "name") - private String name; - - /* - * Localized display text - */ - @JsonProperty(value = "display") - private ServiceOperationDisplay display; - - /** - * Get the name property: The fully qualified action name, e.g. Microsoft.DataMigration/services/read. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The fully qualified action name, e.g. Microsoft.DataMigration/services/read. - * - * @param name the name value to set. - * @return the ServiceOperationInner object itself. - */ - public ServiceOperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display property: Localized display text. - * - * @return the display value. - */ - public ServiceOperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Localized display text. - * - * @param display the display value to set. - * @return the ServiceOperationInner object itself. - */ - public ServiceOperationInner withDisplay(ServiceOperationDisplay display) { - this.display = display; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/package-info.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/package-info.java deleted file mode 100644 index b1cbb58aa8115..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the inner data models for DataMigrationManagementClient. Data Migration Client. */ -package com.azure.resourcemanager.datamigration.fluent.models; diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/package-info.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/package-info.java deleted file mode 100644 index 1eb3aad57c859..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the service clients for DataMigrationManagementClient. Data Migration Client. */ -package com.azure.resourcemanager.datamigration.fluent; diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AvailableServiceSkuImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AvailableServiceSkuImpl.java deleted file mode 100644 index e9c35aa62436e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AvailableServiceSkuImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.resourcemanager.datamigration.fluent.models.AvailableServiceSkuInner; -import com.azure.resourcemanager.datamigration.models.AvailableServiceSku; -import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuAutoGenerated; -import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuCapacity; - -public final class AvailableServiceSkuImpl implements AvailableServiceSku { - private AvailableServiceSkuInner innerObject; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - AvailableServiceSkuImpl( - AvailableServiceSkuInner innerObject, - com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String resourceType() { - return this.innerModel().resourceType(); - } - - public AvailableServiceSkuAutoGenerated sku() { - return this.innerModel().sku(); - } - - public AvailableServiceSkuCapacity capacity() { - return this.innerModel().capacity(); - } - - public AvailableServiceSkuInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientBuilder.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientBuilder.java deleted file mode 100644 index d28dc06eb2a3a..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientBuilder.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** A builder for creating a new instance of the DataMigrationManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {DataMigrationManagementClientImpl.class}) -public final class DataMigrationManagementClientBuilder { - /* - * Identifier of the subscription - */ - private String subscriptionId; - - /** - * Sets Identifier of the subscription. - * - * @param subscriptionId the subscriptionId value. - * @return the DataMigrationManagementClientBuilder. - */ - public DataMigrationManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the DataMigrationManagementClientBuilder. - */ - public DataMigrationManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the DataMigrationManagementClientBuilder. - */ - public DataMigrationManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the DataMigrationManagementClientBuilder. - */ - public DataMigrationManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the DataMigrationManagementClientBuilder. - */ - public DataMigrationManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the DataMigrationManagementClientBuilder. - */ - public DataMigrationManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of DataMigrationManagementClientImpl with the provided parameters. - * - * @return an instance of DataMigrationManagementClientImpl. - */ - public DataMigrationManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } - DataMigrationManagementClientImpl client = - new DataMigrationManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); - return client; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientImpl.java deleted file mode 100644 index d8cb91cfe406e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientImpl.java +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.datamigration.fluent.DataMigrationManagementClient; -import com.azure.resourcemanager.datamigration.fluent.OperationsClient; -import com.azure.resourcemanager.datamigration.fluent.ProjectsClient; -import com.azure.resourcemanager.datamigration.fluent.ResourceSkusClient; -import com.azure.resourcemanager.datamigration.fluent.ServicesClient; -import com.azure.resourcemanager.datamigration.fluent.TasksClient; -import com.azure.resourcemanager.datamigration.fluent.UsagesClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.util.Map; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** Initializes a new instance of the DataMigrationManagementClientImpl type. */ -@ServiceClient(builder = DataMigrationManagementClientBuilder.class) -public final class DataMigrationManagementClientImpl implements DataMigrationManagementClient { - private final ClientLogger logger = new ClientLogger(DataMigrationManagementClientImpl.class); - - /** Identifier of the subscription. */ - private final String subscriptionId; - - /** - * Gets Identifier of the subscription. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** server parameter. */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** Api Version. */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** The HTTP pipeline to send requests through. */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** The serializer to serialize an object into a string. */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** The default poll interval for long-running operation. */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** The ResourceSkusClient object to access its operations. */ - private final ResourceSkusClient resourceSkus; - - /** - * Gets the ResourceSkusClient object to access its operations. - * - * @return the ResourceSkusClient object. - */ - public ResourceSkusClient getResourceSkus() { - return this.resourceSkus; - } - - /** The ServicesClient object to access its operations. */ - private final ServicesClient services; - - /** - * Gets the ServicesClient object to access its operations. - * - * @return the ServicesClient object. - */ - public ServicesClient getServices() { - return this.services; - } - - /** The TasksClient object to access its operations. */ - private final TasksClient tasks; - - /** - * Gets the TasksClient object to access its operations. - * - * @return the TasksClient object. - */ - public TasksClient getTasks() { - return this.tasks; - } - - /** The ProjectsClient object to access its operations. */ - private final ProjectsClient projects; - - /** - * Gets the ProjectsClient object to access its operations. - * - * @return the ProjectsClient object. - */ - public ProjectsClient getProjects() { - return this.projects; - } - - /** The UsagesClient object to access its operations. */ - private final UsagesClient usages; - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - public UsagesClient getUsages() { - return this.usages; - } - - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * Initializes an instance of DataMigrationManagementClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param subscriptionId Identifier of the subscription. - * @param endpoint server parameter. - */ - DataMigrationManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = "2018-04-19"; - this.resourceSkus = new ResourceSkusClientImpl(this); - this.services = new ServicesClientImpl(this); - this.tasks = new TasksClientImpl(this); - this.projects = new ProjectsClientImpl(this); - this.usages = new UsagesClientImpl(this); - this.operations = new OperationsClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(s); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceImpl.java deleted file mode 100644 index 1161977596375..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceImpl.java +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceInner; -import com.azure.resourcemanager.datamigration.models.DataMigrationService; -import com.azure.resourcemanager.datamigration.models.DataMigrationServiceStatusResponse; -import com.azure.resourcemanager.datamigration.models.NameAvailabilityRequest; -import com.azure.resourcemanager.datamigration.models.NameAvailabilityResponse; -import com.azure.resourcemanager.datamigration.models.ServiceProvisioningState; -import com.azure.resourcemanager.datamigration.models.ServiceSku; -import java.util.Collections; -import java.util.Map; - -public final class DataMigrationServiceImpl - implements DataMigrationService, DataMigrationService.Definition, DataMigrationService.Update { - private DataMigrationServiceInner innerObject; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String etag() { - return this.innerModel().etag(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public ServiceSku sku() { - return this.innerModel().sku(); - } - - public ServiceProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String publicKey() { - return this.innerModel().publicKey(); - } - - public String virtualSubnetId() { - return this.innerModel().virtualSubnetId(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public DataMigrationServiceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } - - private String groupName; - - private String serviceName; - - public DataMigrationServiceImpl withExistingResourceGroup(String groupName) { - this.groupName = groupName; - return this; - } - - public DataMigrationService create() { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .createOrUpdate(groupName, serviceName, this.innerModel(), Context.NONE); - return this; - } - - public DataMigrationService create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .createOrUpdate(groupName, serviceName, this.innerModel(), context); - return this; - } - - DataMigrationServiceImpl(String name, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = new DataMigrationServiceInner(); - this.serviceManager = serviceManager; - this.serviceName = name; - } - - public DataMigrationServiceImpl update() { - return this; - } - - public DataMigrationService apply() { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .update(groupName, serviceName, this.innerModel(), Context.NONE); - return this; - } - - public DataMigrationService apply(Context context) { - this.innerObject = - serviceManager.serviceClient().getServices().update(groupName, serviceName, this.innerModel(), context); - return this; - } - - DataMigrationServiceImpl( - DataMigrationServiceInner innerObject, - com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.groupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.serviceName = Utils.getValueFromIdByName(innerObject.id(), "services"); - } - - public DataMigrationService refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .getByResourceGroupWithResponse(groupName, serviceName, Context.NONE) - .getValue(); - return this; - } - - public DataMigrationService refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .getByResourceGroupWithResponse(groupName, serviceName, context) - .getValue(); - return this; - } - - public DataMigrationServiceStatusResponse checkStatus() { - return serviceManager.services().checkStatus(groupName, serviceName); - } - - public Response checkStatusWithResponse(Context context) { - return serviceManager.services().checkStatusWithResponse(groupName, serviceName, context); - } - - public void start() { - serviceManager.services().start(groupName, serviceName); - } - - public void start(Context context) { - serviceManager.services().start(groupName, serviceName, context); - } - - public void stop() { - serviceManager.services().stop(groupName, serviceName); - } - - public void stop(Context context) { - serviceManager.services().stop(groupName, serviceName, context); - } - - public NameAvailabilityResponse nestedCheckNameAvailability(NameAvailabilityRequest parameters) { - return serviceManager.services().nestedCheckNameAvailability(groupName, serviceName, parameters); - } - - public Response nestedCheckNameAvailabilityWithResponse( - NameAvailabilityRequest parameters, Context context) { - return serviceManager - .services() - .nestedCheckNameAvailabilityWithResponse(groupName, serviceName, parameters, context); - } - - public DataMigrationServiceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public DataMigrationServiceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public DataMigrationServiceImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public DataMigrationServiceImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public DataMigrationServiceImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public DataMigrationServiceImpl withSku(ServiceSku sku) { - this.innerModel().withSku(sku); - return this; - } - - public DataMigrationServiceImpl withPublicKey(String publicKey) { - this.innerModel().withPublicKey(publicKey); - return this; - } - - public DataMigrationServiceImpl withVirtualSubnetId(String virtualSubnetId) { - this.innerModel().withVirtualSubnetId(virtualSubnetId); - return this; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceStatusResponseImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceStatusResponseImpl.java deleted file mode 100644 index b1bb0a6723cd4..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceStatusResponseImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceStatusResponseInner; -import com.azure.resourcemanager.datamigration.models.DataMigrationServiceStatusResponse; -import java.util.Collections; -import java.util.List; - -public final class DataMigrationServiceStatusResponseImpl implements DataMigrationServiceStatusResponse { - private DataMigrationServiceStatusResponseInner innerObject; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - DataMigrationServiceStatusResponseImpl( - DataMigrationServiceStatusResponseInner innerObject, - com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String agentVersion() { - return this.innerModel().agentVersion(); - } - - public String status() { - return this.innerModel().status(); - } - - public String vmSize() { - return this.innerModel().vmSize(); - } - - public List supportedTaskTypes() { - List inner = this.innerModel().supportedTaskTypes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public DataMigrationServiceStatusResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/NameAvailabilityResponseImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/NameAvailabilityResponseImpl.java deleted file mode 100644 index 910784f2d67d8..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/NameAvailabilityResponseImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.resourcemanager.datamigration.fluent.models.NameAvailabilityResponseInner; -import com.azure.resourcemanager.datamigration.models.NameAvailabilityResponse; -import com.azure.resourcemanager.datamigration.models.NameCheckFailureReason; - -public final class NameAvailabilityResponseImpl implements NameAvailabilityResponse { - private NameAvailabilityResponseInner innerObject; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - NameAvailabilityResponseImpl( - NameAvailabilityResponseInner innerObject, - com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean nameAvailable() { - return this.innerModel().nameAvailable(); - } - - public NameCheckFailureReason reason() { - return this.innerModel().reason(); - } - - public String message() { - return this.innerModel().message(); - } - - public NameAvailabilityResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/OperationsClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/OperationsClientImpl.java deleted file mode 100644 index f7e1baa7a3258..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.OperationsClient; -import com.azure.resourcemanager.datamigration.fluent.models.ServiceOperationInner; -import com.azure.resourcemanager.datamigration.models.ServiceOperationList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final OperationsService service; - - /** The service client containing this operation class. */ - private final DataMigrationManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(DataMigrationManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DataMigrationManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DataMigrationManagem") - private interface OperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.DataMigration/operations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists all available actions exposed by the Database Migration Service resource provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all available actions exposed by the Database Migration Service resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists all available actions exposed by the Database Migration Service resource provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all available actions exposed by the Database Migration Service resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all available actions exposed by the Database Migration Service resource provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all available actions exposed by the Database Migration Service resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/OperationsImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/OperationsImpl.java deleted file mode 100644 index 27e354b1cdd26..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/OperationsImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.OperationsClient; -import com.azure.resourcemanager.datamigration.fluent.models.ServiceOperationInner; -import com.azure.resourcemanager.datamigration.models.Operations; -import com.azure.resourcemanager.datamigration.models.ServiceOperation; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ServiceOperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ServiceOperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectImpl.java deleted file mode 100644 index 7d8fa863da3c0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectImpl.java +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectInner; -import com.azure.resourcemanager.datamigration.models.ConnectionInfo; -import com.azure.resourcemanager.datamigration.models.DatabaseInfo; -import com.azure.resourcemanager.datamigration.models.Project; -import com.azure.resourcemanager.datamigration.models.ProjectProvisioningState; -import com.azure.resourcemanager.datamigration.models.ProjectSourcePlatform; -import com.azure.resourcemanager.datamigration.models.ProjectTargetPlatform; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class ProjectImpl implements Project, Project.Definition, Project.Update { - private ProjectInner innerObject; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ProjectSourcePlatform sourcePlatform() { - return this.innerModel().sourcePlatform(); - } - - public ProjectTargetPlatform targetPlatform() { - return this.innerModel().targetPlatform(); - } - - public OffsetDateTime creationTime() { - return this.innerModel().creationTime(); - } - - public ConnectionInfo sourceConnectionInfo() { - return this.innerModel().sourceConnectionInfo(); - } - - public ConnectionInfo targetConnectionInfo() { - return this.innerModel().targetConnectionInfo(); - } - - public List databasesInfo() { - List inner = this.innerModel().databasesInfo(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ProjectProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public ProjectInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } - - private String groupName; - - private String serviceName; - - private String projectName; - - public ProjectImpl withExistingService(String groupName, String serviceName) { - this.groupName = groupName; - this.serviceName = serviceName; - return this; - } - - public Project create() { - this.innerObject = - serviceManager - .serviceClient() - .getProjects() - .createOrUpdateWithResponse(groupName, serviceName, projectName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Project create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getProjects() - .createOrUpdateWithResponse(groupName, serviceName, projectName, this.innerModel(), context) - .getValue(); - return this; - } - - ProjectImpl(String name, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = new ProjectInner(); - this.serviceManager = serviceManager; - this.projectName = name; - } - - public ProjectImpl update() { - return this; - } - - public Project apply() { - this.innerObject = - serviceManager - .serviceClient() - .getProjects() - .updateWithResponse(groupName, serviceName, projectName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Project apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getProjects() - .updateWithResponse(groupName, serviceName, projectName, this.innerModel(), context) - .getValue(); - return this; - } - - ProjectImpl(ProjectInner innerObject, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.groupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.serviceName = Utils.getValueFromIdByName(innerObject.id(), "services"); - this.projectName = Utils.getValueFromIdByName(innerObject.id(), "projects"); - } - - public Project refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getProjects() - .getWithResponse(groupName, serviceName, projectName, Context.NONE) - .getValue(); - return this; - } - - public Project refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getProjects() - .getWithResponse(groupName, serviceName, projectName, context) - .getValue(); - return this; - } - - public ProjectImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ProjectImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ProjectImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ProjectImpl withSourcePlatform(ProjectSourcePlatform sourcePlatform) { - this.innerModel().withSourcePlatform(sourcePlatform); - return this; - } - - public ProjectImpl withTargetPlatform(ProjectTargetPlatform targetPlatform) { - this.innerModel().withTargetPlatform(targetPlatform); - return this; - } - - public ProjectImpl withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo) { - this.innerModel().withSourceConnectionInfo(sourceConnectionInfo); - return this; - } - - public ProjectImpl withTargetConnectionInfo(ConnectionInfo targetConnectionInfo) { - this.innerModel().withTargetConnectionInfo(targetConnectionInfo); - return this; - } - - public ProjectImpl withDatabasesInfo(List databasesInfo) { - this.innerModel().withDatabasesInfo(databasesInfo); - return this; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectTaskImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectTaskImpl.java deleted file mode 100644 index 21110750efb08..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectTaskImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner; -import com.azure.resourcemanager.datamigration.models.ProjectTask; -import com.azure.resourcemanager.datamigration.models.ProjectTaskProperties; - -public final class ProjectTaskImpl implements ProjectTask, ProjectTask.Definition, ProjectTask.Update { - private ProjectTaskInner innerObject; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public ProjectTaskProperties properties() { - return this.innerModel().properties(); - } - - public ProjectTaskInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } - - private String groupName; - - private String serviceName; - - private String projectName; - - private String taskName; - - public ProjectTaskImpl withExistingProject(String groupName, String serviceName, String projectName) { - this.groupName = groupName; - this.serviceName = serviceName; - this.projectName = projectName; - return this; - } - - public ProjectTask create() { - this.innerObject = - serviceManager - .serviceClient() - .getTasks() - .createOrUpdateWithResponse( - groupName, serviceName, projectName, taskName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ProjectTask create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getTasks() - .createOrUpdateWithResponse(groupName, serviceName, projectName, taskName, this.innerModel(), context) - .getValue(); - return this; - } - - ProjectTaskImpl(String name, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = new ProjectTaskInner(); - this.serviceManager = serviceManager; - this.taskName = name; - } - - public ProjectTaskImpl update() { - return this; - } - - public ProjectTask apply() { - this.innerObject = - serviceManager - .serviceClient() - .getTasks() - .updateWithResponse(groupName, serviceName, projectName, taskName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ProjectTask apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getTasks() - .updateWithResponse(groupName, serviceName, projectName, taskName, this.innerModel(), context) - .getValue(); - return this; - } - - ProjectTaskImpl( - ProjectTaskInner innerObject, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.groupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.serviceName = Utils.getValueFromIdByName(innerObject.id(), "services"); - this.projectName = Utils.getValueFromIdByName(innerObject.id(), "projects"); - this.taskName = Utils.getValueFromIdByName(innerObject.id(), "tasks"); - } - - public ProjectTask refresh() { - String localExpand = null; - this.innerObject = - serviceManager - .serviceClient() - .getTasks() - .getWithResponse(groupName, serviceName, projectName, taskName, localExpand, Context.NONE) - .getValue(); - return this; - } - - public ProjectTask refresh(Context context) { - String localExpand = null; - this.innerObject = - serviceManager - .serviceClient() - .getTasks() - .getWithResponse(groupName, serviceName, projectName, taskName, localExpand, context) - .getValue(); - return this; - } - - public ProjectTask cancel() { - return serviceManager.tasks().cancel(groupName, serviceName, projectName, taskName); - } - - public Response cancelWithResponse(Context context) { - return serviceManager.tasks().cancelWithResponse(groupName, serviceName, projectName, taskName, context); - } - - public ProjectTaskImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public ProjectTaskImpl withProperties(ProjectTaskProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectsClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectsClientImpl.java deleted file mode 100644 index 19ea4b810e8e3..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectsClientImpl.java +++ /dev/null @@ -1,1126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.ProjectsClient; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectInner; -import com.azure.resourcemanager.datamigration.models.ProjectList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ProjectsClient. */ -public final class ProjectsClientImpl implements ProjectsClient { - private final ClientLogger logger = new ClientLogger(ProjectsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ProjectsService service; - - /** The service client containing this operation class. */ - private final DataMigrationManagementClientImpl client; - - /** - * Initializes an instance of ProjectsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ProjectsClientImpl(DataMigrationManagementClientImpl client) { - this.service = RestProxy.create(ProjectsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DataMigrationManagementClientProjects to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DataMigrationManagem") - private interface ProjectsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects/{projectName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @PathParam("projectName") String projectName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ProjectInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects/{projectName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @PathParam("projectName") String projectName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects/{projectName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @PathParam("projectName") String projectName, - @QueryParam("api-version") String apiVersion, - @QueryParam("deleteRunningTasks") Boolean deleteRunningTasks, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects/{projectName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @PathParam("projectName") String projectName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ProjectInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * The project resource is a nested resource representing a stored migration project. This method returns a list of - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String groupName, String serviceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The project resource is a nested resource representing a stored migration project. This method returns a list of - * projects owned by a service resource. - * - * @param groupName Name of the resource group. - * @param serviceName Name of the service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String groupName, String serviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * The project resource is a nested resource representing a stored migration project. This method returns a list of - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String groupName, String serviceName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(groupName, serviceName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String groupName, String serviceName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(groupName, serviceName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String groupName, String serviceName) { - return new PagedIterable<>(listByResourceGroupAsync(groupName, serviceName)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String groupName, String serviceName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(groupName, serviceName, context)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String groupName, String serviceName, String projectName, ProjectInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String groupName, String serviceName, String projectName, ProjectInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String groupName, String serviceName, String projectName, ProjectInner parameters) { - return createOrUpdateWithResponseAsync(groupName, serviceName, projectName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectInner createOrUpdate( - String groupName, String serviceName, String projectName, ProjectInner parameters) { - return createOrUpdateAsync(groupName, serviceName, projectName, parameters).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String groupName, String serviceName, String projectName, ProjectInner parameters, Context context) { - return createOrUpdateWithResponseAsync(groupName, serviceName, projectName, parameters, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String groupName, String serviceName, String projectName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String groupName, String serviceName, String projectName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String groupName, String serviceName, String projectName) { - return getWithResponseAsync(groupName, serviceName, projectName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectInner get(String groupName, String serviceName, String projectName) { - return getAsync(groupName, serviceName, projectName).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String groupName, String serviceName, String projectName, Context context) { - return getWithResponseAsync(groupName, serviceName, projectName, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String groupName, String serviceName, String projectName, Boolean deleteRunningTasks) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - this.client.getApiVersion(), - deleteRunningTasks, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String groupName, String serviceName, String projectName, Boolean deleteRunningTasks, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - this.client.getApiVersion(), - deleteRunningTasks, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String groupName, String serviceName, String projectName, Boolean deleteRunningTasks) { - return deleteWithResponseAsync(groupName, serviceName, projectName, deleteRunningTasks) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String groupName, String serviceName, String projectName) { - final Boolean deleteRunningTasks = null; - return deleteWithResponseAsync(groupName, serviceName, projectName, deleteRunningTasks) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String groupName, String serviceName, String projectName) { - final Boolean deleteRunningTasks = null; - deleteAsync(groupName, serviceName, projectName, deleteRunningTasks).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String groupName, String serviceName, String projectName, Boolean deleteRunningTasks, Context context) { - return deleteWithResponseAsync(groupName, serviceName, projectName, deleteRunningTasks, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String groupName, String serviceName, String projectName, ProjectInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String groupName, String serviceName, String projectName, ProjectInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String groupName, String serviceName, String projectName, ProjectInner parameters) { - return updateWithResponseAsync(groupName, serviceName, projectName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectInner update(String groupName, String serviceName, String projectName, ProjectInner parameters) { - return updateAsync(groupName, serviceName, projectName, parameters).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String groupName, String serviceName, String projectName, ProjectInner parameters, Context context) { - return updateWithResponseAsync(groupName, serviceName, projectName, parameters, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectsImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectsImpl.java deleted file mode 100644 index af84fa0b01fde..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ProjectsImpl.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.ProjectsClient; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectInner; -import com.azure.resourcemanager.datamigration.models.Project; -import com.azure.resourcemanager.datamigration.models.Projects; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ProjectsImpl implements Projects { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProjectsImpl.class); - - private final ProjectsClient innerClient; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - public ProjectsImpl( - ProjectsClient innerClient, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByResourceGroup(String groupName, String serviceName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(groupName, serviceName); - return Utils.mapPage(inner, inner1 -> new ProjectImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String groupName, String serviceName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(groupName, serviceName, context); - return Utils.mapPage(inner, inner1 -> new ProjectImpl(inner1, this.manager())); - } - - public Project get(String groupName, String serviceName, String projectName) { - ProjectInner inner = this.serviceClient().get(groupName, serviceName, projectName); - if (inner != null) { - return new ProjectImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String groupName, String serviceName, String projectName, Context context) { - Response inner = - this.serviceClient().getWithResponse(groupName, serviceName, projectName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ProjectImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String groupName, String serviceName, String projectName) { - this.serviceClient().delete(groupName, serviceName, projectName); - } - - public Response deleteWithResponse( - String groupName, String serviceName, String projectName, Boolean deleteRunningTasks, Context context) { - return this - .serviceClient() - .deleteWithResponse(groupName, serviceName, projectName, deleteRunningTasks, context); - } - - public Project getById(String id) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String projectName = Utils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - return this.getWithResponse(groupName, serviceName, projectName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String projectName = Utils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - return this.getWithResponse(groupName, serviceName, projectName, context); - } - - public void deleteById(String id) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String projectName = Utils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - Boolean localDeleteRunningTasks = null; - this.deleteWithResponse(groupName, serviceName, projectName, localDeleteRunningTasks, Context.NONE).getValue(); - } - - public Response deleteByIdWithResponse(String id, Boolean deleteRunningTasks, Context context) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String projectName = Utils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - return this.deleteWithResponse(groupName, serviceName, projectName, deleteRunningTasks, context); - } - - private ProjectsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } - - public ProjectImpl define(String name) { - return new ProjectImpl(name, this.manager()); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/QuotaImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/QuotaImpl.java deleted file mode 100644 index 5f904df3bedb0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/QuotaImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.resourcemanager.datamigration.fluent.models.QuotaInner; -import com.azure.resourcemanager.datamigration.models.Quota; -import com.azure.resourcemanager.datamigration.models.QuotaName; - -public final class QuotaImpl implements Quota { - private QuotaInner innerObject; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - QuotaImpl(QuotaInner innerObject, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Double currentValue() { - return this.innerModel().currentValue(); - } - - public String id() { - return this.innerModel().id(); - } - - public Double limit() { - return this.innerModel().limit(); - } - - public QuotaName name() { - return this.innerModel().name(); - } - - public String unit() { - return this.innerModel().unit(); - } - - public QuotaInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkuImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkuImpl.java deleted file mode 100644 index 3865287ab7632..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkuImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.resourcemanager.datamigration.fluent.models.ResourceSkuInner; -import com.azure.resourcemanager.datamigration.models.ResourceSku; -import com.azure.resourcemanager.datamigration.models.ResourceSkuCapabilities; -import com.azure.resourcemanager.datamigration.models.ResourceSkuCapacity; -import com.azure.resourcemanager.datamigration.models.ResourceSkuCosts; -import com.azure.resourcemanager.datamigration.models.ResourceSkuRestrictions; -import java.util.Collections; -import java.util.List; - -public final class ResourceSkuImpl implements ResourceSku { - private ResourceSkuInner innerObject; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - ResourceSkuImpl( - ResourceSkuInner innerObject, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String resourceType() { - return this.innerModel().resourceType(); - } - - public String name() { - return this.innerModel().name(); - } - - public String tier() { - return this.innerModel().tier(); - } - - public String size() { - return this.innerModel().size(); - } - - public String family() { - return this.innerModel().family(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public ResourceSkuCapacity capacity() { - return this.innerModel().capacity(); - } - - public List locations() { - List inner = this.innerModel().locations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List apiVersions() { - List inner = this.innerModel().apiVersions(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List costs() { - List inner = this.innerModel().costs(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List capabilities() { - List inner = this.innerModel().capabilities(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List restrictions() { - List inner = this.innerModel().restrictions(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ResourceSkuInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkusClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkusClientImpl.java deleted file mode 100644 index 013e663a1c2b7..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkusClientImpl.java +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.ResourceSkusClient; -import com.azure.resourcemanager.datamigration.fluent.models.ResourceSkuInner; -import com.azure.resourcemanager.datamigration.models.ResourceSkusResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ResourceSkusClient. */ -public final class ResourceSkusClientImpl implements ResourceSkusClient { - private final ClientLogger logger = new ClientLogger(ResourceSkusClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ResourceSkusService service; - - /** The service client containing this operation class. */ - private final DataMigrationManagementClientImpl client; - - /** - * Initializes an instance of ResourceSkusClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ResourceSkusClientImpl(DataMigrationManagementClientImpl client) { - this.service = - RestProxy.create(ResourceSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DataMigrationManagementClientResourceSkus to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DataMigrationManagem") - private interface ResourceSkusService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/skus") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkusNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * The skus action returns the list of SKUs that DMS supports. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The skus action returns the list of SKUs that DMS supports. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * The skus action returns the list of SKUs that DMS supports. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listSkusNextSinglePageAsync(nextLink)); - } - - /** - * The skus action returns the list of SKUs that DMS supports. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listSkusNextSinglePageAsync(nextLink, context)); - } - - /** - * The skus action returns the list of SKUs that DMS supports. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * The skus action returns the list of SKUs that DMS supports. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSkusNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSkusNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkusImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkusImpl.java deleted file mode 100644 index bb4457a04a333..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ResourceSkusImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.ResourceSkusClient; -import com.azure.resourcemanager.datamigration.fluent.models.ResourceSkuInner; -import com.azure.resourcemanager.datamigration.models.ResourceSku; -import com.azure.resourcemanager.datamigration.models.ResourceSkus; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ResourceSkusImpl implements ResourceSkus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkusImpl.class); - - private final ResourceSkusClient innerClient; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - public ResourceSkusImpl( - ResourceSkusClient innerClient, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ResourceSkuImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ResourceSkuImpl(inner1, this.manager())); - } - - private ResourceSkusClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServiceOperationImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServiceOperationImpl.java deleted file mode 100644 index 67bb7306fa126..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServiceOperationImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.resourcemanager.datamigration.fluent.models.ServiceOperationInner; -import com.azure.resourcemanager.datamigration.models.ServiceOperation; -import com.azure.resourcemanager.datamigration.models.ServiceOperationDisplay; - -public final class ServiceOperationImpl implements ServiceOperation { - private ServiceOperationInner innerObject; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - ServiceOperationImpl( - ServiceOperationInner innerObject, - com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public ServiceOperationDisplay display() { - return this.innerModel().display(); - } - - public ServiceOperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServicesClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServicesClientImpl.java deleted file mode 100644 index 4d2909b9be4ce..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServicesClientImpl.java +++ /dev/null @@ -1,2987 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.datamigration.fluent.ServicesClient; -import com.azure.resourcemanager.datamigration.fluent.models.AvailableServiceSkuInner; -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceInner; -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceStatusResponseInner; -import com.azure.resourcemanager.datamigration.fluent.models.NameAvailabilityResponseInner; -import com.azure.resourcemanager.datamigration.models.DataMigrationServiceList; -import com.azure.resourcemanager.datamigration.models.NameAvailabilityRequest; -import com.azure.resourcemanager.datamigration.models.ServiceSkuList; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ServicesClient. */ -public final class ServicesClientImpl implements ServicesClient { - private final ClientLogger logger = new ClientLogger(ServicesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ServicesService service; - - /** The service client containing this operation class. */ - private final DataMigrationManagementClientImpl client; - - /** - * Initializes an instance of ServicesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ServicesClientImpl(DataMigrationManagementClientImpl client) { - this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DataMigrationManagementClientServices to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DataMigrationManagem") - private interface ServicesService { - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}") - @ExpectedResponses({200, 201, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataMigrationServiceInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("deleteRunningTasks") Boolean deleteRunningTasks, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataMigrationServiceInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/checkStatus") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkStatus( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/start") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/stop") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/skus") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkus( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/checkNameAvailability") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> nestedCheckNameAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @QueryParam("api-version") String apiVersion, - @PathParam("serviceName") String serviceName, - @BodyParam("application/json") NameAvailabilityRequest parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}" - + "/checkNameAvailability") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @PathParam("location") String location, - @BodyParam("application/json") NameAvailabilityRequest parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkusNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, DataMigrationServiceInner> beginCreateOrUpdateAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters) { - Mono>> mono = createOrUpdateWithResponseAsync(groupName, serviceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DataMigrationServiceInner.class, - DataMigrationServiceInner.class, - Context.NONE); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, DataMigrationServiceInner> beginCreateOrUpdateAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(groupName, serviceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DataMigrationServiceInner.class, - DataMigrationServiceInner.class, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, DataMigrationServiceInner> beginCreateOrUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters) { - return beginCreateOrUpdateAsync(groupName, serviceName, parameters).getSyncPoller(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, DataMigrationServiceInner> beginCreateOrUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context) { - return beginCreateOrUpdateAsync(groupName, serviceName, parameters, context).getSyncPoller(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters) { - return beginCreateOrUpdateAsync(groupName, serviceName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context) { - return beginCreateOrUpdateAsync(groupName, serviceName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataMigrationServiceInner createOrUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters) { - return createOrUpdateAsync(groupName, serviceName, parameters).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataMigrationServiceInner createOrUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context) { - return createOrUpdateAsync(groupName, serviceName, parameters, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String groupName, String serviceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String groupName, String serviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String groupName, String serviceName) { - return getByResourceGroupWithResponseAsync(groupName, serviceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataMigrationServiceInner getByResourceGroup(String groupName, String serviceName) { - return getByResourceGroupAsync(groupName, serviceName).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String groupName, String serviceName, Context context) { - return getByResourceGroupWithResponseAsync(groupName, serviceName, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String groupName, String serviceName, Boolean deleteRunningTasks) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - deleteRunningTasks, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String groupName, String serviceName, Boolean deleteRunningTasks, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - deleteRunningTasks, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync( - String groupName, String serviceName, Boolean deleteRunningTasks) { - Mono>> mono = deleteWithResponseAsync(groupName, serviceName, deleteRunningTasks); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync( - String groupName, String serviceName, Boolean deleteRunningTasks, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(groupName, serviceName, deleteRunningTasks, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete( - String groupName, String serviceName, Boolean deleteRunningTasks) { - return beginDeleteAsync(groupName, serviceName, deleteRunningTasks).getSyncPoller(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete( - String groupName, String serviceName, Boolean deleteRunningTasks, Context context) { - return beginDeleteAsync(groupName, serviceName, deleteRunningTasks, context).getSyncPoller(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks) { - return beginDeleteAsync(groupName, serviceName, deleteRunningTasks) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String groupName, String serviceName) { - final Boolean deleteRunningTasks = null; - return beginDeleteAsync(groupName, serviceName, deleteRunningTasks) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String groupName, String serviceName, Boolean deleteRunningTasks, Context context) { - return beginDeleteAsync(groupName, serviceName, deleteRunningTasks, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String groupName, String serviceName, Boolean deleteRunningTasks) { - deleteAsync(groupName, serviceName, deleteRunningTasks).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String groupName, String serviceName) { - final Boolean deleteRunningTasks = null; - deleteAsync(groupName, serviceName, deleteRunningTasks).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String groupName, String serviceName, Boolean deleteRunningTasks, Context context) { - deleteAsync(groupName, serviceName, deleteRunningTasks, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, DataMigrationServiceInner> beginUpdateAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters) { - Mono>> mono = updateWithResponseAsync(groupName, serviceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DataMigrationServiceInner.class, - DataMigrationServiceInner.class, - Context.NONE); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, DataMigrationServiceInner> beginUpdateAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(groupName, serviceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DataMigrationServiceInner.class, - DataMigrationServiceInner.class, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, DataMigrationServiceInner> beginUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters) { - return beginUpdateAsync(groupName, serviceName, parameters).getSyncPoller(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, DataMigrationServiceInner> beginUpdate( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context) { - return beginUpdateAsync(groupName, serviceName, parameters, context).getSyncPoller(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters) { - return beginUpdateAsync(groupName, serviceName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context) { - return beginUpdateAsync(groupName, serviceName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataMigrationServiceInner update( - String groupName, String serviceName, DataMigrationServiceInner parameters) { - return updateAsync(groupName, serviceName, parameters).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataMigrationServiceInner update( - String groupName, String serviceName, DataMigrationServiceInner parameters, Context context) { - return updateAsync(groupName, serviceName, parameters, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkStatusWithResponseAsync( - String groupName, String serviceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .checkStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkStatusWithResponseAsync( - String groupName, String serviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .checkStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkStatusAsync(String groupName, String serviceName) { - return checkStatusWithResponseAsync(groupName, serviceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataMigrationServiceStatusResponseInner checkStatus(String groupName, String serviceName) { - return checkStatusAsync(groupName, serviceName).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkStatusWithResponse( - String groupName, String serviceName, Context context) { - return checkStatusWithResponseAsync(groupName, serviceName, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String groupName, String serviceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .start( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String groupName, String serviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .start( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginStartAsync(String groupName, String serviceName) { - Mono>> mono = startWithResponseAsync(groupName, serviceName); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginStartAsync(String groupName, String serviceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = startWithResponseAsync(groupName, serviceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginStart(String groupName, String serviceName) { - return beginStartAsync(groupName, serviceName).getSyncPoller(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginStart(String groupName, String serviceName, Context context) { - return beginStartAsync(groupName, serviceName, context).getSyncPoller(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String groupName, String serviceName) { - return beginStartAsync(groupName, serviceName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String groupName, String serviceName, Context context) { - return beginStartAsync(groupName, serviceName, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String groupName, String serviceName) { - startAsync(groupName, serviceName).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String groupName, String serviceName, Context context) { - startAsync(groupName, serviceName, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String groupName, String serviceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .stop( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync( - String groupName, String serviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .stop( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginStopAsync(String groupName, String serviceName) { - Mono>> mono = stopWithResponseAsync(groupName, serviceName); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginStopAsync(String groupName, String serviceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = stopWithResponseAsync(groupName, serviceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginStop(String groupName, String serviceName) { - return beginStopAsync(groupName, serviceName).getSyncPoller(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginStop(String groupName, String serviceName, Context context) { - return beginStopAsync(groupName, serviceName, context).getSyncPoller(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String groupName, String serviceName) { - return beginStopAsync(groupName, serviceName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String groupName, String serviceName, Context context) { - return beginStopAsync(groupName, serviceName, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String groupName, String serviceName) { - stopAsync(groupName, serviceName).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String groupName, String serviceName, Context context) { - stopAsync(groupName, serviceName, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync( - String groupName, String serviceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listSkus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync( - String groupName, String serviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSkus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync(String groupName, String serviceName) { - return new PagedFlux<>( - () -> listSkusSinglePageAsync(groupName, serviceName), nextLink -> listSkusNextSinglePageAsync(nextLink)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync(String groupName, String serviceName, Context context) { - return new PagedFlux<>( - () -> listSkusSinglePageAsync(groupName, serviceName, context), - nextLink -> listSkusNextSinglePageAsync(nextLink, context)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus(String groupName, String serviceName) { - return new PagedIterable<>(listSkusAsync(groupName, serviceName)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus(String groupName, String serviceName, Context context) { - return new PagedIterable<>(listSkusAsync(groupName, serviceName, context)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> nestedCheckNameAvailabilityWithResponseAsync( - String groupName, String serviceName, NameAvailabilityRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .nestedCheckNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - this.client.getApiVersion(), - serviceName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> nestedCheckNameAvailabilityWithResponseAsync( - String groupName, String serviceName, NameAvailabilityRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .nestedCheckNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - this.client.getApiVersion(), - serviceName, - parameters, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono nestedCheckNameAvailabilityAsync( - String groupName, String serviceName, NameAvailabilityRequest parameters) { - return nestedCheckNameAvailabilityWithResponseAsync(groupName, serviceName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityResponseInner nestedCheckNameAvailability( - String groupName, String serviceName, NameAvailabilityRequest parameters) { - return nestedCheckNameAvailabilityAsync(groupName, serviceName, parameters).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response nestedCheckNameAvailabilityWithResponse( - String groupName, String serviceName, NameAvailabilityRequest parameters, Context context) { - return nestedCheckNameAvailabilityWithResponseAsync(groupName, serviceName, parameters, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String groupName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String groupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String groupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(groupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String groupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(groupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String groupName) { - return new PagedIterable<>(listByResourceGroupAsync(groupName)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String groupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(groupName, context)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String location, NameAvailabilityRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - location, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String location, NameAvailabilityRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - location, - parameters, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - String location, NameAvailabilityRequest parameters) { - return checkNameAvailabilityWithResponseAsync(location, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityResponseInner checkNameAvailability(String location, NameAvailabilityRequest parameters) { - return checkNameAvailabilityAsync(location, parameters).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityRequest parameters, Context context) { - return checkNameAvailabilityWithResponseAsync(location, parameters, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSkusNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSkusNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServicesImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServicesImpl.java deleted file mode 100644 index 458bd7e263930..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServicesImpl.java +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.ServicesClient; -import com.azure.resourcemanager.datamigration.fluent.models.AvailableServiceSkuInner; -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceInner; -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceStatusResponseInner; -import com.azure.resourcemanager.datamigration.fluent.models.NameAvailabilityResponseInner; -import com.azure.resourcemanager.datamigration.models.AvailableServiceSku; -import com.azure.resourcemanager.datamigration.models.DataMigrationService; -import com.azure.resourcemanager.datamigration.models.DataMigrationServiceStatusResponse; -import com.azure.resourcemanager.datamigration.models.NameAvailabilityRequest; -import com.azure.resourcemanager.datamigration.models.NameAvailabilityResponse; -import com.azure.resourcemanager.datamigration.models.Services; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ServicesImpl implements Services { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesImpl.class); - - private final ServicesClient innerClient; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - public ServicesImpl( - ServicesClient innerClient, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public DataMigrationService getByResourceGroup(String groupName, String serviceName) { - DataMigrationServiceInner inner = this.serviceClient().getByResourceGroup(groupName, serviceName); - if (inner != null) { - return new DataMigrationServiceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse( - String groupName, String serviceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(groupName, serviceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DataMigrationServiceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String groupName, String serviceName, Boolean deleteRunningTasks) { - this.serviceClient().delete(groupName, serviceName, deleteRunningTasks); - } - - public void delete(String groupName, String serviceName) { - this.serviceClient().delete(groupName, serviceName); - } - - public void delete(String groupName, String serviceName, Boolean deleteRunningTasks, Context context) { - this.serviceClient().delete(groupName, serviceName, deleteRunningTasks, context); - } - - public DataMigrationServiceStatusResponse checkStatus(String groupName, String serviceName) { - DataMigrationServiceStatusResponseInner inner = this.serviceClient().checkStatus(groupName, serviceName); - if (inner != null) { - return new DataMigrationServiceStatusResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response checkStatusWithResponse( - String groupName, String serviceName, Context context) { - Response inner = - this.serviceClient().checkStatusWithResponse(groupName, serviceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DataMigrationServiceStatusResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void start(String groupName, String serviceName) { - this.serviceClient().start(groupName, serviceName); - } - - public void start(String groupName, String serviceName, Context context) { - this.serviceClient().start(groupName, serviceName, context); - } - - public void stop(String groupName, String serviceName) { - this.serviceClient().stop(groupName, serviceName); - } - - public void stop(String groupName, String serviceName, Context context) { - this.serviceClient().stop(groupName, serviceName, context); - } - - public PagedIterable listSkus(String groupName, String serviceName) { - PagedIterable inner = this.serviceClient().listSkus(groupName, serviceName); - return Utils.mapPage(inner, inner1 -> new AvailableServiceSkuImpl(inner1, this.manager())); - } - - public PagedIterable listSkus(String groupName, String serviceName, Context context) { - PagedIterable inner = this.serviceClient().listSkus(groupName, serviceName, context); - return Utils.mapPage(inner, inner1 -> new AvailableServiceSkuImpl(inner1, this.manager())); - } - - public NameAvailabilityResponse nestedCheckNameAvailability( - String groupName, String serviceName, NameAvailabilityRequest parameters) { - NameAvailabilityResponseInner inner = - this.serviceClient().nestedCheckNameAvailability(groupName, serviceName, parameters); - if (inner != null) { - return new NameAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response nestedCheckNameAvailabilityWithResponse( - String groupName, String serviceName, NameAvailabilityRequest parameters, Context context) { - Response inner = - this.serviceClient().nestedCheckNameAvailabilityWithResponse(groupName, serviceName, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new NameAvailabilityResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PagedIterable listByResourceGroup(String groupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(groupName); - return Utils.mapPage(inner, inner1 -> new DataMigrationServiceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String groupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(groupName, context); - return Utils.mapPage(inner, inner1 -> new DataMigrationServiceImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new DataMigrationServiceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new DataMigrationServiceImpl(inner1, this.manager())); - } - - public NameAvailabilityResponse checkNameAvailability(String location, NameAvailabilityRequest parameters) { - NameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(location, parameters); - if (inner != null) { - return new NameAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityRequest parameters, Context context) { - Response inner = - this.serviceClient().checkNameAvailabilityWithResponse(location, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new NameAvailabilityResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DataMigrationService getById(String id) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - return this.getByResourceGroupWithResponse(groupName, serviceName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - return this.getByResourceGroupWithResponse(groupName, serviceName, context); - } - - public void deleteById(String id) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - Boolean localDeleteRunningTasks = null; - this.delete(groupName, serviceName, localDeleteRunningTasks, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Boolean deleteRunningTasks, Context context) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - this.delete(groupName, serviceName, deleteRunningTasks, context); - } - - private ServicesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } - - public DataMigrationServiceImpl define(String name) { - return new DataMigrationServiceImpl(name, this.manager()); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/TasksClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/TasksClientImpl.java deleted file mode 100644 index 89cfc26d5db04..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/TasksClientImpl.java +++ /dev/null @@ -1,1513 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.TasksClient; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner; -import com.azure.resourcemanager.datamigration.models.TaskList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in TasksClient. */ -public final class TasksClientImpl implements TasksClient { - private final ClientLogger logger = new ClientLogger(TasksClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final TasksService service; - - /** The service client containing this operation class. */ - private final DataMigrationManagementClientImpl client; - - /** - * Initializes an instance of TasksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TasksClientImpl(DataMigrationManagementClientImpl client) { - this.service = RestProxy.create(TasksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DataMigrationManagementClientTasks to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DataMigrationManagem") - private interface TasksService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects/{projectName}/tasks") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @PathParam("projectName") String projectName, - @QueryParam("api-version") String apiVersion, - @QueryParam("taskType") String taskType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects/{projectName}/tasks/{taskName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @PathParam("projectName") String projectName, - @PathParam("taskName") String taskName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ProjectTaskInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects/{projectName}/tasks/{taskName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @PathParam("projectName") String projectName, - @PathParam("taskName") String taskName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$expand") String expand, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects/{projectName}/tasks/{taskName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @PathParam("projectName") String projectName, - @PathParam("taskName") String taskName, - @QueryParam("api-version") String apiVersion, - @QueryParam("deleteRunningTasks") Boolean deleteRunningTasks, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects/{projectName}/tasks/{taskName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @PathParam("projectName") String projectName, - @PathParam("taskName") String taskName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ProjectTaskInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services" - + "/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("groupName") String groupName, - @PathParam("serviceName") String serviceName, - @PathParam("projectName") String projectName, - @PathParam("taskName") String taskName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * The 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String groupName, String serviceName, String projectName, String taskType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - this.client.getApiVersion(), - taskType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String groupName, String serviceName, String projectName, String taskType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - this.client.getApiVersion(), - taskType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String groupName, String serviceName, String projectName, String taskType) { - return new PagedFlux<>( - () -> listSinglePageAsync(groupName, serviceName, projectName, taskType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String groupName, String serviceName, String projectName) { - final String taskType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(groupName, serviceName, projectName, taskType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String groupName, String serviceName, String projectName, String taskType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(groupName, serviceName, projectName, taskType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String groupName, String serviceName, String projectName) { - final String taskType = null; - return new PagedIterable<>(listAsync(groupName, serviceName, projectName, taskType)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String groupName, String serviceName, String projectName, String taskType, Context context) { - return new PagedIterable<>(listAsync(groupName, serviceName, projectName, taskType, context)); - } - - /** - * 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 existing 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (taskName == null) { - return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - taskName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 existing 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String groupName, - String serviceName, - String projectName, - String taskName, - ProjectTaskInner parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (taskName == null) { - return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - taskName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * 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 existing 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters) { - return createOrUpdateWithResponseAsync(groupName, serviceName, projectName, taskName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 existing 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectTaskInner createOrUpdate( - String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters) { - return createOrUpdateAsync(groupName, serviceName, projectName, taskName, parameters).block(); - } - - /** - * 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 existing 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String groupName, - String serviceName, - String projectName, - String taskName, - ProjectTaskInner parameters, - Context context) { - return createOrUpdateWithResponseAsync(groupName, serviceName, projectName, taskName, parameters, context) - .block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String groupName, String serviceName, String projectName, String taskName, String expand) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (taskName == null) { - return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - taskName, - this.client.getApiVersion(), - expand, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String groupName, String serviceName, String projectName, String taskName, String expand, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (taskName == null) { - return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - taskName, - this.client.getApiVersion(), - expand, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String groupName, String serviceName, String projectName, String taskName, String expand) { - return getWithResponseAsync(groupName, serviceName, projectName, taskName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String groupName, String serviceName, String projectName, String taskName) { - final String expand = null; - return getWithResponseAsync(groupName, serviceName, projectName, taskName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectTaskInner get(String groupName, String serviceName, String projectName, String taskName) { - final String expand = null; - return getAsync(groupName, serviceName, projectName, taskName, expand).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String groupName, String serviceName, String projectName, String taskName, String expand, Context context) { - return getWithResponseAsync(groupName, serviceName, projectName, taskName, expand, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String groupName, String serviceName, String projectName, String taskName, Boolean deleteRunningTasks) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (taskName == null) { - return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - taskName, - this.client.getApiVersion(), - deleteRunningTasks, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String groupName, - String serviceName, - String projectName, - String taskName, - Boolean deleteRunningTasks, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (taskName == null) { - return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - taskName, - this.client.getApiVersion(), - deleteRunningTasks, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String groupName, String serviceName, String projectName, String taskName, Boolean deleteRunningTasks) { - return deleteWithResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String groupName, String serviceName, String projectName, String taskName) { - final Boolean deleteRunningTasks = null; - return deleteWithResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String groupName, String serviceName, String projectName, String taskName) { - final Boolean deleteRunningTasks = null; - deleteAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String groupName, - String serviceName, - String projectName, - String taskName, - Boolean deleteRunningTasks, - Context context) { - return deleteWithResponseAsync(groupName, serviceName, projectName, taskName, deleteRunningTasks, context) - .block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (taskName == null) { - return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - taskName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String groupName, - String serviceName, - String projectName, - String taskName, - ProjectTaskInner parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (taskName == null) { - return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - taskName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters) { - return updateWithResponseAsync(groupName, serviceName, projectName, taskName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectTaskInner update( - String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters) { - return updateAsync(groupName, serviceName, projectName, taskName, parameters).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String groupName, - String serviceName, - String projectName, - String taskName, - ProjectTaskInner parameters, - Context context) { - return updateWithResponseAsync(groupName, serviceName, projectName, taskName, parameters, context).block(); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelWithResponseAsync( - String groupName, String serviceName, String projectName, String taskName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (taskName == null) { - return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .cancel( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - taskName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelWithResponseAsync( - String groupName, String serviceName, String projectName, String taskName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (projectName == null) { - return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); - } - if (taskName == null) { - return Mono.error(new IllegalArgumentException("Parameter taskName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .cancel( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - groupName, - serviceName, - projectName, - taskName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync( - String groupName, String serviceName, String projectName, String taskName) { - return cancelWithResponseAsync(groupName, serviceName, projectName, taskName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectTaskInner cancel(String groupName, String serviceName, String projectName, String taskName) { - return cancelAsync(groupName, serviceName, projectName, taskName).block(); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelWithResponse( - String groupName, String serviceName, String projectName, String taskName, Context context) { - return cancelWithResponseAsync(groupName, serviceName, projectName, taskName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/TasksImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/TasksImpl.java deleted file mode 100644 index 1159d74feedcc..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/TasksImpl.java +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.TasksClient; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner; -import com.azure.resourcemanager.datamigration.models.ProjectTask; -import com.azure.resourcemanager.datamigration.models.Tasks; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class TasksImpl implements Tasks { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TasksImpl.class); - - private final TasksClient innerClient; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - public TasksImpl( - TasksClient innerClient, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String groupName, String serviceName, String projectName) { - PagedIterable inner = this.serviceClient().list(groupName, serviceName, projectName); - return Utils.mapPage(inner, inner1 -> new ProjectTaskImpl(inner1, this.manager())); - } - - public PagedIterable list( - String groupName, String serviceName, String projectName, String taskType, Context context) { - PagedIterable inner = - this.serviceClient().list(groupName, serviceName, projectName, taskType, context); - return Utils.mapPage(inner, inner1 -> new ProjectTaskImpl(inner1, this.manager())); - } - - public ProjectTask get(String groupName, String serviceName, String projectName, String taskName) { - ProjectTaskInner inner = this.serviceClient().get(groupName, serviceName, projectName, taskName); - if (inner != null) { - return new ProjectTaskImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String groupName, String serviceName, String projectName, String taskName, String expand, Context context) { - Response inner = - this.serviceClient().getWithResponse(groupName, serviceName, projectName, taskName, expand, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ProjectTaskImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String groupName, String serviceName, String projectName, String taskName) { - this.serviceClient().delete(groupName, serviceName, projectName, taskName); - } - - public Response deleteWithResponse( - String groupName, - String serviceName, - String projectName, - String taskName, - Boolean deleteRunningTasks, - Context context) { - return this - .serviceClient() - .deleteWithResponse(groupName, serviceName, projectName, taskName, deleteRunningTasks, context); - } - - public ProjectTask cancel(String groupName, String serviceName, String projectName, String taskName) { - ProjectTaskInner inner = this.serviceClient().cancel(groupName, serviceName, projectName, taskName); - if (inner != null) { - return new ProjectTaskImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response cancelWithResponse( - String groupName, String serviceName, String projectName, String taskName, Context context) { - Response inner = - this.serviceClient().cancelWithResponse(groupName, serviceName, projectName, taskName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ProjectTaskImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ProjectTask getById(String id) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String projectName = Utils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String taskName = Utils.getValueFromIdByName(id, "tasks"); - if (taskName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); - } - String localExpand = null; - return this - .getWithResponse(groupName, serviceName, projectName, taskName, localExpand, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, String expand, Context context) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String projectName = Utils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String taskName = Utils.getValueFromIdByName(id, "tasks"); - if (taskName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); - } - return this.getWithResponse(groupName, serviceName, projectName, taskName, expand, context); - } - - public void deleteById(String id) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String projectName = Utils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String taskName = Utils.getValueFromIdByName(id, "tasks"); - if (taskName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); - } - Boolean localDeleteRunningTasks = null; - this - .deleteWithResponse(groupName, serviceName, projectName, taskName, localDeleteRunningTasks, Context.NONE) - .getValue(); - } - - public Response deleteByIdWithResponse(String id, Boolean deleteRunningTasks, Context context) { - String groupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (groupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String projectName = Utils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String taskName = Utils.getValueFromIdByName(id, "tasks"); - if (taskName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); - } - return this.deleteWithResponse(groupName, serviceName, projectName, taskName, deleteRunningTasks, context); - } - - private TasksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } - - public ProjectTaskImpl define(String name) { - return new ProjectTaskImpl(name, this.manager()); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/UsagesClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/UsagesClientImpl.java deleted file mode 100644 index 241d2b74ea5de..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/UsagesClientImpl.java +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.UsagesClient; -import com.azure.resourcemanager.datamigration.fluent.models.QuotaInner; -import com.azure.resourcemanager.datamigration.models.QuotaList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in UsagesClient. */ -public final class UsagesClientImpl implements UsagesClient { - private final ClientLogger logger = new ClientLogger(UsagesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final UsagesService service; - - /** The service client containing this operation class. */ - private final DataMigrationManagementClientImpl client; - - /** - * Initializes an instance of UsagesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - UsagesClientImpl(DataMigrationManagementClientImpl client) { - this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DataMigrationManagementClientUsages to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DataMigrationManagem") - private interface UsagesService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * This method returns region-specific quotas and resource usage information for the Database Migration Service. - * - * @param location The Azure region of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * This method returns region-specific quotas and resource usage information for the Database Migration Service. - * - * @param location The Azure region of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * 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 ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * This method returns region-specific quotas and resource usage information for the Database Migration Service. - * - * @param location The Azure region of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/UsagesImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/UsagesImpl.java deleted file mode 100644 index e81cd59996cb9..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/UsagesImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.UsagesClient; -import com.azure.resourcemanager.datamigration.fluent.models.QuotaInner; -import com.azure.resourcemanager.datamigration.models.Quota; -import com.azure.resourcemanager.datamigration.models.Usages; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class UsagesImpl implements Usages { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsagesImpl.class); - - private final UsagesClient innerClient; - - private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager; - - public UsagesImpl( - UsagesClient innerClient, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return Utils.mapPage(inner, inner1 -> new QuotaImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return Utils.mapPage(inner, inner1 -> new QuotaImpl(inner1, this.manager())); - } - - private UsagesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.datamigration.DataMigrationManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/Utils.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/Utils.java deleted file mode 100644 index 1d736a275d214..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/Utils.java +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class Utils { - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/package-info.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/package-info.java deleted file mode 100644 index e070291ec48ee..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the implementations for DataMigrationManagementClient. Data Migration Client. */ -package com.azure.resourcemanager.datamigration.implementation; diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AuthenticationType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AuthenticationType.java deleted file mode 100644 index c1adc8f422731..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AuthenticationType.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSku.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSku.java deleted file mode 100644 index ee7fa4c38bcb7..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSku.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.resourcemanager.datamigration.fluent.models.AvailableServiceSkuInner; - -/** An immutable client-side representation of AvailableServiceSku. */ -public interface AvailableServiceSku { - /** - * Gets the resourceType property: The resource type, including the provider namespace. - * - * @return the resourceType value. - */ - String resourceType(); - - /** - * Gets the sku property: SKU name, tier, etc. - * - * @return the sku value. - */ - AvailableServiceSkuAutoGenerated sku(); - - /** - * Gets the capacity property: A description of the scaling capacities of the SKU. - * - * @return the capacity value. - */ - AvailableServiceSkuCapacity capacity(); - - /** - * Gets the inner com.azure.resourcemanager.datamigration.fluent.models.AvailableServiceSkuInner object. - * - * @return the inner object. - */ - AvailableServiceSkuInner innerModel(); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSkuAutoGenerated.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSkuAutoGenerated.java deleted file mode 100644 index eee7d0547d2aa..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSkuAutoGenerated.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** SKU name, tier, etc. */ -@Fluent -public final class AvailableServiceSkuAutoGenerated { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableServiceSkuAutoGenerated.class); - - /* - * 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 property: The name of the SKU. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the SKU. - * - * @param name the name value to set. - * @return the AvailableServiceSkuAutoGenerated object itself. - */ - public AvailableServiceSkuAutoGenerated withName(String name) { - this.name = name; - return this; - } - - /** - * Get the family property: SKU family. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Set the family property: SKU family. - * - * @param family the family value to set. - * @return the AvailableServiceSkuAutoGenerated object itself. - */ - public AvailableServiceSkuAutoGenerated withFamily(String family) { - this.family = family; - return this; - } - - /** - * Get the size property: SKU size. - * - * @return the size value. - */ - public String size() { - return this.size; - } - - /** - * Set the size property: SKU size. - * - * @param size the size value to set. - * @return the AvailableServiceSkuAutoGenerated object itself. - */ - public AvailableServiceSkuAutoGenerated withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the tier property: 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 property: The tier of the SKU, such as "Free", "Basic", "Standard", or "Premium". - * - * @param tier the tier value to set. - * @return the AvailableServiceSkuAutoGenerated object itself. - */ - public AvailableServiceSkuAutoGenerated withTier(String tier) { - this.tier = tier; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSkuCapacity.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSkuCapacity.java deleted file mode 100644 index 01a8804f52aa4..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AvailableServiceSkuCapacity.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A description of the scaling capacities of the SKU. */ -@Fluent -public final class AvailableServiceSkuCapacity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableServiceSkuCapacity.class); - - /* - * 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 - */ - @JsonProperty(value = "scaleType") - private ServiceScalability scaleType; - - /** - * Get the minimum property: The minimum capacity, usually 0 or 1. - * - * @return the minimum value. - */ - public Integer minimum() { - return this.minimum; - } - - /** - * Set the minimum property: 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 property: The maximum capacity. - * - * @return the maximum value. - */ - public Integer maximum() { - return this.maximum; - } - - /** - * Set the maximum property: 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 defaultProperty property: The default capacity. - * - * @return the defaultProperty value. - */ - public Integer defaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty property: 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 scaleType property: The scalability approach. - * - * @return the scaleType value. - */ - public ServiceScalability scaleType() { - return this.scaleType; - } - - /** - * Set the scaleType property: The scalability approach. - * - * @param scaleType the scaleType value to set. - * @return the AvailableServiceSkuCapacity object itself. - */ - public AvailableServiceSkuCapacity withScaleType(ServiceScalability scaleType) { - this.scaleType = scaleType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AzureActiveDirectoryApp.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AzureActiveDirectoryApp.java deleted file mode 100644 index 970016812bc60..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/AzureActiveDirectoryApp.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Active Directory Application. */ -@Fluent -public final class AzureActiveDirectoryApp { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureActiveDirectoryApp.class); - - /* - * Application ID of the Azure Active Directory Application - */ - @JsonProperty(value = "applicationId", required = true) - private String applicationId; - - /* - * Key used to authenticate to the Azure Active Directory Application - */ - @JsonProperty(value = "appKey", required = true) - private String appKey; - - /* - * Tenant id of the customer - */ - @JsonProperty(value = "tenantId", required = true) - private String tenantId; - - /** - * Get the applicationId property: Application ID of the Azure Active Directory Application. - * - * @return the applicationId value. - */ - public String applicationId() { - return this.applicationId; - } - - /** - * Set the applicationId property: Application ID of the Azure Active Directory Application. - * - * @param applicationId the applicationId value to set. - * @return the AzureActiveDirectoryApp object itself. - */ - public AzureActiveDirectoryApp withApplicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * Get the appKey property: Key used to authenticate to the Azure Active Directory Application. - * - * @return the appKey value. - */ - public String appKey() { - return this.appKey; - } - - /** - * Set the appKey property: Key used to authenticate to the Azure Active Directory Application. - * - * @param appKey the appKey value to set. - * @return the AzureActiveDirectoryApp object itself. - */ - public AzureActiveDirectoryApp withAppKey(String appKey) { - this.appKey = appKey; - return this; - } - - /** - * Get the tenantId property: Tenant id of the customer. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: Tenant id of the customer. - * - * @param tenantId the tenantId value to set. - * @return the AzureActiveDirectoryApp object itself. - */ - public AzureActiveDirectoryApp withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (applicationId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property applicationId in model AzureActiveDirectoryApp")); - } - if (appKey() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property appKey in model AzureActiveDirectoryApp")); - } - if (tenantId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property tenantId in model AzureActiveDirectoryApp")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupFileInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupFileInfo.java deleted file mode 100644 index 5b2de5f3054f4..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupFileInfo.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Information of the backup file. */ -@Fluent -public final class BackupFileInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupFileInfo.class); - - /* - * Location of the backup file in shared folder - */ - @JsonProperty(value = "fileLocation") - private String fileLocation; - - /* - * Sequence number of the backup file in the backup set - */ - @JsonProperty(value = "familySequenceNumber") - private Integer familySequenceNumber; - - /* - * Status of the backup file during migration - */ - @JsonProperty(value = "status") - private BackupFileStatus status; - - /** - * Get the fileLocation property: Location of the backup file in shared folder. - * - * @return the fileLocation value. - */ - public String fileLocation() { - return this.fileLocation; - } - - /** - * Set the fileLocation property: Location of the backup file in shared folder. - * - * @param fileLocation the fileLocation value to set. - * @return the BackupFileInfo object itself. - */ - public BackupFileInfo withFileLocation(String fileLocation) { - this.fileLocation = fileLocation; - return this; - } - - /** - * Get the familySequenceNumber property: Sequence number of the backup file in the backup set. - * - * @return the familySequenceNumber value. - */ - public Integer familySequenceNumber() { - return this.familySequenceNumber; - } - - /** - * Set the familySequenceNumber property: Sequence number of the backup file in the backup set. - * - * @param familySequenceNumber the familySequenceNumber value to set. - * @return the BackupFileInfo object itself. - */ - public BackupFileInfo withFamilySequenceNumber(Integer familySequenceNumber) { - this.familySequenceNumber = familySequenceNumber; - return this; - } - - /** - * Get the status property: Status of the backup file during migration. - * - * @return the status value. - */ - public BackupFileStatus status() { - return this.status; - } - - /** - * Set the status property: Status of the backup file during migration. - * - * @param status the status value to set. - * @return the BackupFileInfo object itself. - */ - public BackupFileInfo withStatus(BackupFileStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupFileStatus.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupFileStatus.java deleted file mode 100644 index 0c7657a13a96f..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupFileStatus.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for BackupFileStatus. */ -public final class BackupFileStatus extends ExpandableStringEnum { - /** Static value Arrived for BackupFileStatus. */ - public static final BackupFileStatus ARRIVED = fromString("Arrived"); - - /** Static value Queued for BackupFileStatus. */ - public static final BackupFileStatus QUEUED = fromString("Queued"); - - /** Static value Uploading for BackupFileStatus. */ - public static final BackupFileStatus UPLOADING = fromString("Uploading"); - - /** Static value Uploaded for BackupFileStatus. */ - public static final BackupFileStatus UPLOADED = fromString("Uploaded"); - - /** Static value Restoring for BackupFileStatus. */ - public static final BackupFileStatus RESTORING = fromString("Restoring"); - - /** Static value Restored for BackupFileStatus. */ - public static final BackupFileStatus RESTORED = fromString("Restored"); - - /** Static value Cancelled for BackupFileStatus. */ - public static final BackupFileStatus CANCELLED = fromString("Cancelled"); - - /** - * Creates or finds a BackupFileStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding BackupFileStatus. - */ - @JsonCreator - public static BackupFileStatus fromString(String name) { - return fromString(name, BackupFileStatus.class); - } - - /** @return known BackupFileStatus values. */ - public static Collection values() { - return values(BackupFileStatus.class); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupMode.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupMode.java deleted file mode 100644 index d5238c7db355b..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupMode.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupSetInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupSetInfo.java deleted file mode 100644 index 3d9528611ff58..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupSetInfo.java +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Information of backup set. */ -@Fluent -public final class BackupSetInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupSetInfo.class); - - /* - * Id for the set of backup files - */ - @JsonProperty(value = "backupSetId") - private String backupSetId; - - /* - * First log sequence number of the backup file - */ - @JsonProperty(value = "firstLsn") - private String firstLsn; - - /* - * Last log sequence number of the backup file - */ - @JsonProperty(value = "lastLsn") - private String lastLsn; - - /* - * Last modified time of the backup file in share location - */ - @JsonProperty(value = "lastModifiedTime") - private OffsetDateTime lastModifiedTime; - - /* - * Enum of the different backup types - */ - @JsonProperty(value = "backupType") - private BackupType backupType; - - /* - * List of files in the backup set - */ - @JsonProperty(value = "listOfBackupFiles") - private List listOfBackupFiles; - - /* - * Name of the database to which the backup set belongs - */ - @JsonProperty(value = "databaseName") - private String databaseName; - - /* - * Date and time that the backup operation began - */ - @JsonProperty(value = "backupStartDate") - private OffsetDateTime backupStartDate; - - /* - * Date and time that the backup operation finished - */ - @JsonProperty(value = "backupFinishedDate") - private OffsetDateTime backupFinishedDate; - - /* - * Whether the backup set is restored or not - */ - @JsonProperty(value = "isBackupRestored") - private Boolean isBackupRestored; - - /** - * Get the backupSetId property: Id for the set of backup files. - * - * @return the backupSetId value. - */ - public String backupSetId() { - return this.backupSetId; - } - - /** - * Set the backupSetId property: Id for the set of backup files. - * - * @param backupSetId the backupSetId value to set. - * @return the BackupSetInfo object itself. - */ - public BackupSetInfo withBackupSetId(String backupSetId) { - this.backupSetId = backupSetId; - return this; - } - - /** - * Get the firstLsn property: First log sequence number of the backup file. - * - * @return the firstLsn value. - */ - public String firstLsn() { - return this.firstLsn; - } - - /** - * Set the firstLsn property: First log sequence number of the backup file. - * - * @param firstLsn the firstLsn value to set. - * @return the BackupSetInfo object itself. - */ - public BackupSetInfo withFirstLsn(String firstLsn) { - this.firstLsn = firstLsn; - return this; - } - - /** - * Get the lastLsn property: Last log sequence number of the backup file. - * - * @return the lastLsn value. - */ - public String lastLsn() { - return this.lastLsn; - } - - /** - * Set the lastLsn property: Last log sequence number of the backup file. - * - * @param lastLsn the lastLsn value to set. - * @return the BackupSetInfo object itself. - */ - public BackupSetInfo withLastLsn(String lastLsn) { - this.lastLsn = lastLsn; - return this; - } - - /** - * Get the lastModifiedTime property: Last modified time of the backup file in share location. - * - * @return the lastModifiedTime value. - */ - public OffsetDateTime lastModifiedTime() { - return this.lastModifiedTime; - } - - /** - * Set the lastModifiedTime property: Last modified time of the backup file in share location. - * - * @param lastModifiedTime the lastModifiedTime value to set. - * @return the BackupSetInfo object itself. - */ - public BackupSetInfo withLastModifiedTime(OffsetDateTime lastModifiedTime) { - this.lastModifiedTime = lastModifiedTime; - return this; - } - - /** - * Get the backupType property: Enum of the different backup types. - * - * @return the backupType value. - */ - public BackupType backupType() { - return this.backupType; - } - - /** - * Set the backupType property: Enum of the different backup types. - * - * @param backupType the backupType value to set. - * @return the BackupSetInfo object itself. - */ - public BackupSetInfo withBackupType(BackupType backupType) { - this.backupType = backupType; - return this; - } - - /** - * Get the listOfBackupFiles property: List of files in the backup set. - * - * @return the listOfBackupFiles value. - */ - public List listOfBackupFiles() { - return this.listOfBackupFiles; - } - - /** - * Set the listOfBackupFiles property: List of files in the backup set. - * - * @param listOfBackupFiles the listOfBackupFiles value to set. - * @return the BackupSetInfo object itself. - */ - public BackupSetInfo withListOfBackupFiles(List listOfBackupFiles) { - this.listOfBackupFiles = listOfBackupFiles; - return this; - } - - /** - * Get the databaseName property: Name of the database to which the backup set belongs. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Set the databaseName property: Name of the database to which the backup set belongs. - * - * @param databaseName the databaseName value to set. - * @return the BackupSetInfo object itself. - */ - public BackupSetInfo withDatabaseName(String databaseName) { - this.databaseName = databaseName; - return this; - } - - /** - * Get the backupStartDate property: Date and time that the backup operation began. - * - * @return the backupStartDate value. - */ - public OffsetDateTime backupStartDate() { - return this.backupStartDate; - } - - /** - * Set the backupStartDate property: Date and time that the backup operation began. - * - * @param backupStartDate the backupStartDate value to set. - * @return the BackupSetInfo object itself. - */ - public BackupSetInfo withBackupStartDate(OffsetDateTime backupStartDate) { - this.backupStartDate = backupStartDate; - return this; - } - - /** - * Get the backupFinishedDate property: Date and time that the backup operation finished. - * - * @return the backupFinishedDate value. - */ - public OffsetDateTime backupFinishedDate() { - return this.backupFinishedDate; - } - - /** - * Set the backupFinishedDate property: Date and time that the backup operation finished. - * - * @param backupFinishedDate the backupFinishedDate value to set. - * @return the BackupSetInfo object itself. - */ - public BackupSetInfo withBackupFinishedDate(OffsetDateTime backupFinishedDate) { - this.backupFinishedDate = backupFinishedDate; - return this; - } - - /** - * Get the isBackupRestored property: Whether the backup set is restored or not. - * - * @return the isBackupRestored value. - */ - public Boolean isBackupRestored() { - return this.isBackupRestored; - } - - /** - * Set the isBackupRestored property: Whether the backup set is restored or not. - * - * @param isBackupRestored the isBackupRestored value to set. - * @return the BackupSetInfo object itself. - */ - public BackupSetInfo withIsBackupRestored(Boolean isBackupRestored) { - this.isBackupRestored = isBackupRestored; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (listOfBackupFiles() != null) { - listOfBackupFiles().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupType.java deleted file mode 100644 index bd09bd026e864..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BackupType.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BlobShare.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BlobShare.java deleted file mode 100644 index 27bdabe45418c..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/BlobShare.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Blob container storage information. */ -@Fluent -public final class BlobShare { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BlobShare.class); - - /* - * SAS URI of Azure Storage Account Container. - */ - @JsonProperty(value = "sasUri", required = true) - private String sasUri; - - /** - * Get the sasUri property: SAS URI of Azure Storage Account Container. - * - * @return the sasUri value. - */ - public String sasUri() { - return this.sasUri; - } - - /** - * Set the sasUri property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sasUri() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property sasUri in model BlobShare")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/CommandProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/CommandProperties.java deleted file mode 100644 index 4a0f9cb1173b3..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/CommandProperties.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * Base class for all types of DMS command properties. If command is not supported by current client, this object is - * returned. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "commandType", - defaultImpl = CommandProperties.class) -@JsonTypeName("CommandProperties") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class), - @JsonSubTypes.Type( - name = "Migrate.SqlServer.AzureDbSqlMi.Complete", - value = MigrateMISyncCompleteCommandProperties.class) -}) -@Immutable -public class CommandProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommandProperties.class); - - /* - * Array of errors. This is ignored if submitted. - */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) - private List errors; - - /* - * The state of the command. This is ignored if submitted. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private CommandState state; - - /** - * Get the errors property: Array of errors. This is ignored if submitted. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the state property: The state of the command. This is ignored if submitted. - * - * @return the state value. - */ - public CommandState state() { - return this.state; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/CommandState.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/CommandState.java deleted file mode 100644 index e79ff8492d1f1..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/CommandState.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceMySqlTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceMySqlTaskInput.java deleted file mode 100644 index 9d009553ce8c3..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceMySqlTaskInput.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input for the task that validates MySQL database connection. */ -@Fluent -public final class ConnectToSourceMySqlTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourceMySqlTaskInput.class); - - /* - * Information for connecting to MySQL source - */ - @JsonProperty(value = "sourceConnectionInfo", required = true) - private MySqlConnectionInfo sourceConnectionInfo; - - /* - * Target Platform for the migration - */ - @JsonProperty(value = "targetPlatform") - private MySqlTargetPlatformType targetPlatform; - - /* - * Permission group for validations - */ - @JsonProperty(value = "checkPermissionsGroup") - private ServerLevelPermissionsGroup checkPermissionsGroup; - - /** - * Get the sourceConnectionInfo property: Information for connecting to MySQL source. - * - * @return the sourceConnectionInfo value. - */ - public MySqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: 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 the targetPlatform property: Target Platform for the migration. - * - * @return the targetPlatform value. - */ - public MySqlTargetPlatformType targetPlatform() { - return this.targetPlatform; - } - - /** - * Set the targetPlatform property: Target Platform for the migration. - * - * @param targetPlatform the targetPlatform value to set. - * @return the ConnectToSourceMySqlTaskInput object itself. - */ - public ConnectToSourceMySqlTaskInput withTargetPlatform(MySqlTargetPlatformType targetPlatform) { - this.targetPlatform = targetPlatform; - return this; - } - - /** - * Get the checkPermissionsGroup property: Permission group for validations. - * - * @return the checkPermissionsGroup value. - */ - public ServerLevelPermissionsGroup checkPermissionsGroup() { - return this.checkPermissionsGroup; - } - - /** - * Set the checkPermissionsGroup property: Permission group for validations. - * - * @param checkPermissionsGroup the checkPermissionsGroup value to set. - * @return the ConnectToSourceMySqlTaskInput object itself. - */ - public ConnectToSourceMySqlTaskInput withCheckPermissionsGroup(ServerLevelPermissionsGroup checkPermissionsGroup) { - this.checkPermissionsGroup = checkPermissionsGroup; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model ConnectToSourceMySqlTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceMySqlTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceMySqlTaskProperties.java deleted file mode 100644 index 3015508445bef..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceMySqlTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Properties for the task that validates MySQL database connection. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("ConnectToSource.MySql") -@Fluent -public final class ConnectToSourceMySqlTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourceMySqlTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public ConnectToSourceMySqlTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceNonSqlTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceNonSqlTaskOutput.java deleted file mode 100644 index e75fe47165a21..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceNonSqlTaskOutput.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for connect to Oracle, MySQL type source. */ -@Immutable -public final class ConnectToSourceNonSqlTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourceNonSqlTaskOutput.class); - - /* - * 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 the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the sourceServerBrandVersion property: Server brand version. - * - * @return the sourceServerBrandVersion value. - */ - public String sourceServerBrandVersion() { - return this.sourceServerBrandVersion; - } - - /** - * Get the serverProperties property: Server properties. - * - * @return the serverProperties value. - */ - public ServerProperties serverProperties() { - return this.serverProperties; - } - - /** - * Get the databases property: List of databases on the server. - * - * @return the databases value. - */ - public List databases() { - return this.databases; - } - - /** - * Get the validationErrors property: Validation errors associated with the task. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serverProperties() != null) { - serverProperties().validate(); - } - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskInput.java deleted file mode 100644 index befd7224866c6..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskInput.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input for the task that validates connection to PostgreSQL and source server requirements. */ -@Fluent -public final class ConnectToSourcePostgreSqlSyncTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourcePostgreSqlSyncTaskInput.class); - - /* - * Connection information for source PostgreSQL server - */ - @JsonProperty(value = "sourceConnectionInfo", required = true) - private PostgreSqlConnectionInfo sourceConnectionInfo; - - /** - * Get the sourceConnectionInfo property: Connection information for source PostgreSQL server. - * - * @return the sourceConnectionInfo value. - */ - public PostgreSqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: Connection information for source PostgreSQL server. - * - * @param sourceConnectionInfo the sourceConnectionInfo value to set. - * @return the ConnectToSourcePostgreSqlSyncTaskInput object itself. - */ - public ConnectToSourcePostgreSqlSyncTaskInput withSourceConnectionInfo( - PostgreSqlConnectionInfo sourceConnectionInfo) { - this.sourceConnectionInfo = sourceConnectionInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model" - + " ConnectToSourcePostgreSqlSyncTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskOutput.java deleted file mode 100644 index 75563d8e5ee8e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskOutput.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for the task that validates connection to PostgreSQL and source server requirements. */ -@Immutable -public final class ConnectToSourcePostgreSqlSyncTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourcePostgreSqlSyncTaskOutput.class); - - /* - * Result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Version of the source server - */ - @JsonProperty(value = "sourceServerVersion", access = JsonProperty.Access.WRITE_ONLY) - private String sourceServerVersion; - - /* - * List of databases on source server - */ - @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) - private List databases; - - /* - * Source server brand version - */ - @JsonProperty(value = "sourceServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) - private String sourceServerBrandVersion; - - /* - * Validation errors associated with the task - */ - @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) - private List validationErrors; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the sourceServerVersion property: Version of the source server. - * - * @return the sourceServerVersion value. - */ - public String sourceServerVersion() { - return this.sourceServerVersion; - } - - /** - * Get the databases property: List of databases on source server. - * - * @return the databases value. - */ - public List databases() { - return this.databases; - } - - /** - * Get the sourceServerBrandVersion property: Source server brand version. - * - * @return the sourceServerBrandVersion value. - */ - public String sourceServerBrandVersion() { - return this.sourceServerBrandVersion; - } - - /** - * Get the validationErrors property: Validation errors associated with the task. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskProperties.java deleted file mode 100644 index b200fd27428c9..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourcePostgreSqlSyncTaskProperties.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * Properties for the task that validates connection to PostgreSQL server and source server requirements for online - * migration. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("ConnectToSource.PostgreSql.Sync") -@Fluent -public final class ConnectToSourcePostgreSqlSyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourcePostgreSqlSyncTaskProperties.class); - - /* - * Task input - */ - @JsonProperty(value = "input") - private ConnectToSourcePostgreSqlSyncTaskInput input; - - /* - * Task output. This is ignored if submitted. - */ - @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) - private List output; - - /** - * Get the input property: Task input. - * - * @return the input value. - */ - public ConnectToSourcePostgreSqlSyncTaskInput input() { - return this.input; - } - - /** - * Set the input property: Task input. - * - * @param input the input value to set. - * @return the ConnectToSourcePostgreSqlSyncTaskProperties object itself. - */ - public ConnectToSourcePostgreSqlSyncTaskProperties withInput(ConnectToSourcePostgreSqlSyncTaskInput input) { - this.input = input; - return this; - } - - /** - * Get the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerSyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerSyncTaskProperties.java deleted file mode 100644 index 5d2f77fcc328a..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerSyncTaskProperties.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * 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") -@Fluent -public final class ConnectToSourceSqlServerSyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourceSqlServerSyncTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public ConnectToSourceSqlServerTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskInput.java deleted file mode 100644 index b4f01feebc644..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskInput.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input for the task that validates connection to SQL Server and also validates source server requirements. */ -@Fluent -public final class ConnectToSourceSqlServerTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourceSqlServerTaskInput.class); - - /* - * Connection information for Source SQL Server - */ - @JsonProperty(value = "sourceConnectionInfo", required = true) - private SqlConnectionInfo sourceConnectionInfo; - - /* - * Permission group for validations - */ - @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 the sourceConnectionInfo property: Connection information for Source SQL Server. - * - * @return the sourceConnectionInfo value. - */ - public SqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: 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 the checkPermissionsGroup property: Permission group for validations. - * - * @return the checkPermissionsGroup value. - */ - public ServerLevelPermissionsGroup checkPermissionsGroup() { - return this.checkPermissionsGroup; - } - - /** - * Set the checkPermissionsGroup property: Permission group for validations. - * - * @param checkPermissionsGroup the checkPermissionsGroup value to set. - * @return the ConnectToSourceSqlServerTaskInput object itself. - */ - public ConnectToSourceSqlServerTaskInput withCheckPermissionsGroup( - ServerLevelPermissionsGroup checkPermissionsGroup) { - this.checkPermissionsGroup = checkPermissionsGroup; - return this; - } - - /** - * Get the collectLogins property: Flag for whether to collect logins from source server. - * - * @return the collectLogins value. - */ - public Boolean collectLogins() { - return this.collectLogins; - } - - /** - * Set the collectLogins property: 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 the collectAgentJobs property: Flag for whether to collect agent jobs from source server. - * - * @return the collectAgentJobs value. - */ - public Boolean collectAgentJobs() { - return this.collectAgentJobs; - } - - /** - * Set the collectAgentJobs property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model ConnectToSourceSqlServerTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutput.java deleted file mode 100644 index 466f14ce46e7f..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutput.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** 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", - defaultImpl = ConnectToSourceSqlServerTaskOutput.class) -@JsonTypeName("ConnectToSourceSqlServerTaskOutput") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "TaskLevelOutput", value = ConnectToSourceSqlServerTaskOutputTaskLevel.class), - @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = ConnectToSourceSqlServerTaskOutputDatabaseLevel.class), - @JsonSubTypes.Type(name = "LoginLevelOutput", value = ConnectToSourceSqlServerTaskOutputLoginLevel.class), - @JsonSubTypes.Type(name = "AgentJobLevelOutput", value = ConnectToSourceSqlServerTaskOutputAgentJobLevel.class) -}) -@Immutable -public class ConnectToSourceSqlServerTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourceSqlServerTaskOutput.class); - - /* - * Result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java deleted file mode 100644 index d4522ca467e69..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputAgentJobLevel.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** - * 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") -@Immutable -public final class ConnectToSourceSqlServerTaskOutputAgentJobLevel extends ConnectToSourceSqlServerTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ConnectToSourceSqlServerTaskOutputAgentJobLevel.class); - - /* - * 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 OffsetDateTime lastExecutedOn; - - /* - * Information about eligibility of agent job for migration. - */ - @JsonProperty(value = "migrationEligibility", access = JsonProperty.Access.WRITE_ONLY) - private MigrationEligibilityInfo migrationEligibility; - - /** - * Get the name property: AgentJob name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the jobCategory property: The type of AgentJob. - * - * @return the jobCategory value. - */ - public String jobCategory() { - return this.jobCategory; - } - - /** - * Get the isEnabled property: The state of the original AgentJob. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * Get the jobOwner property: The owner of the AgentJob. - * - * @return the jobOwner value. - */ - public String jobOwner() { - return this.jobOwner; - } - - /** - * Get the lastExecutedOn property: UTC Date and time when the AgentJob was last executed. - * - * @return the lastExecutedOn value. - */ - public OffsetDateTime lastExecutedOn() { - return this.lastExecutedOn; - } - - /** - * Get the migrationEligibility property: Information about eligibility of agent job for migration. - * - * @return the migrationEligibility value. - */ - public MigrationEligibilityInfo migrationEligibility() { - return this.migrationEligibility; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (migrationEligibility() != null) { - migrationEligibility().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java deleted file mode 100644 index 34d9ef83e763f..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputDatabaseLevel.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * 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") -@Immutable -public final class ConnectToSourceSqlServerTaskOutputDatabaseLevel extends ConnectToSourceSqlServerTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ConnectToSourceSqlServerTaskOutputDatabaseLevel.class); - - /* - * 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 - */ - @JsonProperty(value = "compatibilityLevel", access = JsonProperty.Access.WRITE_ONLY) - private DatabaseCompatLevel compatibilityLevel; - - /* - * State of the database - */ - @JsonProperty(value = "databaseState", access = JsonProperty.Access.WRITE_ONLY) - private DatabaseState databaseState; - - /** - * Get the name property: Database name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the sizeMB property: Size of the file in megabytes. - * - * @return the sizeMB value. - */ - public Double sizeMB() { - return this.sizeMB; - } - - /** - * Get the databaseFiles property: The list of database files. - * - * @return the databaseFiles value. - */ - public List databaseFiles() { - return this.databaseFiles; - } - - /** - * Get the compatibilityLevel property: SQL Server compatibility level of database. - * - * @return the compatibilityLevel value. - */ - public DatabaseCompatLevel compatibilityLevel() { - return this.compatibilityLevel; - } - - /** - * Get the databaseState property: State of the database. - * - * @return the databaseState value. - */ - public DatabaseState databaseState() { - return this.databaseState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (databaseFiles() != null) { - databaseFiles().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputLoginLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputLoginLevel.java deleted file mode 100644 index cad556c42c9eb..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputLoginLevel.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -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") -@Immutable -public final class ConnectToSourceSqlServerTaskOutputLoginLevel extends ConnectToSourceSqlServerTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ConnectToSourceSqlServerTaskOutputLoginLevel.class); - - /* - * Login name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The type of login. - */ - @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 eligibility of login for migration. - */ - @JsonProperty(value = "migrationEligibility", access = JsonProperty.Access.WRITE_ONLY) - private MigrationEligibilityInfo migrationEligibility; - - /** - * Get the name property: Login name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the loginType property: The type of login. - * - * @return the loginType value. - */ - public LoginType loginType() { - return this.loginType; - } - - /** - * Get the defaultDatabase property: The default database for the login. - * - * @return the defaultDatabase value. - */ - public String defaultDatabase() { - return this.defaultDatabase; - } - - /** - * Get the isEnabled property: The state of the login. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * Get the migrationEligibility property: Information about eligibility of login for migration. - * - * @return the migrationEligibility value. - */ - public MigrationEligibilityInfo migrationEligibility() { - return this.migrationEligibility; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (migrationEligibility() != null) { - migrationEligibility().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputTaskLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputTaskLevel.java deleted file mode 100644 index 6d0a589c4cc1a..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskOutputTaskLevel.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * 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") -@Immutable -public final class ConnectToSourceSqlServerTaskOutputTaskLevel extends ConnectToSourceSqlServerTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourceSqlServerTaskOutputTaskLevel.class); - - /* - * Source databases as a map from database name to database id - */ - @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) - private String databases; - - /* - * Source logins as a map from login name to login id. - */ - @JsonProperty(value = "logins", access = JsonProperty.Access.WRITE_ONLY) - private String logins; - - /* - * Source agent jobs as a map from agent job name to id. - */ - @JsonProperty(value = "agentJobs", access = JsonProperty.Access.WRITE_ONLY) - private String 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 the databases property: Source databases as a map from database name to database id. - * - * @return the databases value. - */ - public String databases() { - return this.databases; - } - - /** - * Get the logins property: Source logins as a map from login name to login id. - * - * @return the logins value. - */ - public String logins() { - return this.logins; - } - - /** - * Get the agentJobs property: Source agent jobs as a map from agent job name to id. - * - * @return the agentJobs value. - */ - public String agentJobs() { - return this.agentJobs; - } - - /** - * Get the sourceServerVersion property: Source server version. - * - * @return the sourceServerVersion value. - */ - public String sourceServerVersion() { - return this.sourceServerVersion; - } - - /** - * Get the sourceServerBrandVersion property: Source server brand version. - * - * @return the sourceServerBrandVersion value. - */ - public String sourceServerBrandVersion() { - return this.sourceServerBrandVersion; - } - - /** - * Get the validationErrors property: Validation errors. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskProperties.java deleted file mode 100644 index 1706d70b10989..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToSourceSqlServerTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class ConnectToSourceSqlServerTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToSourceSqlServerTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public ConnectToSourceSqlServerTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskInput.java deleted file mode 100644 index 2ce171f1e2ca9..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskInput.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input for the task that validates connection to Azure Database for MySQL and target server requirements. */ -@Fluent -public final class ConnectToTargetAzureDbForMySqlTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetAzureDbForMySqlTaskInput.class); - - /* - * 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 the sourceConnectionInfo property: Connection information for source MySQL server. - * - * @return the sourceConnectionInfo value. - */ - public MySqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: 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 the targetConnectionInfo property: Connection information for target Azure Database for MySQL server. - * - * @return the targetConnectionInfo value. - */ - public MySqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model" - + " ConnectToTargetAzureDbForMySqlTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model" - + " ConnectToTargetAzureDbForMySqlTaskInput")); - } else { - targetConnectionInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskOutput.java deleted file mode 100644 index 07ddbedeeafa4..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskOutput.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for the task that validates connection to Azure Database for MySQL and target server requirements. */ -@Immutable -public final class ConnectToTargetAzureDbForMySqlTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetAzureDbForMySqlTaskOutput.class); - - /* - * 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 the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the serverVersion property: Version of the target server. - * - * @return the serverVersion value. - */ - public String serverVersion() { - return this.serverVersion; - } - - /** - * Get the databases property: List of databases on target server. - * - * @return the databases value. - */ - public List databases() { - return this.databases; - } - - /** - * Get the targetServerBrandVersion property: Target server brand version. - * - * @return the targetServerBrandVersion value. - */ - public String targetServerBrandVersion() { - return this.targetServerBrandVersion; - } - - /** - * Get the validationErrors property: Validation errors associated with the task. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskProperties.java deleted file mode 100644 index 26cd9fea13f88..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForMySqlTaskProperties.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class ConnectToTargetAzureDbForMySqlTaskProperties extends ProjectTaskProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ConnectToTargetAzureDbForMySqlTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public ConnectToTargetAzureDbForMySqlTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskInput.java deleted file mode 100644 index 9cf8c3daf4a7f..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskInput.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input for the task that validates connection to Azure Database for PostgreSQL and target server requirements. */ -@Fluent -public final class ConnectToTargetAzureDbForPostgreSqlSyncTaskInput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ConnectToTargetAzureDbForPostgreSqlSyncTaskInput.class); - - /* - * Connection information for source PostgreSQL server - */ - @JsonProperty(value = "sourceConnectionInfo", required = true) - private PostgreSqlConnectionInfo sourceConnectionInfo; - - /* - * Connection information for target Azure Database for PostgreSQL server - */ - @JsonProperty(value = "targetConnectionInfo", required = true) - private PostgreSqlConnectionInfo targetConnectionInfo; - - /** - * Get the sourceConnectionInfo property: Connection information for source PostgreSQL server. - * - * @return the sourceConnectionInfo value. - */ - public PostgreSqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: Connection information for source PostgreSQL server. - * - * @param sourceConnectionInfo the sourceConnectionInfo value to set. - * @return the ConnectToTargetAzureDbForPostgreSqlSyncTaskInput object itself. - */ - public ConnectToTargetAzureDbForPostgreSqlSyncTaskInput withSourceConnectionInfo( - PostgreSqlConnectionInfo sourceConnectionInfo) { - this.sourceConnectionInfo = sourceConnectionInfo; - return this; - } - - /** - * Get the targetConnectionInfo property: Connection information for target Azure Database for PostgreSQL server. - * - * @return the targetConnectionInfo value. - */ - public PostgreSqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: Connection information for target Azure Database for PostgreSQL server. - * - * @param targetConnectionInfo the targetConnectionInfo value to set. - * @return the ConnectToTargetAzureDbForPostgreSqlSyncTaskInput object itself. - */ - public ConnectToTargetAzureDbForPostgreSqlSyncTaskInput withTargetConnectionInfo( - PostgreSqlConnectionInfo targetConnectionInfo) { - this.targetConnectionInfo = targetConnectionInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model" - + " ConnectToTargetAzureDbForPostgreSqlSyncTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model" - + " ConnectToTargetAzureDbForPostgreSqlSyncTaskInput")); - } else { - targetConnectionInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput.java deleted file mode 100644 index 86cd66fb3e941..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for the task that validates connection to Azure Database for PostgreSQL and target server requirements. */ -@Immutable -public final class ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput.class); - - /* - * Result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Version of the target server - */ - @JsonProperty(value = "targetServerVersion", access = JsonProperty.Access.WRITE_ONLY) - private String targetServerVersion; - - /* - * List of databases on target server - */ - @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) - private List databases; - - /* - * Target server brand version - */ - @JsonProperty(value = "targetServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) - private String targetServerBrandVersion; - - /* - * Validation errors associated with the task - */ - @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) - private List validationErrors; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the targetServerVersion property: Version of the target server. - * - * @return the targetServerVersion value. - */ - public String targetServerVersion() { - return this.targetServerVersion; - } - - /** - * Get the databases property: List of databases on target server. - * - * @return the databases value. - */ - public List databases() { - return this.databases; - } - - /** - * Get the targetServerBrandVersion property: Target server brand version. - * - * @return the targetServerBrandVersion value. - */ - public String targetServerBrandVersion() { - return this.targetServerBrandVersion; - } - - /** - * Get the validationErrors property: Validation errors associated with the task. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java deleted file mode 100644 index 3964143ddf8b1..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * Properties for the task that validates connection to Azure Database For PostgreSQL server and target server - * requirements for online migration. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("ConnectToTarget.AzureDbForPostgreSql.Sync") -@Fluent -public final class ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.class); - - /* - * Task input - */ - @JsonProperty(value = "input") - private ConnectToTargetAzureDbForPostgreSqlSyncTaskInput input; - - /* - * Task output. This is ignored if submitted. - */ - @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) - private List output; - - /** - * Get the input property: Task input. - * - * @return the input value. - */ - public ConnectToTargetAzureDbForPostgreSqlSyncTaskInput input() { - return this.input; - } - - /** - * Set the input property: Task input. - * - * @param input the input value to set. - * @return the ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties object itself. - */ - public ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties withInput( - ConnectToTargetAzureDbForPostgreSqlSyncTaskInput input) { - this.input = input; - return this; - } - - /** - * Get the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbSyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbSyncTaskInput.java deleted file mode 100644 index ccab5bb5c749e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbSyncTaskInput.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input for the task that validates connection to Azure SQL DB and target server requirements. */ -@Fluent -public final class ConnectToTargetSqlDbSyncTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlDbSyncTaskInput.class); - - /* - * 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 the sourceConnectionInfo property: Connection information for source SQL Server. - * - * @return the sourceConnectionInfo value. - */ - public SqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: Connection information for source SQL Server. - * - * @param sourceConnectionInfo the sourceConnectionInfo value to set. - * @return the ConnectToTargetSqlDbSyncTaskInput object itself. - */ - public ConnectToTargetSqlDbSyncTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { - this.sourceConnectionInfo = sourceConnectionInfo; - return this; - } - - /** - * Get the targetConnectionInfo property: Connection information for target SQL DB. - * - * @return the targetConnectionInfo value. - */ - public SqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: Connection information for target SQL DB. - * - * @param targetConnectionInfo the targetConnectionInfo value to set. - * @return the ConnectToTargetSqlDbSyncTaskInput object itself. - */ - public ConnectToTargetSqlDbSyncTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { - this.targetConnectionInfo = targetConnectionInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model ConnectToTargetSqlDbSyncTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model ConnectToTargetSqlDbSyncTaskInput")); - } else { - targetConnectionInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbSyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbSyncTaskProperties.java deleted file mode 100644 index 22dac03eb3807..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbSyncTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class ConnectToTargetSqlDbSyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlDbSyncTaskProperties.class); - - /* - * Task input - */ - @JsonProperty(value = "input") - private ConnectToTargetSqlDbSyncTaskInput input; - - /* - * Task output. This is ignored if submitted. - */ - @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) - private List output; - - /** - * Get the input property: Task input. - * - * @return the input value. - */ - public ConnectToTargetSqlDbSyncTaskInput input() { - return this.input; - } - - /** - * Set the input property: Task input. - * - * @param input the input value to set. - * @return the ConnectToTargetSqlDbSyncTaskProperties object itself. - */ - public ConnectToTargetSqlDbSyncTaskProperties withInput(ConnectToTargetSqlDbSyncTaskInput input) { - this.input = input; - return this; - } - - /** - * Get the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskInput.java deleted file mode 100644 index 2a542e7b57e7a..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskInput.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input for the task that validates connection to SQL DB and target server requirements. */ -@Fluent -public final class ConnectToTargetSqlDbTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlDbTaskInput.class); - - /* - * Connection information for target SQL DB - */ - @JsonProperty(value = "targetConnectionInfo", required = true) - private SqlConnectionInfo targetConnectionInfo; - - /** - * Get the targetConnectionInfo property: Connection information for target SQL DB. - * - * @return the targetConnectionInfo value. - */ - public SqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model ConnectToTargetSqlDbTaskInput")); - } else { - targetConnectionInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskOutput.java deleted file mode 100644 index d9dabc75a9d45..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskOutput.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Output for the task that validates connection to SQL DB and target server requirements. */ -@Immutable -public final class ConnectToTargetSqlDbTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlDbTaskOutput.class); - - /* - * 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 String 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 the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the databases property: Source databases as a map from database name to database id. - * - * @return the databases value. - */ - public String databases() { - return this.databases; - } - - /** - * Get the targetServerVersion property: Version of the target server. - * - * @return the targetServerVersion value. - */ - public String targetServerVersion() { - return this.targetServerVersion; - } - - /** - * Get the targetServerBrandVersion property: Target server brand version. - * - * @return the targetServerBrandVersion value. - */ - public String targetServerBrandVersion() { - return this.targetServerBrandVersion; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskProperties.java deleted file mode 100644 index 1471aa45c47f6..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlDbTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class ConnectToTargetSqlDbTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlDbTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public ConnectToTargetSqlDbTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskInput.java deleted file mode 100644 index 0628a4cc1ce59..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskInput.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input for the task that validates connection to Azure SQL Database Managed Instance online scenario. */ -@Fluent -public final class ConnectToTargetSqlMISyncTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlMISyncTaskInput.class); - - /* - * Connection information for Azure SQL Database Managed Instance - */ - @JsonProperty(value = "targetConnectionInfo", required = true) - private MiSqlConnectionInfo targetConnectionInfo; - - /* - * Azure Active Directory Application the DMS instance will use to connect - * to the target instance of Azure SQL Database Managed Instance and the - * Azure Storage Account - */ - @JsonProperty(value = "azureApp", required = true) - private AzureActiveDirectoryApp azureApp; - - /** - * Get the targetConnectionInfo property: Connection information for Azure SQL Database Managed Instance. - * - * @return the targetConnectionInfo value. - */ - public MiSqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: Connection information for Azure SQL Database Managed Instance. - * - * @param targetConnectionInfo the targetConnectionInfo value to set. - * @return the ConnectToTargetSqlMISyncTaskInput object itself. - */ - public ConnectToTargetSqlMISyncTaskInput withTargetConnectionInfo(MiSqlConnectionInfo targetConnectionInfo) { - this.targetConnectionInfo = targetConnectionInfo; - return this; - } - - /** - * Get the azureApp property: Azure Active Directory Application the DMS instance will use to connect to the target - * instance of Azure SQL Database Managed Instance and the Azure Storage Account. - * - * @return the azureApp value. - */ - public AzureActiveDirectoryApp azureApp() { - return this.azureApp; - } - - /** - * Set the azureApp property: Azure Active Directory Application the DMS instance will use to connect to the target - * instance of Azure SQL Database Managed Instance and the Azure Storage Account. - * - * @param azureApp the azureApp value to set. - * @return the ConnectToTargetSqlMISyncTaskInput object itself. - */ - public ConnectToTargetSqlMISyncTaskInput withAzureApp(AzureActiveDirectoryApp azureApp) { - this.azureApp = azureApp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model ConnectToTargetSqlMISyncTaskInput")); - } else { - targetConnectionInfo().validate(); - } - if (azureApp() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property azureApp in model ConnectToTargetSqlMISyncTaskInput")); - } else { - azureApp().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskOutput.java deleted file mode 100644 index e678c6bc4abe7..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskOutput.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for the task that validates connection to Azure SQL Database Managed Instance. */ -@Immutable -public final class ConnectToTargetSqlMISyncTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlMISyncTaskOutput.class); - - /* - * Target server version - */ - @JsonProperty(value = "targetServerVersion", access = JsonProperty.Access.WRITE_ONLY) - private String targetServerVersion; - - /* - * Target server brand version - */ - @JsonProperty(value = "targetServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) - private String targetServerBrandVersion; - - /* - * Validation errors - */ - @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) - private List validationErrors; - - /** - * Get the targetServerVersion property: Target server version. - * - * @return the targetServerVersion value. - */ - public String targetServerVersion() { - return this.targetServerVersion; - } - - /** - * Get the targetServerBrandVersion property: Target server brand version. - * - * @return the targetServerBrandVersion value. - */ - public String targetServerBrandVersion() { - return this.targetServerBrandVersion; - } - - /** - * Get the validationErrors property: Validation errors. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskProperties.java deleted file mode 100644 index 1a060f8050c7f..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMISyncTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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.Sync.LRS") -@Fluent -public final class ConnectToTargetSqlMISyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlMISyncTaskProperties.class); - - /* - * Task input - */ - @JsonProperty(value = "input") - private ConnectToTargetSqlMISyncTaskInput input; - - /* - * Task output. This is ignored if submitted. - */ - @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) - private List output; - - /** - * Get the input property: Task input. - * - * @return the input value. - */ - public ConnectToTargetSqlMISyncTaskInput input() { - return this.input; - } - - /** - * Set the input property: Task input. - * - * @param input the input value to set. - * @return the ConnectToTargetSqlMISyncTaskProperties object itself. - */ - public ConnectToTargetSqlMISyncTaskProperties withInput(ConnectToTargetSqlMISyncTaskInput input) { - this.input = input; - return this; - } - - /** - * Get the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskInput.java deleted file mode 100644 index d984e78fd27a2..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskInput.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input for the task that validates connection to Azure SQL Database Managed Instance. */ -@Fluent -public final class ConnectToTargetSqlMITaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlMITaskInput.class); - - /* - * Connection information for target SQL Server - */ - @JsonProperty(value = "targetConnectionInfo", required = true) - private SqlConnectionInfo targetConnectionInfo; - - /** - * Get the targetConnectionInfo property: Connection information for target SQL Server. - * - * @return the targetConnectionInfo value. - */ - public SqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model ConnectToTargetSqlMITaskInput")); - } else { - targetConnectionInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskOutput.java deleted file mode 100644 index a08a082628420..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskOutput.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for the task that validates connection to Azure SQL Database Managed Instance. */ -@Immutable -public final class ConnectToTargetSqlMITaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlMITaskOutput.class); - - /* - * 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 the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the targetServerVersion property: Target server version. - * - * @return the targetServerVersion value. - */ - public String targetServerVersion() { - return this.targetServerVersion; - } - - /** - * Get the targetServerBrandVersion property: Target server brand version. - * - * @return the targetServerBrandVersion value. - */ - public String targetServerBrandVersion() { - return this.targetServerBrandVersion; - } - - /** - * Get the logins property: List of logins on the target server. - * - * @return the logins value. - */ - public List logins() { - return this.logins; - } - - /** - * Get the agentJobs property: List of agent jobs on the target server. - * - * @return the agentJobs value. - */ - public List agentJobs() { - return this.agentJobs; - } - - /** - * Get the validationErrors property: Validation errors. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskProperties.java deleted file mode 100644 index 11bed818eb6a1..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectToTargetSqlMITaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class ConnectToTargetSqlMITaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectToTargetSqlMITaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public ConnectToTargetSqlMITaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectionInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectionInfo.java deleted file mode 100644 index 7edae7f4e68f2..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ConnectionInfo.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Defines the connection properties of a server. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type", - defaultImpl = ConnectionInfo.class) -@JsonTypeName("ConnectionInfo") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "SqlConnectionInfo", value = SqlConnectionInfo.class), - @JsonSubTypes.Type(name = "MySqlConnectionInfo", value = MySqlConnectionInfo.class), - @JsonSubTypes.Type(name = "PostgreSqlConnectionInfo", value = PostgreSqlConnectionInfo.class), - @JsonSubTypes.Type(name = "MiSqlConnectionInfo", value = MiSqlConnectionInfo.class) -}) -@Fluent -public class ConnectionInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectionInfo.class); - - /* - * User name - */ - @JsonProperty(value = "userName") - private String username; - - /* - * Password credential. - */ - @JsonProperty(value = "password") - private String password; - - /** - * Get the username property: User name. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: 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 the password property: Password credential. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Password credential. - * - * @param password the password value to set. - * @return the ConnectionInfo object itself. - */ - public ConnectionInfo withPassword(String password) { - this.password = password; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataIntegrityValidationResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataIntegrityValidationResult.java deleted file mode 100644 index af960c21e8b90..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataIntegrityValidationResult.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Results for checksum based Data Integrity validation results. */ -@Immutable -public final class DataIntegrityValidationResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataIntegrityValidationResult.class); - - /* - * List of failed table names of source and target pair - */ - @JsonProperty(value = "failedObjects", access = JsonProperty.Access.WRITE_ONLY) - private Map failedObjects; - - /* - * List of errors that happened while performing data integrity validation - */ - @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) - private ValidationError validationErrors; - - /** - * Get the failedObjects property: List of failed table names of source and target pair. - * - * @return the failedObjects value. - */ - public Map failedObjects() { - return this.failedObjects; - } - - /** - * Get the validationErrors property: List of errors that happened while performing data integrity validation. - * - * @return the validationErrors value. - */ - public ValidationError validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataItemMigrationSummaryResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataItemMigrationSummaryResult.java deleted file mode 100644 index 377fa2f0f3dcd..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataItemMigrationSummaryResult.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Basic summary of a data item migration. */ -@Immutable -public class DataItemMigrationSummaryResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataItemMigrationSummaryResult.class); - - /* - * 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 OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Current state of migration - */ - @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 the name property: Name of the item. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the state property: Current state of migration. - * - * @return the state value. - */ - public MigrationState state() { - return this.state; - } - - /** - * Get the statusMessage property: Status message. - * - * @return the statusMessage value. - */ - public String statusMessage() { - return this.statusMessage; - } - - /** - * Get the itemsCount property: Number of items. - * - * @return the itemsCount value. - */ - public Long itemsCount() { - return this.itemsCount; - } - - /** - * Get the itemsCompletedCount property: Number of successfully completed items. - * - * @return the itemsCompletedCount value. - */ - public Long itemsCompletedCount() { - return this.itemsCompletedCount; - } - - /** - * Get the errorPrefix property: Wildcard string prefix to use for querying all errors of the item. - * - * @return the errorPrefix value. - */ - public String errorPrefix() { - return this.errorPrefix; - } - - /** - * Get the resultPrefix property: Wildcard string prefix to use for querying all sub-tem results of the item. - * - * @return the resultPrefix value. - */ - public String resultPrefix() { - return this.resultPrefix; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationError.java deleted file mode 100644 index 032c7fc72ec11..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationError.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Migration Task errors. */ -@Fluent -public final class DataMigrationError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMigrationError.class); - - /* - * Error description - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /* - * Type of error. - */ - @JsonProperty(value = "type") - private ErrorType type; - - /** - * Get the message property: Error description. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the type property: Type of error. - * - * @return the type value. - */ - public ErrorType type() { - return this.type; - } - - /** - * Set the type property: Type of error. - * - * @param type the type value to set. - * @return the DataMigrationError object itself. - */ - public DataMigrationError withType(ErrorType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationResultCode.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationResultCode.java deleted file mode 100644 index affe03594063a..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationResultCode.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationService.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationService.java deleted file mode 100644 index 35b95178f5ae5..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationService.java +++ /dev/null @@ -1,442 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceInner; -import java.util.Map; - -/** An immutable client-side representation of DataMigrationService. */ -public interface DataMigrationService { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the etag property: HTTP strong entity tag value. Ignored if submitted. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the kind property: The resource kind. Only 'vm' (the default) is supported. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the sku property: Service SKU. - * - * @return the sku value. - */ - ServiceSku sku(); - - /** - * Gets the provisioningState property: The resource's provisioning state. - * - * @return the provisioningState value. - */ - ServiceProvisioningState provisioningState(); - - /** - * Gets the publicKey property: The public key of the service, used to encrypt secrets sent to the service. - * - * @return the publicKey value. - */ - String publicKey(); - - /** - * Gets the virtualSubnetId property: The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the - * service should be joined. - * - * @return the virtualSubnetId value. - */ - String virtualSubnetId(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceInner object. - * - * @return the inner object. - */ - DataMigrationServiceInner innerModel(); - - /** The entirety of the DataMigrationService definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { - } - /** The DataMigrationService definition stages. */ - interface DefinitionStages { - /** The first stage of the DataMigrationService definition. */ - interface Blank extends WithLocation { - } - /** The stage of the DataMigrationService definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the DataMigrationService definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies groupName. - * - * @param groupName Name of the resource group. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String groupName); - } - /** - * The stage of the DataMigrationService definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithEtag, - DefinitionStages.WithKind, - DefinitionStages.WithSku, - DefinitionStages.WithPublicKey, - DefinitionStages.WithVirtualSubnetId { - /** - * Executes the create request. - * - * @return the created resource. - */ - DataMigrationService create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DataMigrationService create(Context context); - } - /** The stage of the DataMigrationService definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the DataMigrationService definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: HTTP strong entity tag value. Ignored if submitted. - * - * @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 the kind property: The resource kind. Only 'vm' (the default) is supported.. - * - * @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 sku. */ - interface WithSku { - /** - * Specifies the sku property: Service SKU. - * - * @param sku Service SKU. - * @return the next definition stage. - */ - WithCreate withSku(ServiceSku sku); - } - /** The stage of the DataMigrationService definition allowing to specify publicKey. */ - interface WithPublicKey { - /** - * Specifies the publicKey property: The public key of the service, used to encrypt secrets sent to the - * service. - * - * @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 virtualSubnetId. */ - interface WithVirtualSubnetId { - /** - * Specifies the virtualSubnetId property: The ID of the Microsoft.Network/virtualNetworks/subnets resource - * to which the service should be joined. - * - * @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); - } - } - /** - * Begins update for the DataMigrationService resource. - * - * @return the stage of resource update. - */ - DataMigrationService.Update update(); - - /** The template for DataMigrationService update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithEtag, - UpdateStages.WithKind, - UpdateStages.WithSku, - UpdateStages.WithPublicKey, - UpdateStages.WithVirtualSubnetId { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DataMigrationService apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DataMigrationService apply(Context context); - } - /** The DataMigrationService update stages. */ - interface UpdateStages { - /** The stage of the DataMigrationService update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the DataMigrationService update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: HTTP strong entity tag value. Ignored if submitted. - * - * @param etag HTTP strong entity tag value. Ignored if submitted. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the DataMigrationService update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The resource kind. Only 'vm' (the default) is supported.. - * - * @param kind The resource kind. Only 'vm' (the default) is supported. - * @return the next definition stage. - */ - Update withKind(String kind); - } - /** The stage of the DataMigrationService update allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Service SKU. - * - * @param sku Service SKU. - * @return the next definition stage. - */ - Update withSku(ServiceSku sku); - } - /** The stage of the DataMigrationService update allowing to specify publicKey. */ - interface WithPublicKey { - /** - * Specifies the publicKey property: The public key of the service, used to encrypt secrets sent to the - * service. - * - * @param publicKey The public key of the service, used to encrypt secrets sent to the service. - * @return the next definition stage. - */ - Update withPublicKey(String publicKey); - } - /** The stage of the DataMigrationService update allowing to specify virtualSubnetId. */ - interface WithVirtualSubnetId { - /** - * Specifies the virtualSubnetId property: The ID of the Microsoft.Network/virtualNetworks/subnets resource - * to which the service should be joined. - * - * @param virtualSubnetId The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the - * service should be joined. - * @return the next definition stage. - */ - Update withVirtualSubnetId(String virtualSubnetId); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DataMigrationService refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DataMigrationService refresh(Context context); - - /** - * 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. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - DataMigrationServiceStatusResponse checkStatus(); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - Response checkStatusWithResponse(Context context); - - /** - * 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. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(Context context); - - /** - * 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. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(Context context); - - /** - * This method checks whether a proposed nested resource name is valid and available. - * - * @param parameters Requested name to validate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - NameAvailabilityResponse nestedCheckNameAvailability(NameAvailabilityRequest parameters); - - /** - * This method checks whether a proposed nested resource name is valid and available. - * - * @param parameters Requested name to validate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - Response nestedCheckNameAvailabilityWithResponse( - NameAvailabilityRequest parameters, Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationServiceList.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationServiceList.java deleted file mode 100644 index 45333a416e363..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationServiceList.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** OData page of service objects. */ -@Fluent -public final class DataMigrationServiceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMigrationServiceList.class); - - /* - * List of services - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to load the next page of services - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of services. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of services. - * - * @param value the value value to set. - * @return the DataMigrationServiceList object itself. - */ - public DataMigrationServiceList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to load the next page of services. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL to load the next page of services. - * - * @param nextLink the nextLink value to set. - * @return the DataMigrationServiceList object itself. - */ - public DataMigrationServiceList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationServiceStatusResponse.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationServiceStatusResponse.java deleted file mode 100644 index 57c2442729458..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DataMigrationServiceStatusResponse.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceStatusResponseInner; -import java.util.List; - -/** An immutable client-side representation of DataMigrationServiceStatusResponse. */ -public interface DataMigrationServiceStatusResponse { - /** - * Gets the agentVersion property: The DMS instance agent version. - * - * @return the agentVersion value. - */ - String agentVersion(); - - /** - * Gets the status property: The machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying', - * 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed'. - * - * @return the status value. - */ - String status(); - - /** - * Gets the vmSize property: The services virtual machine size, such as 'Standard_D2_v2'. - * - * @return the vmSize value. - */ - String vmSize(); - - /** - * Gets the supportedTaskTypes property: The list of supported task types. - * - * @return the supportedTaskTypes value. - */ - List supportedTaskTypes(); - - /** - * Gets the inner com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceStatusResponseInner - * object. - * - * @return the inner object. - */ - DataMigrationServiceStatusResponseInner innerModel(); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseBackupInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseBackupInfo.java deleted file mode 100644 index 72dd6c49188ac..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseBackupInfo.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Information about backup files when existing backup mode is used. */ -@Immutable -public final class DatabaseBackupInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseBackupInfo.class); - - /* - * Database name. - */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) - private String databaseName; - - /* - * Backup Type. - */ - @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 OffsetDateTime backupFinishDate; - - /** - * Get the databaseName property: Database name. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the backupType property: Backup Type. - * - * @return the backupType value. - */ - public BackupType backupType() { - return this.backupType; - } - - /** - * Get the backupFiles property: The list of backup files for the current database. - * - * @return the backupFiles value. - */ - public List backupFiles() { - return this.backupFiles; - } - - /** - * Get the position property: Position of current database backup in the file. - * - * @return the position value. - */ - public Integer position() { - return this.position; - } - - /** - * Get the isDamaged property: 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 the isCompressed property: Whether the backup set is compressed. - * - * @return the isCompressed value. - */ - public Boolean isCompressed() { - return this.isCompressed; - } - - /** - * Get the familyCount property: Number of files in the backup set. - * - * @return the familyCount value. - */ - public Integer familyCount() { - return this.familyCount; - } - - /** - * Get the backupFinishDate property: Date and time when the backup operation finished. - * - * @return the backupFinishDate value. - */ - public OffsetDateTime backupFinishDate() { - return this.backupFinishDate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseCompatLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseCompatLevel.java deleted file mode 100644 index aa68bdbe92fc5..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseCompatLevel.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileInfo.java deleted file mode 100644 index da8cd95f1cdc6..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileInfo.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Database file specific information. */ -@Fluent -public final class DatabaseFileInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseFileInfo.class); - - /* - * 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 - */ - @JsonProperty(value = "fileType") - private DatabaseFileType fileType; - - /* - * Size of the file in megabytes - */ - @JsonProperty(value = "sizeMB") - private Double sizeMB; - - /** - * Get the databaseName property: Name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Set the databaseName property: 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 the id property: Unique identifier for database file. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: 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 the logicalName property: Logical name of the file. - * - * @return the logicalName value. - */ - public String logicalName() { - return this.logicalName; - } - - /** - * Set the logicalName property: 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 the physicalFullName property: Operating-system full path of the file. - * - * @return the physicalFullName value. - */ - public String physicalFullName() { - return this.physicalFullName; - } - - /** - * Set the physicalFullName property: 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 the restoreFullName property: Suggested full path of the file for restoring. - * - * @return the restoreFullName value. - */ - public String restoreFullName() { - return this.restoreFullName; - } - - /** - * Set the restoreFullName property: 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 the fileType property: Database file type. - * - * @return the fileType value. - */ - public DatabaseFileType fileType() { - return this.fileType; - } - - /** - * Set the fileType property: Database file type. - * - * @param fileType the fileType value to set. - * @return the DatabaseFileInfo object itself. - */ - public DatabaseFileInfo withFileType(DatabaseFileType fileType) { - this.fileType = fileType; - return this; - } - - /** - * Get the sizeMB property: Size of the file in megabytes. - * - * @return the sizeMB value. - */ - public Double sizeMB() { - return this.sizeMB; - } - - /** - * Set the sizeMB property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileInput.java deleted file mode 100644 index 741ad6aacd9ab..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileInput.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Database file specific information for input. */ -@Fluent -public final class DatabaseFileInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseFileInput.class); - - /* - * 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 - */ - @JsonProperty(value = "fileType") - private DatabaseFileType fileType; - - /** - * Get the id property: Unique identifier for database file. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: 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 the logicalName property: Logical name of the file. - * - * @return the logicalName value. - */ - public String logicalName() { - return this.logicalName; - } - - /** - * Set the logicalName property: 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 the physicalFullName property: Operating-system full path of the file. - * - * @return the physicalFullName value. - */ - public String physicalFullName() { - return this.physicalFullName; - } - - /** - * Set the physicalFullName property: 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 the restoreFullName property: Suggested full path of the file for restoring. - * - * @return the restoreFullName value. - */ - public String restoreFullName() { - return this.restoreFullName; - } - - /** - * Set the restoreFullName property: 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 the fileType property: Database file type. - * - * @return the fileType value. - */ - public DatabaseFileType fileType() { - return this.fileType; - } - - /** - * Set the fileType property: Database file type. - * - * @param fileType the fileType value to set. - * @return the DatabaseFileInput object itself. - */ - public DatabaseFileInput withFileType(DatabaseFileType fileType) { - this.fileType = fileType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileType.java deleted file mode 100644 index 7f93ebf204fce..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseFileType.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseInfo.java deleted file mode 100644 index 12a3552bc3020..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseInfo.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Project Database Details. */ -@Fluent -public final class DatabaseInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseInfo.class); - - /* - * Name of the database - */ - @JsonProperty(value = "sourceDatabaseName", required = true) - private String sourceDatabaseName; - - /** - * Get the sourceDatabaseName property: Name of the database. - * - * @return the sourceDatabaseName value. - */ - public String sourceDatabaseName() { - return this.sourceDatabaseName; - } - - /** - * Set the sourceDatabaseName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceDatabaseName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property sourceDatabaseName in model DatabaseInfo")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseMigrationStage.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseMigrationStage.java deleted file mode 100644 index 3c146684a2ea0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseMigrationStage.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseMigrationState.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseMigrationState.java deleted file mode 100644 index 629e96df8a7c0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseMigrationState.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DatabaseMigrationState. */ -public final class DatabaseMigrationState extends ExpandableStringEnum { - /** Static value UNDEFINED for DatabaseMigrationState. */ - public static final DatabaseMigrationState UNDEFINED = fromString("UNDEFINED"); - - /** Static value INITIAL for DatabaseMigrationState. */ - public static final DatabaseMigrationState INITIAL = fromString("INITIAL"); - - /** Static value FULL_BACKUP_UPLOAD_START for DatabaseMigrationState. */ - public static final DatabaseMigrationState FULL_BACKUP_UPLOAD_START = fromString("FULL_BACKUP_UPLOAD_START"); - - /** Static value LOG_SHIPPING_START for DatabaseMigrationState. */ - public static final DatabaseMigrationState LOG_SHIPPING_START = fromString("LOG_SHIPPING_START"); - - /** Static value UPLOAD_LOG_FILES_START for DatabaseMigrationState. */ - public static final DatabaseMigrationState UPLOAD_LOG_FILES_START = fromString("UPLOAD_LOG_FILES_START"); - - /** Static value CUTOVER_START for DatabaseMigrationState. */ - public static final DatabaseMigrationState CUTOVER_START = fromString("CUTOVER_START"); - - /** Static value POST_CUTOVER_COMPLETE for DatabaseMigrationState. */ - public static final DatabaseMigrationState POST_CUTOVER_COMPLETE = fromString("POST_CUTOVER_COMPLETE"); - - /** Static value COMPLETED for DatabaseMigrationState. */ - public static final DatabaseMigrationState COMPLETED = fromString("COMPLETED"); - - /** Static value CANCELLED for DatabaseMigrationState. */ - public static final DatabaseMigrationState CANCELLED = fromString("CANCELLED"); - - /** Static value FAILED for DatabaseMigrationState. */ - public static final DatabaseMigrationState FAILED = fromString("FAILED"); - - /** - * Creates or finds a DatabaseMigrationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DatabaseMigrationState. - */ - @JsonCreator - public static DatabaseMigrationState fromString(String name) { - return fromString(name, DatabaseMigrationState.class); - } - - /** @return known DatabaseMigrationState values. */ - public static Collection values() { - return values(DatabaseMigrationState.class); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseState.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseState.java deleted file mode 100644 index 95f4e02fb11c6..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseState.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseSummaryResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseSummaryResult.java deleted file mode 100644 index cba75a58e8be7..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/DatabaseSummaryResult.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Summary of database results in the migration. */ -@Immutable -public final class DatabaseSummaryResult extends DataItemMigrationSummaryResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseSummaryResult.class); - - /* - * Size of the database in megabytes - */ - @JsonProperty(value = "sizeMB", access = JsonProperty.Access.WRITE_ONLY) - private Double sizeMB; - - /** - * Get the sizeMB property: Size of the database in megabytes. - * - * @return the sizeMB value. - */ - public Double sizeMB() { - return this.sizeMB; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ErrorType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ErrorType.java deleted file mode 100644 index 1fbd7170eb446..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ErrorType.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ExecutionStatistics.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ExecutionStatistics.java deleted file mode 100644 index 2dede194c0d61..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ExecutionStatistics.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Description about the errors happen while performing migration validation. */ -@Fluent -public final class ExecutionStatistics { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExecutionStatistics.class); - - /* - * No. of query executions - */ - @JsonProperty(value = "executionCount", access = JsonProperty.Access.WRITE_ONLY) - private Long executionCount; - - /* - * CPU Time in millisecond(s) for the query execution - */ - @JsonProperty(value = "cpuTimeMs", access = JsonProperty.Access.WRITE_ONLY) - private Float cpuTimeMs; - - /* - * Time taken in millisecond(s) for executing the query - */ - @JsonProperty(value = "elapsedTimeMs", access = JsonProperty.Access.WRITE_ONLY) - private Float 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", access = JsonProperty.Access.WRITE_ONLY) - private Boolean hasErrors; - - /* - * List of sql Errors - */ - @JsonProperty(value = "sqlErrors", access = JsonProperty.Access.WRITE_ONLY) - private List sqlErrors; - - /** - * Get the executionCount property: No. of query executions. - * - * @return the executionCount value. - */ - public Long executionCount() { - return this.executionCount; - } - - /** - * Get the cpuTimeMs property: CPU Time in millisecond(s) for the query execution. - * - * @return the cpuTimeMs value. - */ - public Float cpuTimeMs() { - return this.cpuTimeMs; - } - - /** - * Get the elapsedTimeMs property: Time taken in millisecond(s) for executing the query. - * - * @return the elapsedTimeMs value. - */ - public Float elapsedTimeMs() { - return this.elapsedTimeMs; - } - - /** - * Get the waitStats property: Dictionary of sql query execution wait types and the respective statistics. - * - * @return the waitStats value. - */ - public Map waitStats() { - return this.waitStats; - } - - /** - * Set the waitStats property: 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 the hasErrors property: Indicates whether the query resulted in an error. - * - * @return the hasErrors value. - */ - public Boolean hasErrors() { - return this.hasErrors; - } - - /** - * Get the sqlErrors property: List of sql Errors. - * - * @return the sqlErrors value. - */ - public List sqlErrors() { - return this.sqlErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (waitStats() != null) { - waitStats() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/FileShare.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/FileShare.java deleted file mode 100644 index e9a7d20eb6757..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/FileShare.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** File share information with Path, Username, and Password. */ -@Fluent -public final class FileShare { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FileShare.class); - - /* - * 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 the username property: User name credential to connect to the share location. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: 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 the password property: Password credential used to connect to the share location. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: 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 path property: The folder path for this share. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (path() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property path in model FileShare")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskInput.java deleted file mode 100644 index d14cd4744e578..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskInput.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for the task that gets TDE certificates in Base64 encoded format. */ -@Fluent -public final class GetTdeCertificatesSqlTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetTdeCertificatesSqlTaskInput.class); - - /* - * 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 the connectionInfo property: Connection information for SQL Server. - * - * @return the connectionInfo value. - */ - public SqlConnectionInfo connectionInfo() { - return this.connectionInfo; - } - - /** - * Set the connectionInfo property: 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 the backupFileShare property: 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 the backupFileShare property: 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 the selectedCertificates property: 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 the selectedCertificates property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (connectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property connectionInfo in model GetTdeCertificatesSqlTaskInput")); - } else { - connectionInfo().validate(); - } - if (backupFileShare() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property backupFileShare in model GetTdeCertificatesSqlTaskInput")); - } else { - backupFileShare().validate(); - } - if (selectedCertificates() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedCertificates in model GetTdeCertificatesSqlTaskInput")); - } else { - selectedCertificates().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskOutput.java deleted file mode 100644 index 9f60afa9dba2d..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskOutput.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output of the task that gets TDE certificates in Base64 encoded format. */ -@Immutable -public final class GetTdeCertificatesSqlTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetTdeCertificatesSqlTaskOutput.class); - - /* - * Mapping from certificate name to base 64 encoded format. - */ - @JsonProperty(value = "base64EncodedCertificates", access = JsonProperty.Access.WRITE_ONLY) - private String base64EncodedCertificates; - - /* - * Validation errors - */ - @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) - private List validationErrors; - - /** - * Get the base64EncodedCertificates property: Mapping from certificate name to base 64 encoded format. - * - * @return the base64EncodedCertificates value. - */ - public String base64EncodedCertificates() { - return this.base64EncodedCertificates; - } - - /** - * Get the validationErrors property: Validation errors. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskProperties.java deleted file mode 100644 index 34b44e3a61c6a..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetTdeCertificatesSqlTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class GetTdeCertificatesSqlTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetTdeCertificatesSqlTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public GetTdeCertificatesSqlTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskInput.java deleted file mode 100644 index dc435193f8621..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskInput.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for the task that collects user tables for the given list of databases. */ -@Fluent -public final class GetUserTablesSqlSyncTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetUserTablesSqlSyncTaskInput.class); - - /* - * 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 the sourceConnectionInfo property: Connection information for SQL Server. - * - * @return the sourceConnectionInfo value. - */ - public SqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: 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 the targetConnectionInfo property: Connection information for SQL DB. - * - * @return the targetConnectionInfo value. - */ - public SqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: 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 the selectedSourceDatabases property: List of source database names to collect tables for. - * - * @return the selectedSourceDatabases value. - */ - public List selectedSourceDatabases() { - return this.selectedSourceDatabases; - } - - /** - * Set the selectedSourceDatabases property: 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 the selectedTargetDatabases property: List of target database names to collect tables for. - * - * @return the selectedTargetDatabases value. - */ - public List selectedTargetDatabases() { - return this.selectedTargetDatabases; - } - - /** - * Set the selectedTargetDatabases property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model GetUserTablesSqlSyncTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model GetUserTablesSqlSyncTaskInput")); - } else { - targetConnectionInfo().validate(); - } - if (selectedSourceDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedSourceDatabases in model GetUserTablesSqlSyncTaskInput")); - } - if (selectedTargetDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedTargetDatabases in model GetUserTablesSqlSyncTaskInput")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskOutput.java deleted file mode 100644 index 3b76ecd344d2d..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskOutput.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output of the task that collects user tables for the given list of databases. */ -@Immutable -public final class GetUserTablesSqlSyncTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetUserTablesSqlSyncTaskOutput.class); - - /* - * Mapping from database name to list of source tables - */ - @JsonProperty(value = "databasesToSourceTables", access = JsonProperty.Access.WRITE_ONLY) - private String databasesToSourceTables; - - /* - * Mapping from database name to list of target tables - */ - @JsonProperty(value = "databasesToTargetTables", access = JsonProperty.Access.WRITE_ONLY) - private String databasesToTargetTables; - - /* - * Mapping from database name to list of validation errors - */ - @JsonProperty(value = "tableValidationErrors", access = JsonProperty.Access.WRITE_ONLY) - private String tableValidationErrors; - - /* - * Validation errors - */ - @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) - private List validationErrors; - - /** - * Get the databasesToSourceTables property: Mapping from database name to list of source tables. - * - * @return the databasesToSourceTables value. - */ - public String databasesToSourceTables() { - return this.databasesToSourceTables; - } - - /** - * Get the databasesToTargetTables property: Mapping from database name to list of target tables. - * - * @return the databasesToTargetTables value. - */ - public String databasesToTargetTables() { - return this.databasesToTargetTables; - } - - /** - * Get the tableValidationErrors property: Mapping from database name to list of validation errors. - * - * @return the tableValidationErrors value. - */ - public String tableValidationErrors() { - return this.tableValidationErrors; - } - - /** - * Get the validationErrors property: Validation errors. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskProperties.java deleted file mode 100644 index 66edd726e08cd..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlSyncTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class GetUserTablesSqlSyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetUserTablesSqlSyncTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public GetUserTablesSqlSyncTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskInput.java deleted file mode 100644 index 50a2d6a292eb8..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskInput.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for the task that collects user tables for the given list of databases. */ -@Fluent -public final class GetUserTablesSqlTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetUserTablesSqlTaskInput.class); - - /* - * 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 the connectionInfo property: Connection information for SQL Server. - * - * @return the connectionInfo value. - */ - public SqlConnectionInfo connectionInfo() { - return this.connectionInfo; - } - - /** - * Set the connectionInfo property: 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 the selectedDatabases property: List of database names to collect tables for. - * - * @return the selectedDatabases value. - */ - public List selectedDatabases() { - return this.selectedDatabases; - } - - /** - * Set the selectedDatabases property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (connectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property connectionInfo in model GetUserTablesSqlTaskInput")); - } else { - connectionInfo().validate(); - } - if (selectedDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedDatabases in model GetUserTablesSqlTaskInput")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskOutput.java deleted file mode 100644 index 91208c5eaee7a..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskOutput.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output of the task that collects user tables for the given list of databases. */ -@Immutable -public final class GetUserTablesSqlTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetUserTablesSqlTaskOutput.class); - - /* - * 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 String databasesToTables; - - /* - * Validation errors - */ - @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) - private List validationErrors; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the databasesToTables property: Mapping from database name to list of tables. - * - * @return the databasesToTables value. - */ - public String databasesToTables() { - return this.databasesToTables; - } - - /** - * Get the validationErrors property: Validation errors. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskProperties.java deleted file mode 100644 index 151d5e9e0aa90..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/GetUserTablesSqlTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class GetUserTablesSqlTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GetUserTablesSqlTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public GetUserTablesSqlTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/LoginMigrationStage.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/LoginMigrationStage.java deleted file mode 100644 index ceaddb4fdda15..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/LoginMigrationStage.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/LoginType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/LoginType.java deleted file mode 100644 index 3d13ea0c9bd80..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/LoginType.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MiSqlConnectionInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MiSqlConnectionInfo.java deleted file mode 100644 index 7e04a1c070935..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MiSqlConnectionInfo.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Properties required to create a connection to Azure SQL database Managed instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") -@JsonTypeName("MiSqlConnectionInfo") -@Fluent -public final class MiSqlConnectionInfo extends ConnectionInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MiSqlConnectionInfo.class); - - /* - * Resource id for Azure SQL database Managed instance - */ - @JsonProperty(value = "managedInstanceResourceId", required = true) - private String managedInstanceResourceId; - - /** - * Get the managedInstanceResourceId property: Resource id for Azure SQL database Managed instance. - * - * @return the managedInstanceResourceId value. - */ - public String managedInstanceResourceId() { - return this.managedInstanceResourceId; - } - - /** - * Set the managedInstanceResourceId property: Resource id for Azure SQL database Managed instance. - * - * @param managedInstanceResourceId the managedInstanceResourceId value to set. - * @return the MiSqlConnectionInfo object itself. - */ - public MiSqlConnectionInfo withManagedInstanceResourceId(String managedInstanceResourceId) { - this.managedInstanceResourceId = managedInstanceResourceId; - return this; - } - - /** {@inheritDoc} */ - @Override - public MiSqlConnectionInfo withUsername(String username) { - super.withUsername(username); - return this; - } - - /** {@inheritDoc} */ - @Override - public MiSqlConnectionInfo withPassword(String password) { - super.withPassword(password); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (managedInstanceResourceId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property managedInstanceResourceId in model MiSqlConnectionInfo")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandInput.java deleted file mode 100644 index af024eb545cc5..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandInput.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input for command that completes online migration for an Azure SQL Database Managed Instance. */ -@Fluent -public final class MigrateMISyncCompleteCommandInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateMISyncCompleteCommandInput.class); - - /* - * Name of managed instance database - */ - @JsonProperty(value = "sourceDatabaseName", required = true) - private String sourceDatabaseName; - - /** - * Get the sourceDatabaseName property: Name of managed instance database. - * - * @return the sourceDatabaseName value. - */ - public String sourceDatabaseName() { - return this.sourceDatabaseName; - } - - /** - * Set the sourceDatabaseName property: Name of managed instance database. - * - * @param sourceDatabaseName the sourceDatabaseName value to set. - * @return the MigrateMISyncCompleteCommandInput object itself. - */ - public MigrateMISyncCompleteCommandInput withSourceDatabaseName(String sourceDatabaseName) { - this.sourceDatabaseName = sourceDatabaseName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceDatabaseName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceDatabaseName in model MigrateMISyncCompleteCommandInput")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandOutput.java deleted file mode 100644 index a1abb17844ab9..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandOutput.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for command that completes online migration for an Azure SQL Database Managed Instance. */ -@Fluent -public final class MigrateMISyncCompleteCommandOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateMISyncCompleteCommandOutput.class); - - /* - * List of errors that happened during the command execution - */ - @JsonProperty(value = "errors") - private List errors; - - /** - * Get the errors property: List of errors that happened during the command execution. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: List of errors that happened during the command execution. - * - * @param errors the errors value to set. - * @return the MigrateMISyncCompleteCommandOutput object itself. - */ - public MigrateMISyncCompleteCommandOutput withErrors(List errors) { - this.errors = errors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandProperties.java deleted file mode 100644 index 3421f0b1b1616..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMISyncCompleteCommandProperties.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Properties for the command that completes online migration for an Azure SQL Database Managed Instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "commandType") -@JsonTypeName("Migrate.SqlServer.AzureDbSqlMi.Complete") -@Fluent -public final class MigrateMISyncCompleteCommandProperties extends CommandProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateMISyncCompleteCommandProperties.class); - - /* - * Command input - */ - @JsonProperty(value = "input") - private MigrateMISyncCompleteCommandInput input; - - /* - * Command output. This is ignored if submitted. - */ - @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) - private MigrateMISyncCompleteCommandOutput output; - - /** - * Get the input property: Command input. - * - * @return the input value. - */ - public MigrateMISyncCompleteCommandInput input() { - return this.input; - } - - /** - * Set the input property: Command input. - * - * @param input the input value to set. - * @return the MigrateMISyncCompleteCommandProperties object itself. - */ - public MigrateMISyncCompleteCommandProperties withInput(MigrateMISyncCompleteCommandInput input) { - this.input = input; - return this; - } - - /** - * Get the output property: Command output. This is ignored if submitted. - * - * @return the output value. - */ - public MigrateMISyncCompleteCommandOutput output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java deleted file mode 100644 index 3a6a4bc75b42d..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncDatabaseInput.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Database specific information for MySQL to Azure Database for MySQL migration task inputs. */ -@Fluent -public final class MigrateMySqlAzureDbForMySqlSyncDatabaseInput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateMySqlAzureDbForMySqlSyncDatabaseInput.class); - - /* - * 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; - - /* - * 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 the name property: Name of the database. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 the targetDatabaseName property: Name of target database. Note: Target database will be truncated before - * starting migration. - * - * @return the targetDatabaseName value. - */ - public String targetDatabaseName() { - return this.targetDatabaseName; - } - - /** - * Set the targetDatabaseName property: 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; - } - - /** - * Get the migrationSetting property: Migration settings which tune the migration behavior. - * - * @return the migrationSetting value. - */ - public Map migrationSetting() { - return this.migrationSetting; - } - - /** - * Set the migrationSetting property: Migration settings which tune the migration behavior. - * - * @param migrationSetting the migrationSetting value to set. - * @return the MigrateMySqlAzureDbForMySqlSyncDatabaseInput object itself. - */ - public MigrateMySqlAzureDbForMySqlSyncDatabaseInput withMigrationSetting(Map migrationSetting) { - this.migrationSetting = migrationSetting; - return this; - } - - /** - * Get the sourceSetting property: Source settings to tune source endpoint migration behavior. - * - * @return the sourceSetting value. - */ - public Map sourceSetting() { - return this.sourceSetting; - } - - /** - * Set the sourceSetting property: Source settings to tune source endpoint migration behavior. - * - * @param sourceSetting the sourceSetting value to set. - * @return the MigrateMySqlAzureDbForMySqlSyncDatabaseInput object itself. - */ - public MigrateMySqlAzureDbForMySqlSyncDatabaseInput withSourceSetting(Map sourceSetting) { - this.sourceSetting = sourceSetting; - return this; - } - - /** - * Get the targetSetting property: Target settings to tune target endpoint migration behavior. - * - * @return the targetSetting value. - */ - public Map targetSetting() { - return this.targetSetting; - } - - /** - * Set the targetSetting property: Target settings to tune target endpoint migration behavior. - * - * @param targetSetting the targetSetting value to set. - * @return the MigrateMySqlAzureDbForMySqlSyncDatabaseInput object itself. - */ - public MigrateMySqlAzureDbForMySqlSyncDatabaseInput withTargetSetting(Map targetSetting) { - this.targetSetting = targetSetting; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskInput.java deleted file mode 100644 index 2e3210a141b9b..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskInput.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for the task that migrates MySQL databases to Azure Database for MySQL for online migrations. */ -@Fluent -public final class MigrateMySqlAzureDbForMySqlSyncTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateMySqlAzureDbForMySqlSyncTaskInput.class); - - /* - * 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 the sourceConnectionInfo property: Connection information for source MySQL. - * - * @return the sourceConnectionInfo value. - */ - public MySqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: 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 the targetConnectionInfo property: Connection information for target Azure Database for MySQL. - * - * @return the targetConnectionInfo value. - */ - public MySqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: 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 the selectedDatabases property: Databases to migrate. - * - * @return the selectedDatabases value. - */ - public List selectedDatabases() { - return this.selectedDatabases; - } - - /** - * Set the selectedDatabases property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model" - + " MigrateMySqlAzureDbForMySqlSyncTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model" - + " MigrateMySqlAzureDbForMySqlSyncTaskInput")); - } else { - targetConnectionInfo().validate(); - } - if (selectedDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedDatabases in model" - + " MigrateMySqlAzureDbForMySqlSyncTaskInput")); - } else { - selectedDatabases().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java deleted file mode 100644 index fcd30f6421659..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutput.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** 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", - defaultImpl = MigrateMySqlAzureDbForMySqlSyncTaskOutput.class) -@JsonTypeName("MigrateMySqlAzureDbForMySqlSyncTaskOutput") -@JsonSubTypes({ - @JsonSubTypes.Type( - name = "MigrationLevelOutput", - value = MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.class), - @JsonSubTypes.Type( - name = "DatabaseLevelOutput", - value = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.class), - @JsonSubTypes.Type(name = "TableLevelOutput", value = MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.class), - @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateMySqlAzureDbForMySqlSyncTaskOutputError.class), - @JsonSubTypes.Type( - name = "DatabaseLevelErrorOutput", - value = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.class) -}) -@Immutable -public class MigrateMySqlAzureDbForMySqlSyncTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateMySqlAzureDbForMySqlSyncTaskOutput.class); - - /* - * Result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java deleted file mode 100644 index a931f2fae2c8f..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** The MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("DatabaseLevelErrorOutput") -@Fluent -public final class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError - extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError.class); - - /* - * Error message - */ - @JsonProperty(value = "errorMessage") - private String errorMessage; - - /* - * List of error events. - */ - @JsonProperty(value = "events") - private List events; - - /** - * Get the errorMessage property: Error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: 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 the events property: List of error events. - * - * @return the events value. - */ - public List events() { - return this.events; - } - - /** - * Set the events property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (events() != null) { - events().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java deleted file mode 100644 index 816633abd6375..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.java +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** The MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("DatabaseLevelOutput") -@Immutable -public final class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel - extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel.class); - - /* - * 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 OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Migration state that this database is in - */ - @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 the databaseName property: Name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the migrationState property: Migration state that this database is in. - * - * @return the migrationState value. - */ - public SyncDatabaseMigrationReportingState migrationState() { - return this.migrationState; - } - - /** - * Get the incomingChanges property: Number of incoming changes. - * - * @return the incomingChanges value. - */ - public Long incomingChanges() { - return this.incomingChanges; - } - - /** - * Get the appliedChanges property: Number of applied changes. - * - * @return the appliedChanges value. - */ - public Long appliedChanges() { - return this.appliedChanges; - } - - /** - * Get the cdcInsertCounter property: Number of cdc inserts. - * - * @return the cdcInsertCounter value. - */ - public Long cdcInsertCounter() { - return this.cdcInsertCounter; - } - - /** - * Get the cdcDeleteCounter property: Number of cdc deletes. - * - * @return the cdcDeleteCounter value. - */ - public Long cdcDeleteCounter() { - return this.cdcDeleteCounter; - } - - /** - * Get the cdcUpdateCounter property: Number of cdc updates. - * - * @return the cdcUpdateCounter value. - */ - public Long cdcUpdateCounter() { - return this.cdcUpdateCounter; - } - - /** - * Get the fullLoadCompletedTables property: Number of tables completed in full load. - * - * @return the fullLoadCompletedTables value. - */ - public Long fullLoadCompletedTables() { - return this.fullLoadCompletedTables; - } - - /** - * Get the fullLoadLoadingTables property: Number of tables loading in full load. - * - * @return the fullLoadLoadingTables value. - */ - public Long fullLoadLoadingTables() { - return this.fullLoadLoadingTables; - } - - /** - * Get the fullLoadQueuedTables property: Number of tables queued in full load. - * - * @return the fullLoadQueuedTables value. - */ - public Long fullLoadQueuedTables() { - return this.fullLoadQueuedTables; - } - - /** - * Get the fullLoadErroredTables property: Number of tables errored in full load. - * - * @return the fullLoadErroredTables value. - */ - public Long fullLoadErroredTables() { - return this.fullLoadErroredTables; - } - - /** - * Get the initializationCompleted property: Indicates if initial load (full load) has been completed. - * - * @return the initializationCompleted value. - */ - public Boolean initializationCompleted() { - return this.initializationCompleted; - } - - /** - * Get the latency property: CDC apply latency. - * - * @return the latency value. - */ - public Long latency() { - return this.latency; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java deleted file mode 100644 index 6ca14d3c0302e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputError.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -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") -@Immutable -public final class MigrateMySqlAzureDbForMySqlSyncTaskOutputError extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateMySqlAzureDbForMySqlSyncTaskOutputError.class); - - /* - * Migration error - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ReportableException error; - - /** - * Get the error property: Migration error. - * - * @return the error value. - */ - public ReportableException error() { - return this.error; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java deleted file mode 100644 index 21b3ea1396f47..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** The MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("MigrationLevelOutput") -@Immutable -public final class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel - extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel.class); - - /* - * Migration start time - */ - @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the sourceServerVersion property: Source server version. - * - * @return the sourceServerVersion value. - */ - public String sourceServerVersion() { - return this.sourceServerVersion; - } - - /** - * Get the sourceServer property: Source server name. - * - * @return the sourceServer value. - */ - public String sourceServer() { - return this.sourceServer; - } - - /** - * Get the targetServerVersion property: Target server version. - * - * @return the targetServerVersion value. - */ - public String targetServerVersion() { - return this.targetServerVersion; - } - - /** - * Get the targetServer property: Target server name. - * - * @return the targetServer value. - */ - public String targetServer() { - return this.targetServer; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java deleted file mode 100644 index c4e50b1707da0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** The MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("TableLevelOutput") -@Immutable -public final class MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel - extends MigrateMySqlAzureDbForMySqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel.class); - - /* - * 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 OffsetDateTime fullLoadEstFinishTime; - - /* - * Full load start time - */ - @JsonProperty(value = "fullLoadStartedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime fullLoadStartedOn; - - /* - * Full load end time - */ - @JsonProperty(value = "fullLoadEndedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 - */ - @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 OffsetDateTime lastModifiedTime; - - /** - * Get the tableName property: Name of the table. - * - * @return the tableName value. - */ - public String tableName() { - return this.tableName; - } - - /** - * Get the databaseName property: Name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the cdcInsertCounter property: Number of applied inserts. - * - * @return the cdcInsertCounter value. - */ - public String cdcInsertCounter() { - return this.cdcInsertCounter; - } - - /** - * Get the cdcUpdateCounter property: Number of applied updates. - * - * @return the cdcUpdateCounter value. - */ - public String cdcUpdateCounter() { - return this.cdcUpdateCounter; - } - - /** - * Get the cdcDeleteCounter property: Number of applied deletes. - * - * @return the cdcDeleteCounter value. - */ - public String cdcDeleteCounter() { - return this.cdcDeleteCounter; - } - - /** - * Get the fullLoadEstFinishTime property: Estimate to finish full load. - * - * @return the fullLoadEstFinishTime value. - */ - public OffsetDateTime fullLoadEstFinishTime() { - return this.fullLoadEstFinishTime; - } - - /** - * Get the fullLoadStartedOn property: Full load start time. - * - * @return the fullLoadStartedOn value. - */ - public OffsetDateTime fullLoadStartedOn() { - return this.fullLoadStartedOn; - } - - /** - * Get the fullLoadEndedOn property: Full load end time. - * - * @return the fullLoadEndedOn value. - */ - public OffsetDateTime fullLoadEndedOn() { - return this.fullLoadEndedOn; - } - - /** - * Get the fullLoadTotalRows property: Number of rows applied in full load. - * - * @return the fullLoadTotalRows value. - */ - public Long fullLoadTotalRows() { - return this.fullLoadTotalRows; - } - - /** - * Get the state property: Current state of the table migration. - * - * @return the state value. - */ - public SyncTableMigrationState state() { - return this.state; - } - - /** - * Get the totalChangesApplied property: Total number of applied changes. - * - * @return the totalChangesApplied value. - */ - public Long totalChangesApplied() { - return this.totalChangesApplied; - } - - /** - * Get the dataErrorsCounter property: Number of data errors occurred. - * - * @return the dataErrorsCounter value. - */ - public Long dataErrorsCounter() { - return this.dataErrorsCounter; - } - - /** - * Get the lastModifiedTime property: Last modified time on target. - * - * @return the lastModifiedTime value. - */ - public OffsetDateTime lastModifiedTime() { - return this.lastModifiedTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java deleted file mode 100644 index 5d92873f0f5ba..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateMySqlAzureDbForMySqlSyncTaskProperties.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class MigrateMySqlAzureDbForMySqlSyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateMySqlAzureDbForMySqlSyncTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public MigrateMySqlAzureDbForMySqlSyncTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java deleted file mode 100644 index c6124e31a0bcb..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Database specific information for PostgreSQL to Azure Database for PostgreSQL migration task inputs. */ -@Fluent -public final class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.class); - - /* - * 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; - - /* - * 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 the name property: Name of the database. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 the targetDatabaseName property: Name of target database. Note: Target database will be truncated before - * starting migration. - * - * @return the targetDatabaseName value. - */ - public String targetDatabaseName() { - return this.targetDatabaseName; - } - - /** - * Set the targetDatabaseName property: 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; - } - - /** - * Get the migrationSetting property: Migration settings which tune the migration behavior. - * - * @return the migrationSetting value. - */ - public Map migrationSetting() { - return this.migrationSetting; - } - - /** - * Set the migrationSetting property: Migration settings which tune the migration behavior. - * - * @param migrationSetting the migrationSetting value to set. - * @return the MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput object itself. - */ - public MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput withMigrationSetting( - Map migrationSetting) { - this.migrationSetting = migrationSetting; - return this; - } - - /** - * Get the sourceSetting property: Source settings to tune source endpoint migration behavior. - * - * @return the sourceSetting value. - */ - public Map sourceSetting() { - return this.sourceSetting; - } - - /** - * Set the sourceSetting property: Source settings to tune source endpoint migration behavior. - * - * @param sourceSetting the sourceSetting value to set. - * @return the MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput object itself. - */ - public MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput withSourceSetting(Map sourceSetting) { - this.sourceSetting = sourceSetting; - return this; - } - - /** - * Get the targetSetting property: Target settings to tune target endpoint migration behavior. - * - * @return the targetSetting value. - */ - public Map targetSetting() { - return this.targetSetting; - } - - /** - * Set the targetSetting property: Target settings to tune target endpoint migration behavior. - * - * @param targetSetting the targetSetting value to set. - * @return the MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput object itself. - */ - public MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput withTargetSetting(Map targetSetting) { - this.targetSetting = targetSetting; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput.java deleted file mode 100644 index adab2a9383fd5..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for the task that migrates PostgreSQL databases to Azure Database for PostgreSQL for online migrations. */ -@Fluent -public final class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput.class); - - /* - * 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 the selectedDatabases property: Databases to migrate. - * - * @return the selectedDatabases value. - */ - public List selectedDatabases() { - return this.selectedDatabases; - } - - /** - * Set the selectedDatabases property: 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 the targetConnectionInfo property: Connection information for target Azure Database for PostgreSQL. - * - * @return the targetConnectionInfo value. - */ - public PostgreSqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: 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 the sourceConnectionInfo property: Connection information for source PostgreSQL. - * - * @return the sourceConnectionInfo value. - */ - public PostgreSqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (selectedDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedDatabases in model" - + " MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput")); - } else { - selectedDatabases().forEach(e -> e.validate()); - } - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model" - + " MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput")); - } else { - targetConnectionInfo().validate(); - } - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model" - + " MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java deleted file mode 100644 index 940950ba54ce9..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** 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", - defaultImpl = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.class) -@JsonTypeName("MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput") -@JsonSubTypes({ - @JsonSubTypes.Type( - name = "MigrationLevelOutput", - value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.class), - @JsonSubTypes.Type( - name = "DatabaseLevelOutput", - value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.class), - @JsonSubTypes.Type( - name = "TableLevelOutput", - value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.class), - @JsonSubTypes.Type(name = "ErrorOutput", value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.class), - @JsonSubTypes.Type( - name = "DatabaseLevelErrorOutput", - value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.class) -}) -@Immutable -public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.class); - - /* - * Result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java deleted file mode 100644 index b9a4a86a0c8d7..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("DatabaseLevelErrorOutput") -@Fluent -public final class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError - extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.class); - - /* - * Error message - */ - @JsonProperty(value = "errorMessage") - private String errorMessage; - - /* - * List of error events. - */ - @JsonProperty(value = "events") - private List events; - - /** - * Get the errorMessage property: Error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: 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 the events property: List of error events. - * - * @return the events value. - */ - public List events() { - return this.events; - } - - /** - * Set the events property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (events() != null) { - events().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java deleted file mode 100644 index 6d3bf92b6a026..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("DatabaseLevelOutput") -@Immutable -public final class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel - extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.class); - - /* - * 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 OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Migration state that this database is in - */ - @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 the databaseName property: Name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the migrationState property: Migration state that this database is in. - * - * @return the migrationState value. - */ - public SyncDatabaseMigrationReportingState migrationState() { - return this.migrationState; - } - - /** - * Get the incomingChanges property: Number of incoming changes. - * - * @return the incomingChanges value. - */ - public Long incomingChanges() { - return this.incomingChanges; - } - - /** - * Get the appliedChanges property: Number of applied changes. - * - * @return the appliedChanges value. - */ - public Long appliedChanges() { - return this.appliedChanges; - } - - /** - * Get the cdcInsertCounter property: Number of cdc inserts. - * - * @return the cdcInsertCounter value. - */ - public Long cdcInsertCounter() { - return this.cdcInsertCounter; - } - - /** - * Get the cdcDeleteCounter property: Number of cdc deletes. - * - * @return the cdcDeleteCounter value. - */ - public Long cdcDeleteCounter() { - return this.cdcDeleteCounter; - } - - /** - * Get the cdcUpdateCounter property: Number of cdc updates. - * - * @return the cdcUpdateCounter value. - */ - public Long cdcUpdateCounter() { - return this.cdcUpdateCounter; - } - - /** - * Get the fullLoadCompletedTables property: Number of tables completed in full load. - * - * @return the fullLoadCompletedTables value. - */ - public Long fullLoadCompletedTables() { - return this.fullLoadCompletedTables; - } - - /** - * Get the fullLoadLoadingTables property: Number of tables loading in full load. - * - * @return the fullLoadLoadingTables value. - */ - public Long fullLoadLoadingTables() { - return this.fullLoadLoadingTables; - } - - /** - * Get the fullLoadQueuedTables property: Number of tables queued in full load. - * - * @return the fullLoadQueuedTables value. - */ - public Long fullLoadQueuedTables() { - return this.fullLoadQueuedTables; - } - - /** - * Get the fullLoadErroredTables property: Number of tables errored in full load. - * - * @return the fullLoadErroredTables value. - */ - public Long fullLoadErroredTables() { - return this.fullLoadErroredTables; - } - - /** - * Get the initializationCompleted property: Indicates if initial load (full load) has been completed. - * - * @return the initializationCompleted value. - */ - public Boolean initializationCompleted() { - return this.initializationCompleted; - } - - /** - * Get the latency property: CDC apply latency. - * - * @return the latency value. - */ - public Long latency() { - return this.latency; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java deleted file mode 100644 index 2ee7ea9ededd6..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -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") -@Immutable -public final class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError - extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.class); - - /* - * Migration error - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ReportableException error; - - /** - * Get the error property: Migration error. - * - * @return the error value. - */ - public ReportableException error() { - return this.error; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java deleted file mode 100644 index 0e25dbdb56f59..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("MigrationLevelOutput") -@Immutable -public final class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel - extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel.class); - - /* - * Migration start time - */ - @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the sourceServerVersion property: Source server version. - * - * @return the sourceServerVersion value. - */ - public String sourceServerVersion() { - return this.sourceServerVersion; - } - - /** - * Get the sourceServer property: Source server name. - * - * @return the sourceServer value. - */ - public String sourceServer() { - return this.sourceServer; - } - - /** - * Get the targetServerVersion property: Target server version. - * - * @return the targetServerVersion value. - */ - public String targetServerVersion() { - return this.targetServerVersion; - } - - /** - * Get the targetServer property: Target server name. - * - * @return the targetServer value. - */ - public String targetServer() { - return this.targetServer; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java deleted file mode 100644 index d99a9f10eb080..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.java +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** The MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("TableLevelOutput") -@Immutable -public final class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel - extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.class); - - /* - * 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 OffsetDateTime fullLoadEstFinishTime; - - /* - * Full load start time - */ - @JsonProperty(value = "fullLoadStartedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime fullLoadStartedOn; - - /* - * Full load end time - */ - @JsonProperty(value = "fullLoadEndedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 - */ - @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 OffsetDateTime lastModifiedTime; - - /** - * Get the tableName property: Name of the table. - * - * @return the tableName value. - */ - public String tableName() { - return this.tableName; - } - - /** - * Get the databaseName property: Name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the cdcInsertCounter property: Number of applied inserts. - * - * @return the cdcInsertCounter value. - */ - public Long cdcInsertCounter() { - return this.cdcInsertCounter; - } - - /** - * Get the cdcUpdateCounter property: Number of applied updates. - * - * @return the cdcUpdateCounter value. - */ - public Long cdcUpdateCounter() { - return this.cdcUpdateCounter; - } - - /** - * Get the cdcDeleteCounter property: Number of applied deletes. - * - * @return the cdcDeleteCounter value. - */ - public Long cdcDeleteCounter() { - return this.cdcDeleteCounter; - } - - /** - * Get the fullLoadEstFinishTime property: Estimate to finish full load. - * - * @return the fullLoadEstFinishTime value. - */ - public OffsetDateTime fullLoadEstFinishTime() { - return this.fullLoadEstFinishTime; - } - - /** - * Get the fullLoadStartedOn property: Full load start time. - * - * @return the fullLoadStartedOn value. - */ - public OffsetDateTime fullLoadStartedOn() { - return this.fullLoadStartedOn; - } - - /** - * Get the fullLoadEndedOn property: Full load end time. - * - * @return the fullLoadEndedOn value. - */ - public OffsetDateTime fullLoadEndedOn() { - return this.fullLoadEndedOn; - } - - /** - * Get the fullLoadTotalRows property: Number of rows applied in full load. - * - * @return the fullLoadTotalRows value. - */ - public Long fullLoadTotalRows() { - return this.fullLoadTotalRows; - } - - /** - * Get the state property: Current state of the table migration. - * - * @return the state value. - */ - public SyncTableMigrationState state() { - return this.state; - } - - /** - * Get the totalChangesApplied property: Total number of applied changes. - * - * @return the totalChangesApplied value. - */ - public Long totalChangesApplied() { - return this.totalChangesApplied; - } - - /** - * Get the dataErrorsCounter property: Number of data errors occurred. - * - * @return the dataErrorsCounter value. - */ - public Long dataErrorsCounter() { - return this.dataErrorsCounter; - } - - /** - * Get the lastModifiedTime property: Last modified time on target. - * - * @return the lastModifiedTime value. - */ - public OffsetDateTime lastModifiedTime() { - return this.lastModifiedTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java deleted file mode 100644 index cb2a0c76724a5..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * 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") -@Fluent -public final class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbDatabaseInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbDatabaseInput.java deleted file mode 100644 index cee7957f657b3..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbDatabaseInput.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Database specific information for SQL to Azure SQL DB migration task inputs. */ -@Fluent -public final class MigrateSqlServerSqlDbDatabaseInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbDatabaseInput.class); - - /* - * 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 the name property: Name of the database. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 the targetDatabaseName property: Name of target database. Note: Target database will be truncated before - * starting migration. - * - * @return the targetDatabaseName value. - */ - public String targetDatabaseName() { - return this.targetDatabaseName; - } - - /** - * Set the targetDatabaseName property: 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 the makeSourceDbReadOnly property: Whether to set database read only before migration. - * - * @return the makeSourceDbReadOnly value. - */ - public Boolean makeSourceDbReadOnly() { - return this.makeSourceDbReadOnly; - } - - /** - * Set the makeSourceDbReadOnly property: 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 the tableMap property: Mapping of source to target tables. - * - * @return the tableMap value. - */ - public Map tableMap() { - return this.tableMap; - } - - /** - * Set the tableMap property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncDatabaseInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncDatabaseInput.java deleted file mode 100644 index f1a6cd7f12f6b..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncDatabaseInput.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Database specific information for SQL to Azure SQL DB sync migration task inputs. */ -@Fluent -public final class MigrateSqlServerSqlDbSyncDatabaseInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbSyncDatabaseInput.class); - - /* - * 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 the id property: Unique identifier for database. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: 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 the name property: Name of database. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 the targetDatabaseName property: Target database name. - * - * @return the targetDatabaseName value. - */ - public String targetDatabaseName() { - return this.targetDatabaseName; - } - - /** - * Set the targetDatabaseName property: 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 the schemaName property: Schema name to be migrated. - * - * @return the schemaName value. - */ - public String schemaName() { - return this.schemaName; - } - - /** - * Set the schemaName property: 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 the tableMap property: Mapping of source to target tables. - * - * @return the tableMap value. - */ - public Map tableMap() { - return this.tableMap; - } - - /** - * Set the tableMap property: 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 the migrationSetting property: Migration settings which tune the migration behavior. - * - * @return the migrationSetting value. - */ - public Map migrationSetting() { - return this.migrationSetting; - } - - /** - * Set the migrationSetting property: 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 the sourceSetting property: Source settings to tune source endpoint migration behavior. - * - * @return the sourceSetting value. - */ - public Map sourceSetting() { - return this.sourceSetting; - } - - /** - * Set the sourceSetting property: 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 the targetSetting property: Target settings to tune target endpoint migration behavior. - * - * @return the targetSetting value. - */ - public Map targetSetting() { - return this.targetSetting; - } - - /** - * Set the targetSetting property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskInput.java deleted file mode 100644 index 9e336bc475a14..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskInput.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for the task that migrates on-prem SQL Server databases to Azure SQL Database for online migrations. */ -@Fluent -public final class MigrateSqlServerSqlDbSyncTaskInput extends SqlMigrationTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbSyncTaskInput.class); - - /* - * Databases to migrate - */ - @JsonProperty(value = "selectedDatabases", required = true) - private List selectedDatabases; - - /* - * Validation options - */ - @JsonProperty(value = "validationOptions") - private MigrationValidationOptions validationOptions; - - /** - * Get the selectedDatabases property: Databases to migrate. - * - * @return the selectedDatabases value. - */ - public List selectedDatabases() { - return this.selectedDatabases; - } - - /** - * Set the selectedDatabases property: 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 the validationOptions property: Validation options. - * - * @return the validationOptions value. - */ - public MigrationValidationOptions validationOptions() { - return this.validationOptions; - } - - /** - * Set the validationOptions property: Validation options. - * - * @param validationOptions the validationOptions value to set. - * @return the MigrateSqlServerSqlDbSyncTaskInput object itself. - */ - public MigrateSqlServerSqlDbSyncTaskInput withValidationOptions(MigrationValidationOptions validationOptions) { - this.validationOptions = validationOptions; - return this; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlDbSyncTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { - super.withSourceConnectionInfo(sourceConnectionInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlDbSyncTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { - super.withTargetConnectionInfo(targetConnectionInfo); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (selectedDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedDatabases in model MigrateSqlServerSqlDbSyncTaskInput")); - } else { - selectedDatabases().forEach(e -> e.validate()); - } - if (validationOptions() != null) { - validationOptions().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutput.java deleted file mode 100644 index ebbcf594d3549..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutput.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** 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", - defaultImpl = MigrateSqlServerSqlDbSyncTaskOutput.class) -@JsonTypeName("MigrateSqlServerSqlDbSyncTaskOutput") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.class), - @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.class), - @JsonSubTypes.Type(name = "TableLevelOutput", value = MigrateSqlServerSqlDbSyncTaskOutputTableLevel.class), - @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlDbSyncTaskOutputError.class), - @JsonSubTypes.Type( - name = "DatabaseLevelErrorOutput", - value = MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.class) -}) -@Immutable -public class MigrateSqlServerSqlDbSyncTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbSyncTaskOutput.class); - - /* - * Result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java deleted file mode 100644 index cdd5adb684c87..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** The MigrateSqlServerSqlDbSyncTaskOutputDatabaseError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("DatabaseLevelErrorOutput") -@Fluent -public final class MigrateSqlServerSqlDbSyncTaskOutputDatabaseError extends MigrateSqlServerSqlDbSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbSyncTaskOutputDatabaseError.class); - - /* - * Error message - */ - @JsonProperty(value = "errorMessage") - private String errorMessage; - - /* - * List of error events. - */ - @JsonProperty(value = "events") - private List events; - - /** - * Get the errorMessage property: Error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: 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 the events property: List of error events. - * - * @return the events value. - */ - public List events() { - return this.events; - } - - /** - * Set the events property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (events() != null) { - events().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java deleted file mode 100644 index f04fdec7e341d..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.java +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** The MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("DatabaseLevelOutput") -@Immutable -public final class MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel.class); - - /* - * 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 OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Migration state that this database is in - */ - @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 the databaseName property: Name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the migrationState property: Migration state that this database is in. - * - * @return the migrationState value. - */ - public SyncDatabaseMigrationReportingState migrationState() { - return this.migrationState; - } - - /** - * Get the incomingChanges property: Number of incoming changes. - * - * @return the incomingChanges value. - */ - public Long incomingChanges() { - return this.incomingChanges; - } - - /** - * Get the appliedChanges property: Number of applied changes. - * - * @return the appliedChanges value. - */ - public Long appliedChanges() { - return this.appliedChanges; - } - - /** - * Get the cdcInsertCounter property: Number of cdc inserts. - * - * @return the cdcInsertCounter value. - */ - public Long cdcInsertCounter() { - return this.cdcInsertCounter; - } - - /** - * Get the cdcDeleteCounter property: Number of cdc deletes. - * - * @return the cdcDeleteCounter value. - */ - public Long cdcDeleteCounter() { - return this.cdcDeleteCounter; - } - - /** - * Get the cdcUpdateCounter property: Number of cdc updates. - * - * @return the cdcUpdateCounter value. - */ - public Long cdcUpdateCounter() { - return this.cdcUpdateCounter; - } - - /** - * Get the fullLoadCompletedTables property: Number of tables completed in full load. - * - * @return the fullLoadCompletedTables value. - */ - public Long fullLoadCompletedTables() { - return this.fullLoadCompletedTables; - } - - /** - * Get the fullLoadLoadingTables property: Number of tables loading in full load. - * - * @return the fullLoadLoadingTables value. - */ - public Long fullLoadLoadingTables() { - return this.fullLoadLoadingTables; - } - - /** - * Get the fullLoadQueuedTables property: Number of tables queued in full load. - * - * @return the fullLoadQueuedTables value. - */ - public Long fullLoadQueuedTables() { - return this.fullLoadQueuedTables; - } - - /** - * Get the fullLoadErroredTables property: Number of tables errored in full load. - * - * @return the fullLoadErroredTables value. - */ - public Long fullLoadErroredTables() { - return this.fullLoadErroredTables; - } - - /** - * Get the initializationCompleted property: Indicates if initial load (full load) has been completed. - * - * @return the initializationCompleted value. - */ - public Boolean initializationCompleted() { - return this.initializationCompleted; - } - - /** - * Get the latency property: CDC apply latency. - * - * @return the latency value. - */ - public Long latency() { - return this.latency; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputError.java deleted file mode 100644 index 6ccaf69fc2561..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputError.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -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") -@Immutable -public final class MigrateSqlServerSqlDbSyncTaskOutputError extends MigrateSqlServerSqlDbSyncTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbSyncTaskOutputError.class); - - /* - * Migration error - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ReportableException error; - - /** - * Get the error property: Migration error. - * - * @return the error value. - */ - public ReportableException error() { - return this.error; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java deleted file mode 100644 index dfebad2dd0963..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** The MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("MigrationLevelOutput") -@Immutable -public final class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel extends MigrateSqlServerSqlDbSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel.class); - - /* - * Migration start time - */ - @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the sourceServerVersion property: Source server version. - * - * @return the sourceServerVersion value. - */ - public String sourceServerVersion() { - return this.sourceServerVersion; - } - - /** - * Get the sourceServer property: Source server name. - * - * @return the sourceServer value. - */ - public String sourceServer() { - return this.sourceServer; - } - - /** - * Get the targetServerVersion property: Target server version. - * - * @return the targetServerVersion value. - */ - public String targetServerVersion() { - return this.targetServerVersion; - } - - /** - * Get the targetServer property: Target server name. - * - * @return the targetServer value. - */ - public String targetServer() { - return this.targetServer; - } - - /** - * Get the databaseCount property: Count of databases. - * - * @return the databaseCount value. - */ - public Integer databaseCount() { - return this.databaseCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java deleted file mode 100644 index ee0b43c563fd0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskOutputTableLevel.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** The MigrateSqlServerSqlDbSyncTaskOutputTableLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("TableLevelOutput") -@Immutable -public final class MigrateSqlServerSqlDbSyncTaskOutputTableLevel extends MigrateSqlServerSqlDbSyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbSyncTaskOutputTableLevel.class); - - /* - * 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 OffsetDateTime fullLoadEstFinishTime; - - /* - * Full load start time - */ - @JsonProperty(value = "fullLoadStartedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime fullLoadStartedOn; - - /* - * Full load end time - */ - @JsonProperty(value = "fullLoadEndedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 - */ - @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 OffsetDateTime lastModifiedTime; - - /** - * Get the tableName property: Name of the table. - * - * @return the tableName value. - */ - public String tableName() { - return this.tableName; - } - - /** - * Get the databaseName property: Name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the cdcInsertCounter property: Number of applied inserts. - * - * @return the cdcInsertCounter value. - */ - public Long cdcInsertCounter() { - return this.cdcInsertCounter; - } - - /** - * Get the cdcUpdateCounter property: Number of applied updates. - * - * @return the cdcUpdateCounter value. - */ - public Long cdcUpdateCounter() { - return this.cdcUpdateCounter; - } - - /** - * Get the cdcDeleteCounter property: Number of applied deletes. - * - * @return the cdcDeleteCounter value. - */ - public Long cdcDeleteCounter() { - return this.cdcDeleteCounter; - } - - /** - * Get the fullLoadEstFinishTime property: Estimate to finish full load. - * - * @return the fullLoadEstFinishTime value. - */ - public OffsetDateTime fullLoadEstFinishTime() { - return this.fullLoadEstFinishTime; - } - - /** - * Get the fullLoadStartedOn property: Full load start time. - * - * @return the fullLoadStartedOn value. - */ - public OffsetDateTime fullLoadStartedOn() { - return this.fullLoadStartedOn; - } - - /** - * Get the fullLoadEndedOn property: Full load end time. - * - * @return the fullLoadEndedOn value. - */ - public OffsetDateTime fullLoadEndedOn() { - return this.fullLoadEndedOn; - } - - /** - * Get the fullLoadTotalRows property: Number of rows applied in full load. - * - * @return the fullLoadTotalRows value. - */ - public Long fullLoadTotalRows() { - return this.fullLoadTotalRows; - } - - /** - * Get the state property: Current state of the table migration. - * - * @return the state value. - */ - public SyncTableMigrationState state() { - return this.state; - } - - /** - * Get the totalChangesApplied property: Total number of applied changes. - * - * @return the totalChangesApplied value. - */ - public Long totalChangesApplied() { - return this.totalChangesApplied; - } - - /** - * Get the dataErrorsCounter property: Number of data errors occurred. - * - * @return the dataErrorsCounter value. - */ - public Long dataErrorsCounter() { - return this.dataErrorsCounter; - } - - /** - * Get the lastModifiedTime property: Last modified time on target. - * - * @return the lastModifiedTime value. - */ - public OffsetDateTime lastModifiedTime() { - return this.lastModifiedTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskProperties.java deleted file mode 100644 index 13f16a3264acf..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbSyncTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class MigrateSqlServerSqlDbSyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbSyncTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public MigrateSqlServerSqlDbSyncTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskInput.java deleted file mode 100644 index 39ae8e48b5178..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskInput.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for the task that migrates on-prem SQL Server databases to Azure SQL Database. */ -@Fluent -public final class MigrateSqlServerSqlDbTaskInput extends SqlMigrationTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbTaskInput.class); - - /* - * 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 the selectedDatabases property: Databases to migrate. - * - * @return the selectedDatabases value. - */ - public List selectedDatabases() { - return this.selectedDatabases; - } - - /** - * Set the selectedDatabases property: 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 the validationOptions property: 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 the validationOptions property: 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; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlDbTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { - super.withSourceConnectionInfo(sourceConnectionInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlDbTaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { - super.withTargetConnectionInfo(targetConnectionInfo); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (selectedDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedDatabases in model MigrateSqlServerSqlDbTaskInput")); - } else { - selectedDatabases().forEach(e -> e.validate()); - } - if (validationOptions() != null) { - validationOptions().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutput.java deleted file mode 100644 index 3f66df0779b1b..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutput.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** 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", - defaultImpl = MigrateSqlServerSqlDbTaskOutput.class) -@JsonTypeName("MigrateSqlServerSqlDbTaskOutput") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlDbTaskOutputMigrationLevel.class), - @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlDbTaskOutputDatabaseLevel.class), - @JsonSubTypes.Type(name = "TableLevelOutput", value = MigrateSqlServerSqlDbTaskOutputTableLevel.class), - @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlDbTaskOutputError.class), - @JsonSubTypes.Type( - name = "MigrationValidationOutput", - value = MigrateSqlServerSqlDbTaskOutputValidationResult.class), - @JsonSubTypes.Type( - name = "MigrationDatabaseLevelValidationOutput", - value = MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult.class) -}) -@Immutable -public class MigrateSqlServerSqlDbTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbTaskOutput.class); - - /* - * Result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java deleted file mode 100644 index 1c703912e8720..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Database level result for Sql Server to Azure Sql DB migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("DatabaseLevelOutput") -@Immutable -public final class MigrateSqlServerSqlDbTaskOutputDatabaseLevel extends MigrateSqlServerSqlDbTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbTaskOutputDatabaseLevel.class); - - /* - * 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 OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Current state of migration - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private MigrationState state; - - /* - * Migration stage that this database is in - */ - @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 String objectSummary; - - /** - * Get the databaseName property: Name of the item. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the state property: Current state of migration. - * - * @return the state value. - */ - public MigrationState state() { - return this.state; - } - - /** - * Get the stage property: Migration stage that this database is in. - * - * @return the stage value. - */ - public DatabaseMigrationStage stage() { - return this.stage; - } - - /** - * Get the statusMessage property: Status message. - * - * @return the statusMessage value. - */ - public String statusMessage() { - return this.statusMessage; - } - - /** - * Get the message property: Migration progress message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the numberOfObjects property: Number of objects. - * - * @return the numberOfObjects value. - */ - public Long numberOfObjects() { - return this.numberOfObjects; - } - - /** - * Get the numberOfObjectsCompleted property: Number of successfully completed objects. - * - * @return the numberOfObjectsCompleted value. - */ - public Long numberOfObjectsCompleted() { - return this.numberOfObjectsCompleted; - } - - /** - * Get the errorCount property: Number of database/object errors. - * - * @return the errorCount value. - */ - public Long errorCount() { - return this.errorCount; - } - - /** - * Get the errorPrefix property: Wildcard string prefix to use for querying all errors of the item. - * - * @return the errorPrefix value. - */ - public String errorPrefix() { - return this.errorPrefix; - } - - /** - * Get the resultPrefix property: 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 the exceptionsAndWarnings property: Migration exceptions and warnings. - * - * @return the exceptionsAndWarnings value. - */ - public List exceptionsAndWarnings() { - return this.exceptionsAndWarnings; - } - - /** - * Get the objectSummary property: Summary of object results in the migration. - * - * @return the objectSummary value. - */ - public String objectSummary() { - return this.objectSummary; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (exceptionsAndWarnings() != null) { - exceptionsAndWarnings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult.java deleted file mode 100644 index e07d45443b0c0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Database validation result for Sql Server to Azure Sql DB migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("MigrationDatabaseLevelValidationOutput") -@Immutable -public final class MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult - extends MigrateSqlServerSqlDbTaskOutput { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult.class); - - /* - * 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 OffsetDateTime startedOn; - - /* - * Validation end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private ValidationStatus status; - - /** - * Get the migrationId property: Migration Identifier. - * - * @return the migrationId value. - */ - public String migrationId() { - return this.migrationId; - } - - /** - * Get the sourceDatabaseName property: Name of the source database. - * - * @return the sourceDatabaseName value. - */ - public String sourceDatabaseName() { - return this.sourceDatabaseName; - } - - /** - * Get the targetDatabaseName property: Name of the target database. - * - * @return the targetDatabaseName value. - */ - public String targetDatabaseName() { - return this.targetDatabaseName; - } - - /** - * Get the startedOn property: Validation start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Validation end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the dataIntegrityValidationResult property: 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 the schemaValidationResult property: Provides schema comparison result between source and target database. - * - * @return the schemaValidationResult value. - */ - public SchemaComparisonValidationResult schemaValidationResult() { - return this.schemaValidationResult; - } - - /** - * Get the queryAnalysisValidationResult property: Results of some of the query execution result between source and - * target database. - * - * @return the queryAnalysisValidationResult value. - */ - public QueryAnalysisValidationResult queryAnalysisValidationResult() { - return this.queryAnalysisValidationResult; - } - - /** - * Get the status property: Current status of validation at the database level. - * - * @return the status value. - */ - public ValidationStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataIntegrityValidationResult() != null) { - dataIntegrityValidationResult().validate(); - } - if (schemaValidationResult() != null) { - schemaValidationResult().validate(); - } - if (queryAnalysisValidationResult() != null) { - queryAnalysisValidationResult().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputError.java deleted file mode 100644 index b2bac53fd16c4..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputError.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -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") -@Immutable -public final class MigrateSqlServerSqlDbTaskOutputError extends MigrateSqlServerSqlDbTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbTaskOutputError.class); - - /* - * Migration error - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ReportableException error; - - /** - * Get the error property: Migration error. - * - * @return the error value. - */ - public ReportableException error() { - return this.error; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java deleted file mode 100644 index 0b56679694dd2..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputMigrationLevel.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Migration level result for Sql server to Azure Sql DB migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("MigrationLevelOutput") -@Immutable -public final class MigrateSqlServerSqlDbTaskOutputMigrationLevel extends MigrateSqlServerSqlDbTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbTaskOutputMigrationLevel.class); - - /* - * Migration start time - */ - @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Duration of task execution in seconds. - */ - @JsonProperty(value = "durationInSeconds", access = JsonProperty.Access.WRITE_ONLY) - private Long durationInSeconds; - - /* - * Current status of migration - */ - @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 String databases; - - /* - * Summary of database results in the migration - */ - @JsonProperty(value = "databaseSummary", access = JsonProperty.Access.WRITE_ONLY) - private String databaseSummary; - - /* - * Migration Report Result, provides unique url for downloading your - * migration report. - */ - @JsonProperty(value = "migrationReport", access = JsonProperty.Access.WRITE_ONLY) - private MigrationReportResult migrationReport; - - /* - * 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 the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the durationInSeconds property: Duration of task execution in seconds. - * - * @return the durationInSeconds value. - */ - public Long durationInSeconds() { - return this.durationInSeconds; - } - - /** - * Get the status property: Current status of migration. - * - * @return the status value. - */ - public MigrationStatus status() { - return this.status; - } - - /** - * Get the statusMessage property: Migration status message. - * - * @return the statusMessage value. - */ - public String statusMessage() { - return this.statusMessage; - } - - /** - * Get the message property: Migration progress message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the databases property: Selected databases as a map from database name to database id. - * - * @return the databases value. - */ - public String databases() { - return this.databases; - } - - /** - * Get the databaseSummary property: Summary of database results in the migration. - * - * @return the databaseSummary value. - */ - public String databaseSummary() { - return this.databaseSummary; - } - - /** - * Get the migrationReport property: Migration Report Result, provides unique url for downloading your migration - * report. - * - * @return the migrationReport value. - */ - public MigrationReportResult migrationReport() { - return this.migrationReport; - } - - /** - * Get the sourceServerVersion property: Source server version. - * - * @return the sourceServerVersion value. - */ - public String sourceServerVersion() { - return this.sourceServerVersion; - } - - /** - * Get the sourceServerBrandVersion property: Source server brand version. - * - * @return the sourceServerBrandVersion value. - */ - public String sourceServerBrandVersion() { - return this.sourceServerBrandVersion; - } - - /** - * Get the targetServerVersion property: Target server version. - * - * @return the targetServerVersion value. - */ - public String targetServerVersion() { - return this.targetServerVersion; - } - - /** - * Get the targetServerBrandVersion property: Target server brand version. - * - * @return the targetServerBrandVersion value. - */ - public String targetServerBrandVersion() { - return this.targetServerBrandVersion; - } - - /** - * Get the exceptionsAndWarnings property: Migration exceptions and warnings. - * - * @return the exceptionsAndWarnings value. - */ - public List exceptionsAndWarnings() { - return this.exceptionsAndWarnings; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (migrationReport() != null) { - migrationReport().validate(); - } - if (exceptionsAndWarnings() != null) { - exceptionsAndWarnings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputTableLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputTableLevel.java deleted file mode 100644 index 94444ea7231bc..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputTableLevel.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Table level result for Sql Server to Azure Sql DB migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("TableLevelOutput") -@Immutable -public final class MigrateSqlServerSqlDbTaskOutputTableLevel extends MigrateSqlServerSqlDbTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbTaskOutputTableLevel.class); - - /* - * 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 OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Current state of migration - */ - @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 the objectName property: Name of the item. - * - * @return the objectName value. - */ - public String objectName() { - return this.objectName; - } - - /** - * Get the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the state property: Current state of migration. - * - * @return the state value. - */ - public MigrationState state() { - return this.state; - } - - /** - * Get the statusMessage property: Status message. - * - * @return the statusMessage value. - */ - public String statusMessage() { - return this.statusMessage; - } - - /** - * Get the itemsCount property: Number of items. - * - * @return the itemsCount value. - */ - public Long itemsCount() { - return this.itemsCount; - } - - /** - * Get the itemsCompletedCount property: Number of successfully completed items. - * - * @return the itemsCompletedCount value. - */ - public Long itemsCompletedCount() { - return this.itemsCompletedCount; - } - - /** - * Get the errorPrefix property: Wildcard string prefix to use for querying all errors of the item. - * - * @return the errorPrefix value. - */ - public String errorPrefix() { - return this.errorPrefix; - } - - /** - * Get the resultPrefix property: Wildcard string prefix to use for querying all sub-tem results of the item. - * - * @return the resultPrefix value. - */ - public String resultPrefix() { - return this.resultPrefix; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputValidationResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputValidationResult.java deleted file mode 100644 index 8715b6c44e8b0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskOutputValidationResult.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Validation result for Sql Server to Azure Sql DB migration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("MigrationValidationOutput") -@Fluent -public final class MigrateSqlServerSqlDbTaskOutputValidationResult extends MigrateSqlServerSqlDbTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbTaskOutputValidationResult.class); - - /* - * 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. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private ValidationStatus status; - - /** - * Get the migrationId property: Migration Identifier. - * - * @return the migrationId value. - */ - public String migrationId() { - return this.migrationId; - } - - /** - * Get the summaryResults property: Validation summary results for each database. - * - * @return the summaryResults value. - */ - public Map summaryResults() { - return this.summaryResults; - } - - /** - * Set the summaryResults property: Validation summary results for each database. - * - * @param summaryResults the summaryResults value to set. - * @return the MigrateSqlServerSqlDbTaskOutputValidationResult object itself. - */ - public MigrateSqlServerSqlDbTaskOutputValidationResult withSummaryResults( - Map summaryResults) { - this.summaryResults = summaryResults; - return this; - } - - /** - * Get the status property: Current status of validation at the migration level. Status from the database validation - * result status will be aggregated here. - * - * @return the status value. - */ - public ValidationStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (summaryResults() != null) { - summaryResults() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskProperties.java deleted file mode 100644 index 02739b1bac63e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlDbTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class MigrateSqlServerSqlDbTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlDbTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public MigrateSqlServerSqlDbTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMIDatabaseInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMIDatabaseInput.java deleted file mode 100644 index f4e3bfb02f0c8..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMIDatabaseInput.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Database specific information for SQL to Azure SQL DB Managed Instance migration task inputs. */ -@Fluent -public final class MigrateSqlServerSqlMIDatabaseInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMIDatabaseInput.class); - - /* - * 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 the name property: Name of the database. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 the restoreDatabaseName property: Name of the database at destination. - * - * @return the restoreDatabaseName value. - */ - public String restoreDatabaseName() { - return this.restoreDatabaseName; - } - - /** - * Set the restoreDatabaseName property: 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 the backupFileShare property: Backup file share information for backing up this database. - * - * @return the backupFileShare value. - */ - public FileShare backupFileShare() { - return this.backupFileShare; - } - - /** - * Set the backupFileShare property: 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 backupFilePaths property: 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 backupFilePaths property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property name in model MigrateSqlServerSqlMIDatabaseInput")); - } - if (restoreDatabaseName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property restoreDatabaseName in model MigrateSqlServerSqlMIDatabaseInput")); - } - if (backupFileShare() != null) { - backupFileShare().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskInput.java deleted file mode 100644 index 1dc136339c640..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskInput.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. */ -@Immutable -public final class MigrateSqlServerSqlMISyncTaskInput extends SqlServerSqlMISyncTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMISyncTaskInput.class); - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlMISyncTaskInput withSelectedDatabases( - List selectedDatabases) { - super.withSelectedDatabases(selectedDatabases); - return this; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlMISyncTaskInput withBackupFileShare(FileShare backupFileShare) { - super.withBackupFileShare(backupFileShare); - return this; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlMISyncTaskInput withStorageResourceId(String storageResourceId) { - super.withStorageResourceId(storageResourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlMISyncTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { - super.withSourceConnectionInfo(sourceConnectionInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlMISyncTaskInput withTargetConnectionInfo(MiSqlConnectionInfo targetConnectionInfo) { - super.withTargetConnectionInfo(targetConnectionInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlMISyncTaskInput withAzureApp(AzureActiveDirectoryApp azureApp) { - super.withAzureApp(azureApp); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutput.java deleted file mode 100644 index 137cbc8c1c9b4..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutput.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Output for task that migrates SQL Server databases to Azure SQL Database Managed Instance using Log Replay Service. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "resultType", - defaultImpl = MigrateSqlServerSqlMISyncTaskOutput.class) -@JsonTypeName("MigrateSqlServerSqlMISyncTaskOutput") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.class), - @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.class), - @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlMISyncTaskOutputError.class) -}) -@Immutable -public class MigrateSqlServerSqlMISyncTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMISyncTaskOutput.class); - - /* - * Result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java deleted file mode 100644 index 76aff2adacc64..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** The MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("DatabaseLevelOutput") -@Immutable -public final class MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel extends MigrateSqlServerSqlMISyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel.class); - - /* - * Name of the database - */ - @JsonProperty(value = "sourceDatabaseName", access = JsonProperty.Access.WRITE_ONLY) - private String sourceDatabaseName; - - /* - * Current state of database - */ - @JsonProperty(value = "migrationState", access = JsonProperty.Access.WRITE_ONLY) - private DatabaseMigrationState migrationState; - - /* - * Database migration start time - */ - @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startedOn; - - /* - * Database migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Details of full backup set - */ - @JsonProperty(value = "fullBackupSetInfo", access = JsonProperty.Access.WRITE_ONLY) - private BackupSetInfo fullBackupSetInfo; - - /* - * Last applied backup set information - */ - @JsonProperty(value = "lastRestoredBackupSetInfo", access = JsonProperty.Access.WRITE_ONLY) - private BackupSetInfo lastRestoredBackupSetInfo; - - /* - * Backup sets that are currently active (Either being uploaded or getting - * restored) - */ - @JsonProperty(value = "activeBackupSets", access = JsonProperty.Access.WRITE_ONLY) - private List activeBackupSets; - - /* - * Name of container created in the Azure Storage account where backups are - * copied to - */ - @JsonProperty(value = "containerName", access = JsonProperty.Access.WRITE_ONLY) - private String containerName; - - /* - * prefix string to use for querying errors for this database - */ - @JsonProperty(value = "errorPrefix", access = JsonProperty.Access.WRITE_ONLY) - private String errorPrefix; - - /* - * Whether full backup has been applied to the target database or not - */ - @JsonProperty(value = "isFullBackupRestored", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isFullBackupRestored; - - /* - * Migration exceptions and warnings - */ - @JsonProperty(value = "exceptionsAndWarnings", access = JsonProperty.Access.WRITE_ONLY) - private List exceptionsAndWarnings; - - /** - * Get the sourceDatabaseName property: Name of the database. - * - * @return the sourceDatabaseName value. - */ - public String sourceDatabaseName() { - return this.sourceDatabaseName; - } - - /** - * Get the migrationState property: Current state of database. - * - * @return the migrationState value. - */ - public DatabaseMigrationState migrationState() { - return this.migrationState; - } - - /** - * Get the startedOn property: Database migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Database migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the fullBackupSetInfo property: Details of full backup set. - * - * @return the fullBackupSetInfo value. - */ - public BackupSetInfo fullBackupSetInfo() { - return this.fullBackupSetInfo; - } - - /** - * Get the lastRestoredBackupSetInfo property: Last applied backup set information. - * - * @return the lastRestoredBackupSetInfo value. - */ - public BackupSetInfo lastRestoredBackupSetInfo() { - return this.lastRestoredBackupSetInfo; - } - - /** - * Get the activeBackupSets property: Backup sets that are currently active (Either being uploaded or getting - * restored). - * - * @return the activeBackupSets value. - */ - public List activeBackupSets() { - return this.activeBackupSets; - } - - /** - * Get the containerName property: Name of container created in the Azure Storage account where backups are copied - * to. - * - * @return the containerName value. - */ - public String containerName() { - return this.containerName; - } - - /** - * Get the errorPrefix property: prefix string to use for querying errors for this database. - * - * @return the errorPrefix value. - */ - public String errorPrefix() { - return this.errorPrefix; - } - - /** - * Get the isFullBackupRestored property: Whether full backup has been applied to the target database or not. - * - * @return the isFullBackupRestored value. - */ - public Boolean isFullBackupRestored() { - return this.isFullBackupRestored; - } - - /** - * Get the exceptionsAndWarnings property: Migration exceptions and warnings. - * - * @return the exceptionsAndWarnings value. - */ - public List exceptionsAndWarnings() { - return this.exceptionsAndWarnings; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (fullBackupSetInfo() != null) { - fullBackupSetInfo().validate(); - } - if (lastRestoredBackupSetInfo() != null) { - lastRestoredBackupSetInfo().validate(); - } - if (activeBackupSets() != null) { - activeBackupSets().forEach(e -> e.validate()); - } - if (exceptionsAndWarnings() != null) { - exceptionsAndWarnings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputError.java deleted file mode 100644 index a239e5eaaba17..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputError.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The MigrateSqlServerSqlMISyncTaskOutputError model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("ErrorOutput") -@Immutable -public final class MigrateSqlServerSqlMISyncTaskOutputError extends MigrateSqlServerSqlMISyncTaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMISyncTaskOutputError.class); - - /* - * Migration error - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ReportableException error; - - /** - * Get the error property: Migration error. - * - * @return the error value. - */ - public ReportableException error() { - return this.error; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java deleted file mode 100644 index 282c621db73c8..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** The MigrateSqlServerSqlMISyncTaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("MigrationLevelOutput") -@Immutable -public final class MigrateSqlServerSqlMISyncTaskOutputMigrationLevel extends MigrateSqlServerSqlMISyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMISyncTaskOutputMigrationLevel.class); - - /* - * Count of databases - */ - @JsonProperty(value = "databaseCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer databaseCount; - - /* - * Current state of migration - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private MigrationState state; - - /* - * Migration start time - */ - @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Source server name - */ - @JsonProperty(value = "sourceServerName", access = JsonProperty.Access.WRITE_ONLY) - private String sourceServerName; - - /* - * Source server version - */ - @JsonProperty(value = "sourceServerVersion", access = JsonProperty.Access.WRITE_ONLY) - private String sourceServerVersion; - - /* - * Source server brand version - */ - @JsonProperty(value = "sourceServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) - private String sourceServerBrandVersion; - - /* - * Target server name - */ - @JsonProperty(value = "targetServerName", access = JsonProperty.Access.WRITE_ONLY) - private String targetServerName; - - /* - * Target server version - */ - @JsonProperty(value = "targetServerVersion", access = JsonProperty.Access.WRITE_ONLY) - private String targetServerVersion; - - /* - * Target server brand version - */ - @JsonProperty(value = "targetServerBrandVersion", access = JsonProperty.Access.WRITE_ONLY) - private String targetServerBrandVersion; - - /* - * Number of database level errors - */ - @JsonProperty(value = "databaseErrorCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer databaseErrorCount; - - /** - * Get the databaseCount property: Count of databases. - * - * @return the databaseCount value. - */ - public Integer databaseCount() { - return this.databaseCount; - } - - /** - * Get the state property: Current state of migration. - * - * @return the state value. - */ - public MigrationState state() { - return this.state; - } - - /** - * Get the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the sourceServerName property: Source server name. - * - * @return the sourceServerName value. - */ - public String sourceServerName() { - return this.sourceServerName; - } - - /** - * Get the sourceServerVersion property: Source server version. - * - * @return the sourceServerVersion value. - */ - public String sourceServerVersion() { - return this.sourceServerVersion; - } - - /** - * Get the sourceServerBrandVersion property: Source server brand version. - * - * @return the sourceServerBrandVersion value. - */ - public String sourceServerBrandVersion() { - return this.sourceServerBrandVersion; - } - - /** - * Get the targetServerName property: Target server name. - * - * @return the targetServerName value. - */ - public String targetServerName() { - return this.targetServerName; - } - - /** - * Get the targetServerVersion property: Target server version. - * - * @return the targetServerVersion value. - */ - public String targetServerVersion() { - return this.targetServerVersion; - } - - /** - * Get the targetServerBrandVersion property: Target server brand version. - * - * @return the targetServerBrandVersion value. - */ - public String targetServerBrandVersion() { - return this.targetServerBrandVersion; - } - - /** - * Get the databaseErrorCount property: Number of database level errors. - * - * @return the databaseErrorCount value. - */ - public Integer databaseErrorCount() { - return this.databaseErrorCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskProperties.java deleted file mode 100644 index 701a543f25c67..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMISyncTaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Properties for task that migrates SQL Server databases to Azure SQL Database Managed Instance sync scenario. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("Migrate.SqlServer.AzureSqlDbMI.Sync.LRS") -@Fluent -public final class MigrateSqlServerSqlMISyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMISyncTaskProperties.class); - - /* - * Task input - */ - @JsonProperty(value = "input") - private MigrateSqlServerSqlMISyncTaskInput input; - - /* - * Task output. This is ignored if submitted. - */ - @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) - private List output; - - /** - * Get the input property: Task input. - * - * @return the input value. - */ - public MigrateSqlServerSqlMISyncTaskInput input() { - return this.input; - } - - /** - * Set the input property: Task input. - * - * @param input the input value to set. - * @return the MigrateSqlServerSqlMISyncTaskProperties object itself. - */ - public MigrateSqlServerSqlMISyncTaskProperties withInput(MigrateSqlServerSqlMISyncTaskInput input) { - this.input = input; - return this; - } - - /** - * Get the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskInput.java deleted file mode 100644 index 5a876c15923f8..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskInput.java +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance. */ -@Fluent -public final class MigrateSqlServerSqlMITaskInput extends SqlMigrationTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMITaskInput.class); - - /* - * 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. - */ - @JsonProperty(value = "backupMode") - private BackupMode backupMode; - - /** - * Get the selectedDatabases property: Databases to migrate. - * - * @return the selectedDatabases value. - */ - public List selectedDatabases() { - return this.selectedDatabases; - } - - /** - * Set the selectedDatabases property: 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 the selectedLogins property: Logins to migrate. - * - * @return the selectedLogins value. - */ - public List selectedLogins() { - return this.selectedLogins; - } - - /** - * Set the selectedLogins property: 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 the selectedAgentJobs property: Agent Jobs to migrate. - * - * @return the selectedAgentJobs value. - */ - public List selectedAgentJobs() { - return this.selectedAgentJobs; - } - - /** - * Set the selectedAgentJobs property: 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 the backupFileShare property: Backup file share information for all selected databases. - * - * @return the backupFileShare value. - */ - public FileShare backupFileShare() { - return this.backupFileShare; - } - - /** - * Set the backupFileShare property: 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 the backupBlobShare property: 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 the backupBlobShare property: 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 the backupMode property: 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. - * - * @return the backupMode value. - */ - public BackupMode backupMode() { - return this.backupMode; - } - - /** - * Set the backupMode property: 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. - * - * @param backupMode the backupMode value to set. - * @return the MigrateSqlServerSqlMITaskInput object itself. - */ - public MigrateSqlServerSqlMITaskInput withBackupMode(BackupMode backupMode) { - this.backupMode = backupMode; - return this; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlMITaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { - super.withSourceConnectionInfo(sourceConnectionInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public MigrateSqlServerSqlMITaskInput withTargetConnectionInfo(SqlConnectionInfo targetConnectionInfo) { - super.withTargetConnectionInfo(targetConnectionInfo); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (selectedDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedDatabases in model MigrateSqlServerSqlMITaskInput")); - } else { - selectedDatabases().forEach(e -> e.validate()); - } - if (backupFileShare() != null) { - backupFileShare().validate(); - } - if (backupBlobShare() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property backupBlobShare in model MigrateSqlServerSqlMITaskInput")); - } else { - backupBlobShare().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutput.java deleted file mode 100644 index c5197a96833cd..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutput.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** 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", - defaultImpl = MigrateSqlServerSqlMITaskOutput.class) -@JsonTypeName("MigrateSqlServerSqlMITaskOutput") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "MigrationLevelOutput", value = MigrateSqlServerSqlMITaskOutputMigrationLevel.class), - @JsonSubTypes.Type(name = "DatabaseLevelOutput", value = MigrateSqlServerSqlMITaskOutputDatabaseLevel.class), - @JsonSubTypes.Type(name = "AgentJobLevelOutput", value = MigrateSqlServerSqlMITaskOutputAgentJobLevel.class), - @JsonSubTypes.Type(name = "LoginLevelOutput", value = MigrateSqlServerSqlMITaskOutputLoginLevel.class), - @JsonSubTypes.Type(name = "ErrorOutput", value = MigrateSqlServerSqlMITaskOutputError.class) -}) -@Immutable -public class MigrateSqlServerSqlMITaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMITaskOutput.class); - - /* - * Result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java deleted file mode 100644 index e2a4edb1053aa..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputAgentJobLevel.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** The MigrateSqlServerSqlMITaskOutputAgentJobLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("AgentJobLevelOutput") -@Immutable -public final class MigrateSqlServerSqlMITaskOutputAgentJobLevel extends MigrateSqlServerSqlMITaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMITaskOutputAgentJobLevel.class); - - /* - * 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 - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private MigrationState state; - - /* - * Migration start time - */ - @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 the name property: Agent Job name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isEnabled property: The state of the original Agent Job. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * Get the state property: Current state of migration. - * - * @return the state value. - */ - public MigrationState state() { - return this.state; - } - - /** - * Get the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the message property: Migration progress message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the exceptionsAndWarnings property: Migration errors and warnings per job. - * - * @return the exceptionsAndWarnings value. - */ - public List exceptionsAndWarnings() { - return this.exceptionsAndWarnings; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (exceptionsAndWarnings() != null) { - exceptionsAndWarnings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java deleted file mode 100644 index bfd652a8df965..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputDatabaseLevel.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** The MigrateSqlServerSqlMITaskOutputDatabaseLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("DatabaseLevelOutput") -@Immutable -public final class MigrateSqlServerSqlMITaskOutputDatabaseLevel extends MigrateSqlServerSqlMITaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMITaskOutputDatabaseLevel.class); - - /* - * 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 - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private MigrationState state; - - /* - * Current stage of migration - */ - @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) - private DatabaseMigrationStage stage; - - /* - * Migration start time - */ - @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 the databaseName property: Name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the sizeMB property: Size of the database in megabytes. - * - * @return the sizeMB value. - */ - public Double sizeMB() { - return this.sizeMB; - } - - /** - * Get the state property: Current state of migration. - * - * @return the state value. - */ - public MigrationState state() { - return this.state; - } - - /** - * Get the stage property: Current stage of migration. - * - * @return the stage value. - */ - public DatabaseMigrationStage stage() { - return this.stage; - } - - /** - * Get the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the message property: Migration progress message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the exceptionsAndWarnings property: Migration exceptions and warnings. - * - * @return the exceptionsAndWarnings value. - */ - public List exceptionsAndWarnings() { - return this.exceptionsAndWarnings; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (exceptionsAndWarnings() != null) { - exceptionsAndWarnings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputError.java deleted file mode 100644 index eab59bdb35a42..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputError.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -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") -@Immutable -public final class MigrateSqlServerSqlMITaskOutputError extends MigrateSqlServerSqlMITaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMITaskOutputError.class); - - /* - * Migration error - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ReportableException error; - - /** - * Get the error property: Migration error. - * - * @return the error value. - */ - public ReportableException error() { - return this.error; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputLoginLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputLoginLevel.java deleted file mode 100644 index ef4f55405c3b6..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputLoginLevel.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** The MigrateSqlServerSqlMITaskOutputLoginLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("LoginLevelOutput") -@Immutable -public final class MigrateSqlServerSqlMITaskOutputLoginLevel extends MigrateSqlServerSqlMITaskOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMITaskOutputLoginLevel.class); - - /* - * Login name. - */ - @JsonProperty(value = "loginName", access = JsonProperty.Access.WRITE_ONLY) - private String loginName; - - /* - * Current state of login - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private MigrationState state; - - /* - * Current stage of login - */ - @JsonProperty(value = "stage", access = JsonProperty.Access.WRITE_ONLY) - private LoginMigrationStage stage; - - /* - * Login migration start time - */ - @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startedOn; - - /* - * Login migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime 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 the loginName property: Login name. - * - * @return the loginName value. - */ - public String loginName() { - return this.loginName; - } - - /** - * Get the state property: Current state of login. - * - * @return the state value. - */ - public MigrationState state() { - return this.state; - } - - /** - * Get the stage property: Current stage of login. - * - * @return the stage value. - */ - public LoginMigrationStage stage() { - return this.stage; - } - - /** - * Get the startedOn property: Login migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Login migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the message property: Login migration progress message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the exceptionsAndWarnings property: Login migration errors and warnings per login. - * - * @return the exceptionsAndWarnings value. - */ - public List exceptionsAndWarnings() { - return this.exceptionsAndWarnings; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (exceptionsAndWarnings() != null) { - exceptionsAndWarnings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputMigrationLevel.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputMigrationLevel.java deleted file mode 100644 index 34b77e48316cb..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskOutputMigrationLevel.java +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** The MigrateSqlServerSqlMITaskOutputMigrationLevel model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") -@JsonTypeName("MigrationLevelOutput") -@Immutable -public final class MigrateSqlServerSqlMITaskOutputMigrationLevel extends MigrateSqlServerSqlMITaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMITaskOutputMigrationLevel.class); - - /* - * Migration start time - */ - @JsonProperty(value = "startedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startedOn; - - /* - * Migration end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Current status of migration - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private MigrationStatus status; - - /* - * Current state of migration - */ - @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 String agentJobs; - - /* - * Selected logins as a map from name to id - */ - @JsonProperty(value = "logins", access = JsonProperty.Access.WRITE_ONLY) - private String 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 String serverRoleResults; - - /* - * List of orphaned users. - */ - @JsonProperty(value = "orphanedUsersInfo", access = JsonProperty.Access.WRITE_ONLY) - private List orphanedUsersInfo; - - /* - * Selected databases as a map from database name to database id - */ - @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) - private String 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 the startedOn property: Migration start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Migration end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the status property: Current status of migration. - * - * @return the status value. - */ - public MigrationStatus status() { - return this.status; - } - - /** - * Get the state property: Current state of migration. - * - * @return the state value. - */ - public MigrationState state() { - return this.state; - } - - /** - * Get the agentJobs property: Selected agent jobs as a map from name to id. - * - * @return the agentJobs value. - */ - public String agentJobs() { - return this.agentJobs; - } - - /** - * Get the logins property: Selected logins as a map from name to id. - * - * @return the logins value. - */ - public String logins() { - return this.logins; - } - - /** - * Get the message property: Migration progress message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the serverRoleResults property: Map of server role migration results. - * - * @return the serverRoleResults value. - */ - public String serverRoleResults() { - return this.serverRoleResults; - } - - /** - * Get the orphanedUsersInfo property: List of orphaned users. - * - * @return the orphanedUsersInfo value. - */ - public List orphanedUsersInfo() { - return this.orphanedUsersInfo; - } - - /** - * Get the databases property: Selected databases as a map from database name to database id. - * - * @return the databases value. - */ - public String databases() { - return this.databases; - } - - /** - * Get the sourceServerVersion property: Source server version. - * - * @return the sourceServerVersion value. - */ - public String sourceServerVersion() { - return this.sourceServerVersion; - } - - /** - * Get the sourceServerBrandVersion property: Source server brand version. - * - * @return the sourceServerBrandVersion value. - */ - public String sourceServerBrandVersion() { - return this.sourceServerBrandVersion; - } - - /** - * Get the targetServerVersion property: Target server version. - * - * @return the targetServerVersion value. - */ - public String targetServerVersion() { - return this.targetServerVersion; - } - - /** - * Get the targetServerBrandVersion property: Target server brand version. - * - * @return the targetServerBrandVersion value. - */ - public String targetServerBrandVersion() { - return this.targetServerBrandVersion; - } - - /** - * Get the exceptionsAndWarnings property: Migration exceptions and warnings. - * - * @return the exceptionsAndWarnings value. - */ - public List exceptionsAndWarnings() { - return this.exceptionsAndWarnings; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (orphanedUsersInfo() != null) { - orphanedUsersInfo().forEach(e -> e.validate()); - } - if (exceptionsAndWarnings() != null) { - exceptionsAndWarnings().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskProperties.java deleted file mode 100644 index 139586f0bd3c1..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSqlServerSqlMITaskProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class MigrateSqlServerSqlMITaskProperties extends ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSqlServerSqlMITaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public MigrateSqlServerSqlMITaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandInput.java deleted file mode 100644 index 8afe850739aeb..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandInput.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Input for command that completes sync migration for a database. */ -@Fluent -public final class MigrateSyncCompleteCommandInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSyncCompleteCommandInput.class); - - /* - * Name of database - */ - @JsonProperty(value = "databaseName", required = true) - private String databaseName; - - /* - * Time stamp to complete - */ - @JsonProperty(value = "commitTimeStamp") - private OffsetDateTime commitTimestamp; - - /** - * Get the databaseName property: Name of database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Set the databaseName property: 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 the commitTimestamp property: Time stamp to complete. - * - * @return the commitTimestamp value. - */ - public OffsetDateTime commitTimestamp() { - return this.commitTimestamp; - } - - /** - * Set the commitTimestamp property: Time stamp to complete. - * - * @param commitTimestamp the commitTimestamp value to set. - * @return the MigrateSyncCompleteCommandInput object itself. - */ - public MigrateSyncCompleteCommandInput withCommitTimestamp(OffsetDateTime commitTimestamp) { - this.commitTimestamp = commitTimestamp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (databaseName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property databaseName in model MigrateSyncCompleteCommandInput")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandOutput.java deleted file mode 100644 index 8a1a1fb5b7670..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandOutput.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for command that completes sync migration for a database. */ -@Immutable -public final class MigrateSyncCompleteCommandOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSyncCompleteCommandOutput.class); - - /* - * Result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * List of errors that happened during the command execution - */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) - private List errors; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the errors property: List of errors that happened during the command execution. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandProperties.java deleted file mode 100644 index 164677855ca81..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrateSyncCompleteCommandProperties.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** 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") -@Fluent -public final class MigrateSyncCompleteCommandProperties extends CommandProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateSyncCompleteCommandProperties.class); - - /* - * 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 the input property: Command input. - * - * @return the input value. - */ - public MigrateSyncCompleteCommandInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Command output. This is ignored if submitted. - * - * @return the output value. - */ - public MigrateSyncCompleteCommandOutput output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationEligibilityInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationEligibilityInfo.java deleted file mode 100644 index d9b8d4bf2f7c7..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationEligibilityInfo.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Information about migration eligibility of a server object. */ -@Immutable -public final class MigrationEligibilityInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrationEligibilityInfo.class); - - /* - * Whether object is eligible for migration or not. - */ - @JsonProperty(value = "isEligibleForMigration", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isEligibleForMigration; - - /* - * Information about eligibility failure for the server object. - */ - @JsonProperty(value = "validationMessages", access = JsonProperty.Access.WRITE_ONLY) - private List validationMessages; - - /** - * Get the isEligibleForMigration property: Whether object is eligible for migration or not. - * - * @return the isEligibleForMigration value. - */ - public Boolean isEligibleForMigration() { - return this.isEligibleForMigration; - } - - /** - * Get the validationMessages property: Information about eligibility failure for the server object. - * - * @return the validationMessages value. - */ - public List validationMessages() { - return this.validationMessages; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationReportResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationReportResult.java deleted file mode 100644 index 8f09dfd97386a..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationReportResult.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Migration validation report result, contains the url for downloading the generated report. */ -@Immutable -public final class MigrationReportResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrationReportResult.class); - - /* - * Migration validation result identifier - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * The url of the report. - */ - @JsonProperty(value = "reportUrl", access = JsonProperty.Access.WRITE_ONLY) - private String reportUrl; - - /** - * Get the id property: Migration validation result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the reportUrl property: The url of the report. - * - * @return the reportUrl value. - */ - public String reportUrl() { - return this.reportUrl; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationState.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationState.java deleted file mode 100644 index 4e83aaf816be1..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationState.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationStatus.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationStatus.java deleted file mode 100644 index 48af828f29e67..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationStatus.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationTableMetadata.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationTableMetadata.java deleted file mode 100644 index a3741dd90bf5e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationTableMetadata.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Metadata for tables selected in migration project. */ -@Immutable -public final class MigrationTableMetadata { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrationTableMetadata.class); - - /* - * 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 the sourceTableName property: Source table name. - * - * @return the sourceTableName value. - */ - public String sourceTableName() { - return this.sourceTableName; - } - - /** - * Get the targetTableName property: Target table name. - * - * @return the targetTableName value. - */ - public String targetTableName() { - return this.targetTableName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationValidationDatabaseSummaryResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationValidationDatabaseSummaryResult.java deleted file mode 100644 index 403d75ac6609b..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationValidationDatabaseSummaryResult.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Migration Validation Database level summary result. */ -@Immutable -public final class MigrationValidationDatabaseSummaryResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrationValidationDatabaseSummaryResult.class); - - /* - * 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 OffsetDateTime startedOn; - - /* - * Validation end time - */ - @JsonProperty(value = "endedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endedOn; - - /* - * Current status of validation at the database level - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private ValidationStatus status; - - /** - * Get the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the migrationId property: Migration Identifier. - * - * @return the migrationId value. - */ - public String migrationId() { - return this.migrationId; - } - - /** - * Get the sourceDatabaseName property: Name of the source database. - * - * @return the sourceDatabaseName value. - */ - public String sourceDatabaseName() { - return this.sourceDatabaseName; - } - - /** - * Get the targetDatabaseName property: Name of the target database. - * - * @return the targetDatabaseName value. - */ - public String targetDatabaseName() { - return this.targetDatabaseName; - } - - /** - * Get the startedOn property: Validation start time. - * - * @return the startedOn value. - */ - public OffsetDateTime startedOn() { - return this.startedOn; - } - - /** - * Get the endedOn property: Validation end time. - * - * @return the endedOn value. - */ - public OffsetDateTime endedOn() { - return this.endedOn; - } - - /** - * Get the status property: Current status of validation at the database level. - * - * @return the status value. - */ - public ValidationStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationValidationOptions.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationValidationOptions.java deleted file mode 100644 index 17577d342cf23..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MigrationValidationOptions.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Types of validations to run after the migration. */ -@Fluent -public final class MigrationValidationOptions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrationValidationOptions.class); - - /* - * 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 the enableSchemaValidation property: Allows to compare the schema information between source and target. - * - * @return the enableSchemaValidation value. - */ - public Boolean enableSchemaValidation() { - return this.enableSchemaValidation; - } - - /** - * Set the enableSchemaValidation property: 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 the enableDataIntegrityValidation property: 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 the enableDataIntegrityValidation property: 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 the enableQueryAnalysisValidation property: 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 the enableQueryAnalysisValidation property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MySqlConnectionInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MySqlConnectionInfo.java deleted file mode 100644 index 518b33307b0b5..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MySqlConnectionInfo.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import 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") -@Fluent -public final class MySqlConnectionInfo extends ConnectionInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MySqlConnectionInfo.class); - - /* - * Name of the server - */ - @JsonProperty(value = "serverName", required = true) - private String serverName; - - /* - * Port for Server - */ - @JsonProperty(value = "port", required = true) - private int port; - - /** - * Get the serverName property: Name of the server. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Set the serverName property: 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 the port property: Port for Server. - * - * @return the port value. - */ - public int port() { - return this.port; - } - - /** - * Set the port property: 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; - } - - /** {@inheritDoc} */ - @Override - public MySqlConnectionInfo withUsername(String username) { - super.withUsername(username); - return this; - } - - /** {@inheritDoc} */ - @Override - public MySqlConnectionInfo withPassword(String password) { - super.withPassword(password); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (serverName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property serverName in model MySqlConnectionInfo")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MySqlTargetPlatformType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MySqlTargetPlatformType.java deleted file mode 100644 index aaa2c44e2abe6..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/MySqlTargetPlatformType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for MySqlTargetPlatformType. */ -public final class MySqlTargetPlatformType extends ExpandableStringEnum { - /** Static value SqlServer for MySqlTargetPlatformType. */ - public static final MySqlTargetPlatformType SQL_SERVER = fromString("SqlServer"); - - /** Static value AzureDbForMySQL for MySqlTargetPlatformType. */ - public static final MySqlTargetPlatformType AZURE_DB_FOR_MY_SQL = fromString("AzureDbForMySQL"); - - /** - * 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameAvailabilityRequest.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameAvailabilityRequest.java deleted file mode 100644 index 55bf91ac9921d..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameAvailabilityRequest.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A resource type and proposed name. */ -@Fluent -public final class NameAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityRequest.class); - - /* - * 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 name property: The proposed resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 type property: The resource type chain (e.g. virtualMachines/extensions). - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameAvailabilityResponse.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameAvailabilityResponse.java deleted file mode 100644 index 8479a9f754c02..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameAvailabilityResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.resourcemanager.datamigration.fluent.models.NameAvailabilityResponseInner; - -/** An immutable client-side representation of NameAvailabilityResponse. */ -public interface NameAvailabilityResponse { - /** - * Gets the nameAvailable property: If true, the name is valid and available. If false, 'reason' describes why not. - * - * @return the nameAvailable value. - */ - Boolean nameAvailable(); - - /** - * Gets the reason property: The reason why the name is not available, if nameAvailable is false. - * - * @return the reason value. - */ - NameCheckFailureReason reason(); - - /** - * Gets the message property: The localized reason why the name is not available, if nameAvailable is false. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.datamigration.fluent.models.NameAvailabilityResponseInner object. - * - * @return the inner object. - */ - NameAvailabilityResponseInner innerModel(); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameCheckFailureReason.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameCheckFailureReason.java deleted file mode 100644 index 8fbbb3d9f1e5f..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NameCheckFailureReason.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NonSqlDataMigrationTable.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NonSqlDataMigrationTable.java deleted file mode 100644 index 525bb1fc56b35..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/NonSqlDataMigrationTable.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Defines metadata for table to be migrated. */ -@Fluent -public final class NonSqlDataMigrationTable { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NonSqlDataMigrationTable.class); - - /* - * Source table name - */ - @JsonProperty(value = "sourceName") - private String sourceName; - - /** - * Get the sourceName property: Source table name. - * - * @return the sourceName value. - */ - public String sourceName() { - return this.sourceName; - } - - /** - * Set the sourceName property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ObjectType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ObjectType.java deleted file mode 100644 index 82b63798030a6..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ObjectType.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Operations.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Operations.java deleted file mode 100644 index 6e63337c3a478..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Operations.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * Lists all available actions exposed by the Database Migration Service resource provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - PagedIterable list(); - - /** - * Lists all available actions exposed by the Database Migration Service resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of action (operation) objects. - */ - PagedIterable list(Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/OrphanedUserInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/OrphanedUserInfo.java deleted file mode 100644 index f1664b46a21bc..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/OrphanedUserInfo.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Information of orphaned users on the SQL server database. */ -@Fluent -public final class OrphanedUserInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OrphanedUserInfo.class); - - /* - * Name of the orphaned user - */ - @JsonProperty(value = "name") - private String name; - - /* - * Parent database of the user - */ - @JsonProperty(value = "databaseName") - private String databaseName; - - /** - * Get the name property: Name of the orphaned user. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the orphaned user. - * - * @param name the name value to set. - * @return the OrphanedUserInfo object itself. - */ - public OrphanedUserInfo withName(String name) { - this.name = name; - return this; - } - - /** - * Get the databaseName property: Parent database of the user. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Set the databaseName property: Parent database of the user. - * - * @param databaseName the databaseName value to set. - * @return the OrphanedUserInfo object itself. - */ - public OrphanedUserInfo withDatabaseName(String databaseName) { - this.databaseName = databaseName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/PostgreSqlConnectionInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/PostgreSqlConnectionInfo.java deleted file mode 100644 index c5d11ea8e2bfb..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/PostgreSqlConnectionInfo.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import 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") -@Fluent -public final class PostgreSqlConnectionInfo extends ConnectionInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PostgreSqlConnectionInfo.class); - - /* - * 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 the serverName property: Name of the server. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Set the serverName property: 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 the databaseName property: Name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Set the databaseName property: 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 the port property: Port for Server. - * - * @return the port value. - */ - public int port() { - return this.port; - } - - /** - * Set the port property: 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; - } - - /** {@inheritDoc} */ - @Override - public PostgreSqlConnectionInfo withUsername(String username) { - super.withUsername(username); - return this; - } - - /** {@inheritDoc} */ - @Override - public PostgreSqlConnectionInfo withPassword(String password) { - super.withPassword(password); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (serverName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serverName in model PostgreSqlConnectionInfo")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Project.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Project.java deleted file mode 100644 index 2705bd5a413f4..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Project.java +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectInner; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of Project. */ -public interface Project { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the sourcePlatform property: Source platform for the project. - * - * @return the sourcePlatform value. - */ - ProjectSourcePlatform sourcePlatform(); - - /** - * Gets the targetPlatform property: Target platform for the project. - * - * @return the targetPlatform value. - */ - ProjectTargetPlatform targetPlatform(); - - /** - * Gets the creationTime property: UTC Date and time when project was created. - * - * @return the creationTime value. - */ - OffsetDateTime creationTime(); - - /** - * Gets the sourceConnectionInfo property: Information for connecting to source. - * - * @return the sourceConnectionInfo value. - */ - ConnectionInfo sourceConnectionInfo(); - - /** - * Gets the targetConnectionInfo property: Information for connecting to target. - * - * @return the targetConnectionInfo value. - */ - ConnectionInfo targetConnectionInfo(); - - /** - * Gets the databasesInfo property: List of DatabaseInfo. - * - * @return the databasesInfo value. - */ - List databasesInfo(); - - /** - * Gets the provisioningState property: The project's provisioning state. - * - * @return the provisioningState value. - */ - ProjectProvisioningState provisioningState(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.datamigration.fluent.models.ProjectInner object. - * - * @return the inner object. - */ - ProjectInner innerModel(); - - /** The entirety of the Project definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { - } - /** The Project definition stages. */ - interface DefinitionStages { - /** The first stage of the Project definition. */ - interface Blank extends WithLocation { - } - /** The stage of the Project definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - /** The stage of the Project definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies groupName, serviceName. - * - * @param groupName Name of the resource group. - * @param serviceName Name of the service. - * @return the next definition stage. - */ - WithCreate withExistingService(String groupName, String serviceName); - } - /** - * The stage of the Project definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithSourcePlatform, - DefinitionStages.WithTargetPlatform, - DefinitionStages.WithSourceConnectionInfo, - DefinitionStages.WithTargetConnectionInfo, - DefinitionStages.WithDatabasesInfo { - /** - * Executes the create request. - * - * @return the created resource. - */ - Project create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Project create(Context context); - } - /** The stage of the Project definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the Project definition allowing to specify sourcePlatform. */ - interface WithSourcePlatform { - /** - * Specifies the sourcePlatform property: Source platform for the project. - * - * @param sourcePlatform Source platform for the project. - * @return the next definition stage. - */ - WithCreate withSourcePlatform(ProjectSourcePlatform sourcePlatform); - } - /** The stage of the Project definition allowing to specify targetPlatform. */ - interface WithTargetPlatform { - /** - * Specifies the targetPlatform property: Target platform for the project. - * - * @param targetPlatform Target platform for the project. - * @return the next definition stage. - */ - WithCreate withTargetPlatform(ProjectTargetPlatform targetPlatform); - } - /** The stage of the Project definition allowing to specify sourceConnectionInfo. */ - interface WithSourceConnectionInfo { - /** - * Specifies the sourceConnectionInfo property: Information for connecting to source. - * - * @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 targetConnectionInfo. */ - interface WithTargetConnectionInfo { - /** - * Specifies the targetConnectionInfo property: Information for connecting to target. - * - * @param targetConnectionInfo Information for connecting to target. - * @return the next definition stage. - */ - WithCreate withTargetConnectionInfo(ConnectionInfo targetConnectionInfo); - } - /** The stage of the Project definition allowing to specify databasesInfo. */ - interface WithDatabasesInfo { - /** - * Specifies the databasesInfo property: List of DatabaseInfo. - * - * @param databasesInfo List of DatabaseInfo. - * @return the next definition stage. - */ - WithCreate withDatabasesInfo(List databasesInfo); - } - } - /** - * Begins update for the Project resource. - * - * @return the stage of resource update. - */ - Project.Update update(); - - /** The template for Project update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithSourcePlatform, - UpdateStages.WithTargetPlatform, - UpdateStages.WithSourceConnectionInfo, - UpdateStages.WithTargetConnectionInfo, - UpdateStages.WithDatabasesInfo { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Project apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Project apply(Context context); - } - /** The Project update stages. */ - interface UpdateStages { - /** The stage of the Project update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the Project update allowing to specify sourcePlatform. */ - interface WithSourcePlatform { - /** - * Specifies the sourcePlatform property: Source platform for the project. - * - * @param sourcePlatform Source platform for the project. - * @return the next definition stage. - */ - Update withSourcePlatform(ProjectSourcePlatform sourcePlatform); - } - /** The stage of the Project update allowing to specify targetPlatform. */ - interface WithTargetPlatform { - /** - * Specifies the targetPlatform property: Target platform for the project. - * - * @param targetPlatform Target platform for the project. - * @return the next definition stage. - */ - Update withTargetPlatform(ProjectTargetPlatform targetPlatform); - } - /** The stage of the Project update allowing to specify sourceConnectionInfo. */ - interface WithSourceConnectionInfo { - /** - * Specifies the sourceConnectionInfo property: Information for connecting to source. - * - * @param sourceConnectionInfo Information for connecting to source. - * @return the next definition stage. - */ - Update withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo); - } - /** The stage of the Project update allowing to specify targetConnectionInfo. */ - interface WithTargetConnectionInfo { - /** - * Specifies the targetConnectionInfo property: Information for connecting to target. - * - * @param targetConnectionInfo Information for connecting to target. - * @return the next definition stage. - */ - Update withTargetConnectionInfo(ConnectionInfo targetConnectionInfo); - } - /** The stage of the Project update allowing to specify databasesInfo. */ - interface WithDatabasesInfo { - /** - * Specifies the databasesInfo property: List of DatabaseInfo. - * - * @param databasesInfo List of DatabaseInfo. - * @return the next definition stage. - */ - Update withDatabasesInfo(List databasesInfo); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Project refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Project refresh(Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectList.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectList.java deleted file mode 100644 index 16162653a1c9e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectList.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** OData page of project resources. */ -@Fluent -public final class ProjectList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProjectList.class); - - /* - * List of projects - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to load the next page of projects - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of projects. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of projects. - * - * @param value the value value to set. - * @return the ProjectList object itself. - */ - public ProjectList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to load the next page of projects. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL to load the next page of projects. - * - * @param nextLink the nextLink value to set. - * @return the ProjectList object itself. - */ - public ProjectList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectProvisioningState.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectProvisioningState.java deleted file mode 100644 index def78d698184e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectProvisioningState.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectSourcePlatform.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectSourcePlatform.java deleted file mode 100644 index cc69f0e4fa6c7..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectSourcePlatform.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTargetPlatform.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTargetPlatform.java deleted file mode 100644 index 6956023efb1b9..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTargetPlatform.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProjectTargetPlatform. */ -public final class ProjectTargetPlatform extends ExpandableStringEnum { - /** Static value SQLDB for ProjectTargetPlatform. */ - public static final ProjectTargetPlatform SQLDB = fromString("SQLDB"); - - /** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTask.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTask.java deleted file mode 100644 index f49fd38e328bc..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTask.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner; - -/** An immutable client-side representation of ProjectTask. */ -public interface ProjectTask { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: HTTP strong entity tag value. This is ignored if submitted. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the properties property: Custom task properties. - * - * @return the properties value. - */ - ProjectTaskProperties properties(); - - /** - * Gets the inner com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner object. - * - * @return the inner object. - */ - ProjectTaskInner innerModel(); - - /** The entirety of the ProjectTask definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The ProjectTask definition stages. */ - interface DefinitionStages { - /** The first stage of the ProjectTask definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ProjectTask definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * 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 which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithEtag, DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ProjectTask create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ProjectTask create(Context context); - } - /** The stage of the ProjectTask definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: HTTP strong entity tag value. This is ignored if submitted.. - * - * @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 the properties property: Custom task properties. - * - * @param properties Custom task properties. - * @return the next definition stage. - */ - WithCreate withProperties(ProjectTaskProperties properties); - } - } - /** - * Begins update for the ProjectTask resource. - * - * @return the stage of resource update. - */ - ProjectTask.Update update(); - - /** The template for ProjectTask update. */ - interface Update extends UpdateStages.WithEtag, UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ProjectTask apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ProjectTask apply(Context context); - } - /** The ProjectTask update stages. */ - interface UpdateStages { - /** The stage of the ProjectTask update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: HTTP strong entity tag value. This is ignored if submitted.. - * - * @param etag HTTP strong entity tag value. This is ignored if submitted. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the ProjectTask update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Custom task properties. - * - * @param properties Custom task properties. - * @return the next definition stage. - */ - Update withProperties(ProjectTaskProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ProjectTask refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ProjectTask refresh(Context context); - - /** - * 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. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - ProjectTask cancel(); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - Response cancelWithResponse(Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTaskProperties.java deleted file mode 100644 index 1d11ffac00781..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ProjectTaskProperties.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * Base class for all types of DMS 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", - defaultImpl = ProjectTaskProperties.class) -@JsonTypeName("ProjectTaskProperties") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "ConnectToSource.MySql", value = ConnectToSourceMySqlTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToSource.SqlServer", value = ConnectToSourceSqlServerTaskProperties.class), - @JsonSubTypes.Type( - name = "ConnectToSource.SqlServer.Sync", - value = ConnectToSourceSqlServerSyncTaskProperties.class), - @JsonSubTypes.Type( - name = "ConnectToSource.PostgreSql.Sync", - value = ConnectToSourcePostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb", value = ConnectToTargetSqlDbTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.SqlDb.Sync", value = ConnectToTargetSqlDbSyncTaskProperties.class), - @JsonSubTypes.Type( - name = "ConnectToTarget.AzureDbForPostgreSql.Sync", - value = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "GetUserTables.Sql", value = GetUserTablesSqlTaskProperties.class), - @JsonSubTypes.Type(name = "GetUserTables.AzureSqlDb.Sync", value = GetUserTablesSqlSyncTaskProperties.class), - @JsonSubTypes.Type(name = "ConnectToTarget.AzureSqlDbMI", value = ConnectToTargetSqlMITaskProperties.class), - @JsonSubTypes.Type( - name = "ConnectToTarget.AzureSqlDbMI.Sync.LRS", - value = ConnectToTargetSqlMISyncTaskProperties.class), - @JsonSubTypes.Type( - name = "ConnectToTarget.AzureDbForMySql", - value = ConnectToTargetAzureDbForMySqlTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.SqlServer.AzureSqlDbMI", value = MigrateSqlServerSqlMITaskProperties.class), - @JsonSubTypes.Type( - name = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", - value = MigrateSqlServerSqlMISyncTaskProperties.class), - @JsonSubTypes.Type(name = "Migrate.SqlServer.SqlDb", value = MigrateSqlServerSqlDbTaskProperties.class), - @JsonSubTypes.Type( - name = "Migrate.SqlServer.AzureSqlDb.Sync", - value = MigrateSqlServerSqlDbSyncTaskProperties.class), - @JsonSubTypes.Type( - name = "Migrate.MySql.AzureDbForMySql.Sync", - value = MigrateMySqlAzureDbForMySqlSyncTaskProperties.class), - @JsonSubTypes.Type( - name = "Migrate.PostgreSql.AzureDbForPostgreSql.Sync", - value = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties.class), - @JsonSubTypes.Type( - name = "ValidateMigrationInput.SqlServer.SqlDb.Sync", - value = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.class), - @JsonSubTypes.Type( - name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI", - value = ValidateMigrationInputSqlServerSqlMITaskProperties.class), - @JsonSubTypes.Type( - name = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", - value = ValidateMigrationInputSqlServerSqlMISyncTaskProperties.class), - @JsonSubTypes.Type(name = "GetTDECertificates.Sql", value = GetTdeCertificatesSqlTaskProperties.class) -}) -@Immutable -public class ProjectTaskProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProjectTaskProperties.class); - - /* - * 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. - */ - @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 the errors property: Array of errors. This is ignored if submitted. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the state property: The state of the task. This is ignored if submitted. - * - * @return the state value. - */ - public TaskState state() { - return this.state; - } - - /** - * Get the commands property: Array of command properties. - * - * @return the commands value. - */ - public List commands() { - return this.commands; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (commands() != null) { - commands().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Projects.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Projects.java deleted file mode 100644 index e61dd89348bb6..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Projects.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Projects. */ -public interface Projects { - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - PagedIterable listByResourceGroup(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of project resources. - */ - PagedIterable listByResourceGroup(String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - Project get(String groupName, String serviceName, String projectName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - Response getWithResponse(String groupName, String serviceName, String projectName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String groupName, String serviceName, String projectName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse( - String groupName, String serviceName, String projectName, Boolean deleteRunningTasks, Context context); - - /** - * The project resource is a nested resource representing a stored migration project. The GET method retrieves - * information about a project. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - Project getById(String id); - - /** - * The project resource is a nested resource representing a stored migration project. The GET method retrieves - * information about a project. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a project resource. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a - * project. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * The project resource is a nested resource representing a stored migration project. The DELETE method deletes a - * project. - * - * @param id the resource ID. - * @param deleteRunningTasks Delete the resource even if it contains running tasks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteByIdWithResponse(String id, Boolean deleteRunningTasks, Context context); - - /** - * Begins definition for a new Project resource. - * - * @param name resource name. - * @return the first stage of the new Project definition. - */ - Project.DefinitionStages.Blank define(String name); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QueryAnalysisValidationResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QueryAnalysisValidationResult.java deleted file mode 100644 index 76b6650830f91..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QueryAnalysisValidationResult.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Results for query analysis comparison between the source and target. */ -@Immutable -public final class QueryAnalysisValidationResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryAnalysisValidationResult.class); - - /* - * List of queries executed and it's execution results in source and target - */ - @JsonProperty(value = "queryResults", access = JsonProperty.Access.WRITE_ONLY) - private QueryExecutionResult queryResults; - - /* - * Errors that are part of the execution - */ - @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) - private ValidationError validationErrors; - - /** - * Get the queryResults property: List of queries executed and it's execution results in source and target. - * - * @return the queryResults value. - */ - public QueryExecutionResult queryResults() { - return this.queryResults; - } - - /** - * Get the validationErrors property: Errors that are part of the execution. - * - * @return the validationErrors value. - */ - public ValidationError validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (queryResults() != null) { - queryResults().validate(); - } - if (validationErrors() != null) { - validationErrors().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QueryExecutionResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QueryExecutionResult.java deleted file mode 100644 index 53af416f19d39..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QueryExecutionResult.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes query analysis results for execution in source and target. */ -@Immutable -public final class QueryExecutionResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryExecutionResult.class); - - /* - * Query text retrieved from the source server - */ - @JsonProperty(value = "queryText", access = JsonProperty.Access.WRITE_ONLY) - private String queryText; - - /* - * Total no. of statements in the batch - */ - @JsonProperty(value = "statementsInBatch", access = JsonProperty.Access.WRITE_ONLY) - private Long statementsInBatch; - - /* - * Query analysis result from the source - */ - @JsonProperty(value = "sourceResult", access = JsonProperty.Access.WRITE_ONLY) - private ExecutionStatistics sourceResult; - - /* - * Query analysis result from the target - */ - @JsonProperty(value = "targetResult", access = JsonProperty.Access.WRITE_ONLY) - private ExecutionStatistics targetResult; - - /** - * Get the queryText property: Query text retrieved from the source server. - * - * @return the queryText value. - */ - public String queryText() { - return this.queryText; - } - - /** - * Get the statementsInBatch property: Total no. of statements in the batch. - * - * @return the statementsInBatch value. - */ - public Long statementsInBatch() { - return this.statementsInBatch; - } - - /** - * Get the sourceResult property: Query analysis result from the source. - * - * @return the sourceResult value. - */ - public ExecutionStatistics sourceResult() { - return this.sourceResult; - } - - /** - * Get the targetResult property: Query analysis result from the target. - * - * @return the targetResult value. - */ - public ExecutionStatistics targetResult() { - return this.targetResult; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceResult() != null) { - sourceResult().validate(); - } - if (targetResult() != null) { - targetResult().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Quota.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Quota.java deleted file mode 100644 index d626921000d92..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Quota.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.resourcemanager.datamigration.fluent.models.QuotaInner; - -/** An immutable client-side representation of Quota. */ -public interface Quota { - /** - * Gets the currentValue property: 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. - */ - Double currentValue(); - - /** - * Gets the id property: The resource ID of the quota object. - * - * @return the id value. - */ - String id(); - - /** - * Gets the limit property: 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. - */ - Double limit(); - - /** - * Gets the name property: The name of the quota. - * - * @return the name value. - */ - QuotaName name(); - - /** - * Gets the unit property: The unit for the quota, such as Count, Bytes, BytesPerSecond, etc. - * - * @return the unit value. - */ - String unit(); - - /** - * Gets the inner com.azure.resourcemanager.datamigration.fluent.models.QuotaInner object. - * - * @return the inner object. - */ - QuotaInner innerModel(); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QuotaList.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QuotaList.java deleted file mode 100644 index 20110a3d3db35..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QuotaList.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.models.QuotaInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** OData page of quota objects. */ -@Fluent -public final class QuotaList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaList.class); - - /* - * List of quotas - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to load the next page of quotas, or null or missing if this is the - * last page - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of quotas. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of quotas. - * - * @param value the value value to set. - * @return the QuotaList object itself. - */ - public QuotaList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to load the next page of quotas, or null or missing if this is the last page. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL to load the next page of quotas, or null or missing if this is the last page. - * - * @param nextLink the nextLink value to set. - * @return the QuotaList object itself. - */ - public QuotaList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QuotaName.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QuotaName.java deleted file mode 100644 index b92d1102bd084..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/QuotaName.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The name of the quota. */ -@Fluent -public final class QuotaName { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaName.class); - - /* - * 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 localizedValue property: The localized name of the quota. - * - * @return the localizedValue value. - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Set the localizedValue property: 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 value property: The unlocalized name (or ID) of the quota. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ReportableException.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ReportableException.java deleted file mode 100644 index 4695b2016e6a8..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ReportableException.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Exception object for all custom exceptions. */ -@Fluent -public final class ReportableException { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReportableException.class); - - /* - * Error message - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - 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", access = JsonProperty.Access.WRITE_ONLY) - private String filePath; - - /* - * The line number where exception occurred - */ - @JsonProperty(value = "lineNumber", access = JsonProperty.Access.WRITE_ONLY) - private String lineNumber; - - /* - * Coded numerical value that is assigned to a specific exception - */ - @JsonProperty(value = "hResult", access = JsonProperty.Access.WRITE_ONLY) - private Integer hResult; - - /* - * Stack trace - */ - @JsonProperty(value = "stackTrace", access = JsonProperty.Access.WRITE_ONLY) - private String stackTrace; - - /** - * Get the message property: Error message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the actionableMessage property: Actionable steps for this exception. - * - * @return the actionableMessage value. - */ - public String actionableMessage() { - return this.actionableMessage; - } - - /** - * Set the actionableMessage property: 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 filePath property: The path to the file where exception occurred. - * - * @return the filePath value. - */ - public String filePath() { - return this.filePath; - } - - /** - * Get the lineNumber property: The line number where exception occurred. - * - * @return the lineNumber value. - */ - public String lineNumber() { - return this.lineNumber; - } - - /** - * Get the hResult property: Coded numerical value that is assigned to a specific exception. - * - * @return the hResult value. - */ - public Integer hResult() { - return this.hResult; - } - - /** - * Get the stackTrace property: Stack trace. - * - * @return the stackTrace value. - */ - public String stackTrace() { - return this.stackTrace; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSku.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSku.java deleted file mode 100644 index 889a64dc771b1..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSku.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.resourcemanager.datamigration.fluent.models.ResourceSkuInner; -import java.util.List; - -/** An immutable client-side representation of ResourceSku. */ -public interface ResourceSku { - /** - * Gets the resourceType property: The type of resource the SKU applies to. - * - * @return the resourceType value. - */ - String resourceType(); - - /** - * Gets the name property: The name of SKU. - * - * @return the name value. - */ - String name(); - - /** - * Gets the tier property: Specifies the tier of DMS in a scale set. - * - * @return the tier value. - */ - String tier(); - - /** - * Gets the size property: The Size of the SKU. - * - * @return the size value. - */ - String size(); - - /** - * Gets the family property: The Family of this particular SKU. - * - * @return the family value. - */ - String family(); - - /** - * Gets the kind property: The Kind of resources that are supported in this SKU. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the capacity property: Not used. - * - * @return the capacity value. - */ - ResourceSkuCapacity capacity(); - - /** - * Gets the locations property: The set of locations that the SKU is available. - * - * @return the locations value. - */ - List locations(); - - /** - * Gets the apiVersions property: The api versions that support this SKU. - * - * @return the apiVersions value. - */ - List apiVersions(); - - /** - * Gets the costs property: Metadata for retrieving price info. - * - * @return the costs value. - */ - List costs(); - - /** - * Gets the capabilities property: A name value pair to describe the capability. - * - * @return the capabilities value. - */ - List capabilities(); - - /** - * Gets the restrictions property: The restrictions because of which SKU cannot be used. This is empty if there are - * no restrictions. - * - * @return the restrictions value. - */ - List restrictions(); - - /** - * Gets the inner com.azure.resourcemanager.datamigration.fluent.models.ResourceSkuInner object. - * - * @return the inner object. - */ - ResourceSkuInner innerModel(); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapabilities.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapabilities.java deleted file mode 100644 index f4c7dceb5684f..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapabilities.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes The SKU capabilities object. */ -@Immutable -public final class ResourceSkuCapabilities { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuCapabilities.class); - - /* - * 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 the name property: An invariant to describe the feature. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the value property: An invariant if the feature is measured by quantity. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapacity.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapacity.java deleted file mode 100644 index 538537a2b6024..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapacity.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes scaling information of a SKU. */ -@Immutable -public final class ResourceSkuCapacity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuCapacity.class); - - /* - * 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. - */ - @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY) - private ResourceSkuCapacityScaleType scaleType; - - /** - * Get the minimum property: The minimum capacity. - * - * @return the minimum value. - */ - public Long minimum() { - return this.minimum; - } - - /** - * Get the maximum property: The maximum capacity. - * - * @return the maximum value. - */ - public Long maximum() { - return this.maximum; - } - - /** - * Get the defaultProperty property: The default capacity. - * - * @return the defaultProperty value. - */ - public Long defaultProperty() { - return this.defaultProperty; - } - - /** - * Get the scaleType property: The scale type applicable to the SKU. - * - * @return the scaleType value. - */ - public ResourceSkuCapacityScaleType scaleType() { - return this.scaleType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapacityScaleType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapacityScaleType.java deleted file mode 100644 index de230b4ccd968..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCapacityScaleType.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCosts.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCosts.java deleted file mode 100644 index 2c90c804e6b4b..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuCosts.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes metadata for retrieving price info. */ -@Immutable -public final class ResourceSkuCosts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuCosts.class); - - /* - * 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 the meterId property: Used for querying price from commerce. - * - * @return the meterId value. - */ - public String meterId() { - return this.meterId; - } - - /** - * Get the quantity property: The multiplier is needed to extend the base metered cost. - * - * @return the quantity value. - */ - public Long quantity() { - return this.quantity; - } - - /** - * Get the extendedUnit property: An invariant to show the extended unit. - * - * @return the extendedUnit value. - */ - public String extendedUnit() { - return this.extendedUnit; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictions.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictions.java deleted file mode 100644 index 553fca892870e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictions.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes scaling information of a SKU. */ -@Immutable -public final class ResourceSkuRestrictions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuRestrictions.class); - - /* - * The type of restrictions. - */ - @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. - */ - @JsonProperty(value = "reasonCode", access = JsonProperty.Access.WRITE_ONLY) - private ResourceSkuRestrictionsReasonCode reasonCode; - - /** - * Get the type property: The type of restrictions. - * - * @return the type value. - */ - public ResourceSkuRestrictionsType type() { - return this.type; - } - - /** - * Get the values property: 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 reasonCode property: The reason code for restriction. - * - * @return the reasonCode value. - */ - public ResourceSkuRestrictionsReasonCode reasonCode() { - return this.reasonCode; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictionsReasonCode.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictionsReasonCode.java deleted file mode 100644 index 981c8a62d6530..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictionsReasonCode.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictionsType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictionsType.java deleted file mode 100644 index df0c32cac14d9..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkuRestrictionsType.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkus.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkus.java deleted file mode 100644 index 62336798155ee..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkus.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of ResourceSkus. */ -public interface ResourceSkus { - /** - * The skus action returns the list of SKUs that DMS supports. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - PagedIterable list(); - - /** - * The skus action returns the list of SKUs that DMS supports. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DMS List SKUs operation response. - */ - PagedIterable list(Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkusResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkusResult.java deleted file mode 100644 index 3fc4e6852a67b..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ResourceSkusResult.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.models.ResourceSkuInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The DMS List SKUs operation response. */ -@Fluent -public final class ResourceSkusResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkusResult.class); - - /* - * The list of SKUs available for the subscription. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * The uri to fetch the next page of DMS SKUs. Call ListNext() with this to - * fetch the next page of DMS SKUs. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: The list of SKUs available for the subscription. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of SKUs available for the subscription. - * - * @param value the value value to set. - * @return the ResourceSkusResult object itself. - */ - public ResourceSkusResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The uri to fetch the next page of DMS SKUs. Call ListNext() with this to fetch the - * next page of DMS SKUs. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The uri to fetch the next page of DMS SKUs. Call ListNext() with this to fetch the - * next page of DMS SKUs. - * - * @param nextLink the nextLink value to set. - * @return the ResourceSkusResult object itself. - */ - public ResourceSkusResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ResourceSkusResult")); - } else { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SchemaComparisonValidationResult.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SchemaComparisonValidationResult.java deleted file mode 100644 index 890f3405cbda9..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SchemaComparisonValidationResult.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Results for schema comparison between the source and target. */ -@Fluent -public final class SchemaComparisonValidationResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SchemaComparisonValidationResult.class); - - /* - * List of schema differences between the source and target databases - */ - @JsonProperty(value = "schemaDifferences", access = JsonProperty.Access.WRITE_ONLY) - private SchemaComparisonValidationResultType schemaDifferences; - - /* - * List of errors that happened while performing schema compare validation - */ - @JsonProperty(value = "validationErrors", access = JsonProperty.Access.WRITE_ONLY) - 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 the schemaDifferences property: List of schema differences between the source and target databases. - * - * @return the schemaDifferences value. - */ - public SchemaComparisonValidationResultType schemaDifferences() { - return this.schemaDifferences; - } - - /** - * Get the validationErrors property: List of errors that happened while performing schema compare validation. - * - * @return the validationErrors value. - */ - public ValidationError validationErrors() { - return this.validationErrors; - } - - /** - * Get the sourceDatabaseObjectCount property: Count of source database objects. - * - * @return the sourceDatabaseObjectCount value. - */ - public Map sourceDatabaseObjectCount() { - return this.sourceDatabaseObjectCount; - } - - /** - * Set the sourceDatabaseObjectCount property: 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 the targetDatabaseObjectCount property: Count of target database objects. - * - * @return the targetDatabaseObjectCount value. - */ - public Map targetDatabaseObjectCount() { - return this.targetDatabaseObjectCount; - } - - /** - * Set the targetDatabaseObjectCount property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (schemaDifferences() != null) { - schemaDifferences().validate(); - } - if (validationErrors() != null) { - validationErrors().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SchemaComparisonValidationResultType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SchemaComparisonValidationResultType.java deleted file mode 100644 index 7818a6c4adb78..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SchemaComparisonValidationResultType.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Description about the errors happen while performing migration validation. */ -@Immutable -public final class SchemaComparisonValidationResultType { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SchemaComparisonValidationResultType.class); - - /* - * Name of the object that has the difference - */ - @JsonProperty(value = "objectName", access = JsonProperty.Access.WRITE_ONLY) - private String objectName; - - /* - * Type of the object that has the difference. e.g - * (Table/View/StoredProcedure) - */ - @JsonProperty(value = "objectType", access = JsonProperty.Access.WRITE_ONLY) - private ObjectType objectType; - - /* - * Update action type with respect to target - */ - @JsonProperty(value = "updateAction", access = JsonProperty.Access.WRITE_ONLY) - private UpdateActionType updateAction; - - /** - * Get the objectName property: Name of the object that has the difference. - * - * @return the objectName value. - */ - public String objectName() { - return this.objectName; - } - - /** - * Get the objectType property: Type of the object that has the difference. e.g (Table/View/StoredProcedure). - * - * @return the objectType value. - */ - public ObjectType objectType() { - return this.objectType; - } - - /** - * Get the updateAction property: Update action type with respect to target. - * - * @return the updateAction value. - */ - public UpdateActionType updateAction() { - return this.updateAction; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SelectedCertificateInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SelectedCertificateInput.java deleted file mode 100644 index 1347694b012db..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SelectedCertificateInput.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Info for certificate to be exported for TDE enabled databases. */ -@Fluent -public final class SelectedCertificateInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SelectedCertificateInput.class); - - /* - * 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 the certificateName property: Name of certificate to be exported. - * - * @return the certificateName value. - */ - public String certificateName() { - return this.certificateName; - } - - /** - * Set the certificateName property: 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 the password property: Password to use for encrypting the exported certificate. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (certificateName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property certificateName in model SelectedCertificateInput")); - } - if (password() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property password in model SelectedCertificateInput")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServerLevelPermissionsGroup.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServerLevelPermissionsGroup.java deleted file mode 100644 index 7509c19f24bef..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServerLevelPermissionsGroup.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -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"), - - /** Enum value MigrationFromSqlServerToAzureMI. */ - MIGRATION_FROM_SQL_SERVER_TO_AZURE_MI("MigrationFromSqlServerToAzureMI"), - - /** Enum value MigrationFromMySQLToAzureDBForMySQL. */ - MIGRATION_FROM_MY_SQLTO_AZURE_DBFOR_MY_SQL("MigrationFromMySQLToAzureDBForMySQL"); - - /** The actual serialized value for a ServerLevelPermissionsGroup instance. */ - private final 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServerProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServerProperties.java deleted file mode 100644 index 5d4ad63cd8f3b..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServerProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Server properties for Oracle, MySQL type source. */ -@Immutable -public final class ServerProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerProperties.class); - - /* - * 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 the serverPlatform property: Name of the server platform. - * - * @return the serverPlatform value. - */ - public String serverPlatform() { - return this.serverPlatform; - } - - /** - * Get the serverName property: Name of the server. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Get the serverVersion property: Version of the database server. - * - * @return the serverVersion value. - */ - public String serverVersion() { - return this.serverVersion; - } - - /** - * Get the serverEdition property: Edition of the database server. - * - * @return the serverEdition value. - */ - public String serverEdition() { - return this.serverEdition; - } - - /** - * Get the serverOperatingSystemVersion property: Version of the operating system. - * - * @return the serverOperatingSystemVersion value. - */ - public String serverOperatingSystemVersion() { - return this.serverOperatingSystemVersion; - } - - /** - * Get the serverDatabaseCount property: Number of databases in the server. - * - * @return the serverDatabaseCount value. - */ - public Integer serverDatabaseCount() { - return this.serverDatabaseCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperation.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperation.java deleted file mode 100644 index 12183bee471cc..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperation.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.resourcemanager.datamigration.fluent.models.ServiceOperationInner; - -/** An immutable client-side representation of ServiceOperation. */ -public interface ServiceOperation { - /** - * Gets the name property: The fully qualified action name, e.g. Microsoft.DataMigration/services/read. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: Localized display text. - * - * @return the display value. - */ - ServiceOperationDisplay display(); - - /** - * Gets the inner com.azure.resourcemanager.datamigration.fluent.models.ServiceOperationInner object. - * - * @return the inner object. - */ - ServiceOperationInner innerModel(); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperationDisplay.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperationDisplay.java deleted file mode 100644 index 1124553130fc0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperationDisplay.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Localized display text. */ -@Fluent -public final class ServiceOperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceOperationDisplay.class); - - /* - * 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 provider property: The localized resource provider name. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: 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 resource property: The localized resource type name. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: 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 operation property: The localized operation name. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: 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 description property: The localized operation description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperationList.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperationList.java deleted file mode 100644 index 92399a3096450..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceOperationList.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.models.ServiceOperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** OData page of action (operation) objects. */ -@Fluent -public final class ServiceOperationList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceOperationList.class); - - /* - * List of actions - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to load the next page of actions - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of actions. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of actions. - * - * @param value the value value to set. - * @return the ServiceOperationList object itself. - */ - public ServiceOperationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to load the next page of actions. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL to load the next page of actions. - * - * @param nextLink the nextLink value to set. - * @return the ServiceOperationList object itself. - */ - public ServiceOperationList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceProvisioningState.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceProvisioningState.java deleted file mode 100644 index 6412fe57446a5..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceProvisioningState.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceScalability.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceScalability.java deleted file mode 100644 index 566dd630921fe..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceScalability.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceSku.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceSku.java deleted file mode 100644 index 74a671869892c..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceSku.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** An Azure SKU instance. */ -@Fluent -public final class ServiceSku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceSku.class); - - /* - * 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 name property: The unique name of the SKU, such as 'P3'. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: 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 property: 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 property: 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 family property: 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 family property: 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 property: 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 property: 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 property: The capacity of the SKU, if it supports scaling. - * - * @return the capacity value. - */ - public Integer capacity() { - return this.capacity; - } - - /** - * Set the capacity property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceSkuList.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceSkuList.java deleted file mode 100644 index 08806f0344884..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ServiceSkuList.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.models.AvailableServiceSkuInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** OData page of available SKUs. */ -@Fluent -public final class ServiceSkuList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceSkuList.class); - - /* - * List of service SKUs - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to load the next page of service SKUs - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of service SKUs. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of service SKUs. - * - * @param value the value value to set. - * @return the ServiceSkuList object itself. - */ - public ServiceSkuList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to load the next page of service SKUs. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL to load the next page of service SKUs. - * - * @param nextLink the nextLink value to set. - * @return the ServiceSkuList object itself. - */ - public ServiceSkuList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Services.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Services.java deleted file mode 100644 index f93ddb8f1dfc8..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Services.java +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Services. */ -public interface Services { - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - DataMigrationService getByResourceGroup(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - Response getByResourceGroupWithResponse( - String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String groupName, String serviceName, Boolean deleteRunningTasks); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String groupName, String serviceName, Boolean deleteRunningTasks, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - DataMigrationServiceStatusResponse checkStatus(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service health status. - */ - Response checkStatusWithResponse( - String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - PagedIterable listSkus(String groupName, String serviceName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of available SKUs. - */ - PagedIterable listSkus(String groupName, String serviceName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - NameAvailabilityResponse nestedCheckNameAvailability( - String groupName, String serviceName, NameAvailabilityRequest parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - Response nestedCheckNameAvailabilityWithResponse( - String groupName, String serviceName, NameAvailabilityRequest parameters, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - PagedIterable listByResourceGroup(String groupName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - PagedIterable listByResourceGroup(String groupName, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - PagedIterable list(); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of service objects. - */ - PagedIterable list(Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - NameAvailabilityResponse checkNameAvailability(String location, NameAvailabilityRequest parameters); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return indicates whether a proposed resource name is available. - */ - Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityRequest parameters, Context context); - - /** - * The services resource is the top-level resource that represents the Database Migration Service. The GET method - * retrieves information about a service instance. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - DataMigrationService getById(String id); - - /** - * The services resource is the top-level resource that represents the Database Migration Service. The GET method - * retrieves information about a service instance. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Database Migration Service resource. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * 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 id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * 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 id the resource ID. - * @param deleteRunningTasks Delete the resource even if it contains running tasks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Boolean deleteRunningTasks, Context context); - - /** - * Begins definition for a new DataMigrationService resource. - * - * @param name resource name. - * @return the first stage of the new DataMigrationService definition. - */ - DataMigrationService.DefinitionStages.Blank define(String name); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Severity.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Severity.java deleted file mode 100644 index 498f0d2b889ab..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Severity.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlConnectionInfo.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlConnectionInfo.java deleted file mode 100644 index 99fa52e29e196..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlConnectionInfo.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import 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") -@Fluent -public final class SqlConnectionInfo extends ConnectionInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlConnectionInfo.class); - - /* - * Data source in the format - * Protocol:MachineName\SQLServerInstanceName,PortNumber - */ - @JsonProperty(value = "dataSource", required = true) - private String dataSource; - - /* - * Authentication type to use for connection - */ - @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 - */ - @JsonProperty(value = "platform") - private SqlSourcePlatform platform; - - /** - * Get the dataSource property: Data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber. - * - * @return the dataSource value. - */ - public String dataSource() { - return this.dataSource; - } - - /** - * Set the dataSource property: 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 the authentication property: Authentication type to use for connection. - * - * @return the authentication value. - */ - public AuthenticationType authentication() { - return this.authentication; - } - - /** - * Set the authentication property: Authentication type to use for connection. - * - * @param authentication the authentication value to set. - * @return the SqlConnectionInfo object itself. - */ - public SqlConnectionInfo withAuthentication(AuthenticationType authentication) { - this.authentication = authentication; - return this; - } - - /** - * Get the encryptConnection property: Whether to encrypt the connection. - * - * @return the encryptConnection value. - */ - public Boolean encryptConnection() { - return this.encryptConnection; - } - - /** - * Set the encryptConnection property: 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 the additionalSettings property: Additional connection settings. - * - * @return the additionalSettings value. - */ - public String additionalSettings() { - return this.additionalSettings; - } - - /** - * Set the additionalSettings property: 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 the trustServerCertificate property: Whether to trust the server certificate. - * - * @return the trustServerCertificate value. - */ - public Boolean trustServerCertificate() { - return this.trustServerCertificate; - } - - /** - * Set the trustServerCertificate property: 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 the platform property: Server platform type for connection. - * - * @return the platform value. - */ - public SqlSourcePlatform platform() { - return this.platform; - } - - /** - * Set the platform property: Server platform type for connection. - * - * @param platform the platform value to set. - * @return the SqlConnectionInfo object itself. - */ - public SqlConnectionInfo withPlatform(SqlSourcePlatform platform) { - this.platform = platform; - return this; - } - - /** {@inheritDoc} */ - @Override - public SqlConnectionInfo withUsername(String username) { - super.withUsername(username); - return this; - } - - /** {@inheritDoc} */ - @Override - public SqlConnectionInfo withPassword(String password) { - super.withPassword(password); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataSource() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataSource in model SqlConnectionInfo")); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlMigrationTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlMigrationTaskInput.java deleted file mode 100644 index 7769b111dc873..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlMigrationTaskInput.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Base class for migration task input. */ -@Fluent -public class SqlMigrationTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlMigrationTaskInput.class); - - /* - * 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 the sourceConnectionInfo property: Information for connecting to source. - * - * @return the sourceConnectionInfo value. - */ - public SqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: 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 the targetConnectionInfo property: Information for connecting to target. - * - * @return the targetConnectionInfo value. - */ - public SqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model SqlMigrationTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model SqlMigrationTaskInput")); - } else { - targetConnectionInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlServerSqlMISyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlServerSqlMISyncTaskInput.java deleted file mode 100644 index c1d7ff665251c..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlServerSqlMISyncTaskInput.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. */ -@Fluent -public class SqlServerSqlMISyncTaskInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlServerSqlMISyncTaskInput.class); - - /* - * Databases to migrate - */ - @JsonProperty(value = "selectedDatabases", required = true) - private List selectedDatabases; - - /* - * Backup file share information for all selected databases. - */ - @JsonProperty(value = "backupFileShare") - private FileShare backupFileShare; - - /* - * Fully qualified resourceId of storage - */ - @JsonProperty(value = "storageResourceId", required = true) - private String storageResourceId; - - /* - * Connection information for source SQL Server - */ - @JsonProperty(value = "sourceConnectionInfo", required = true) - private SqlConnectionInfo sourceConnectionInfo; - - /* - * Connection information for Azure SQL Database Managed Instance - */ - @JsonProperty(value = "targetConnectionInfo", required = true) - private MiSqlConnectionInfo targetConnectionInfo; - - /* - * Azure Active Directory Application the DMS instance will use to connect - * to the target instance of Azure SQL Database Managed Instance and the - * Azure Storage Account - */ - @JsonProperty(value = "azureApp", required = true) - private AzureActiveDirectoryApp azureApp; - - /** - * Get the selectedDatabases property: Databases to migrate. - * - * @return the selectedDatabases value. - */ - public List selectedDatabases() { - return this.selectedDatabases; - } - - /** - * Set the selectedDatabases property: Databases to migrate. - * - * @param selectedDatabases the selectedDatabases value to set. - * @return the SqlServerSqlMISyncTaskInput object itself. - */ - public SqlServerSqlMISyncTaskInput withSelectedDatabases( - List selectedDatabases) { - this.selectedDatabases = selectedDatabases; - return this; - } - - /** - * Get the backupFileShare property: Backup file share information for all selected databases. - * - * @return the backupFileShare value. - */ - public FileShare backupFileShare() { - return this.backupFileShare; - } - - /** - * Set the backupFileShare property: Backup file share information for all selected databases. - * - * @param backupFileShare the backupFileShare value to set. - * @return the SqlServerSqlMISyncTaskInput object itself. - */ - public SqlServerSqlMISyncTaskInput withBackupFileShare(FileShare backupFileShare) { - this.backupFileShare = backupFileShare; - return this; - } - - /** - * Get the storageResourceId property: Fully qualified resourceId of storage. - * - * @return the storageResourceId value. - */ - public String storageResourceId() { - return this.storageResourceId; - } - - /** - * Set the storageResourceId property: Fully qualified resourceId of storage. - * - * @param storageResourceId the storageResourceId value to set. - * @return the SqlServerSqlMISyncTaskInput object itself. - */ - public SqlServerSqlMISyncTaskInput withStorageResourceId(String storageResourceId) { - this.storageResourceId = storageResourceId; - return this; - } - - /** - * Get the sourceConnectionInfo property: Connection information for source SQL Server. - * - * @return the sourceConnectionInfo value. - */ - public SqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: Connection information for source SQL Server. - * - * @param sourceConnectionInfo the sourceConnectionInfo value to set. - * @return the SqlServerSqlMISyncTaskInput object itself. - */ - public SqlServerSqlMISyncTaskInput withSourceConnectionInfo(SqlConnectionInfo sourceConnectionInfo) { - this.sourceConnectionInfo = sourceConnectionInfo; - return this; - } - - /** - * Get the targetConnectionInfo property: Connection information for Azure SQL Database Managed Instance. - * - * @return the targetConnectionInfo value. - */ - public MiSqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: Connection information for Azure SQL Database Managed Instance. - * - * @param targetConnectionInfo the targetConnectionInfo value to set. - * @return the SqlServerSqlMISyncTaskInput object itself. - */ - public SqlServerSqlMISyncTaskInput withTargetConnectionInfo(MiSqlConnectionInfo targetConnectionInfo) { - this.targetConnectionInfo = targetConnectionInfo; - return this; - } - - /** - * Get the azureApp property: Azure Active Directory Application the DMS instance will use to connect to the target - * instance of Azure SQL Database Managed Instance and the Azure Storage Account. - * - * @return the azureApp value. - */ - public AzureActiveDirectoryApp azureApp() { - return this.azureApp; - } - - /** - * Set the azureApp property: Azure Active Directory Application the DMS instance will use to connect to the target - * instance of Azure SQL Database Managed Instance and the Azure Storage Account. - * - * @param azureApp the azureApp value to set. - * @return the SqlServerSqlMISyncTaskInput object itself. - */ - public SqlServerSqlMISyncTaskInput withAzureApp(AzureActiveDirectoryApp azureApp) { - this.azureApp = azureApp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (selectedDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedDatabases in model SqlServerSqlMISyncTaskInput")); - } else { - selectedDatabases().forEach(e -> e.validate()); - } - if (backupFileShare() != null) { - backupFileShare().validate(); - } - if (storageResourceId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageResourceId in model SqlServerSqlMISyncTaskInput")); - } - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model SqlServerSqlMISyncTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model SqlServerSqlMISyncTaskInput")); - } else { - targetConnectionInfo().validate(); - } - if (azureApp() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property azureApp in model SqlServerSqlMISyncTaskInput")); - } else { - azureApp().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlSourcePlatform.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlSourcePlatform.java deleted file mode 100644 index e7e60e1abe5b2..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SqlSourcePlatform.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncDatabaseMigrationReportingState.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncDatabaseMigrationReportingState.java deleted file mode 100644 index 7294cc9a00933..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncDatabaseMigrationReportingState.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncMigrationDatabaseErrorEvent.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncMigrationDatabaseErrorEvent.java deleted file mode 100644 index 5949daccac34e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncMigrationDatabaseErrorEvent.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Database migration errors for online migration. */ -@Immutable -public final class SyncMigrationDatabaseErrorEvent { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SyncMigrationDatabaseErrorEvent.class); - - /* - * 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 the timestampString property: String value of timestamp. - * - * @return the timestampString value. - */ - public String timestampString() { - return this.timestampString; - } - - /** - * Get the eventTypeString property: Event type. - * - * @return the eventTypeString value. - */ - public String eventTypeString() { - return this.eventTypeString; - } - - /** - * Get the eventText property: Event text. - * - * @return the eventText value. - */ - public String eventText() { - return this.eventText; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncTableMigrationState.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncTableMigrationState.java deleted file mode 100644 index 048e5c54a7e71..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/SyncTableMigrationState.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/TaskList.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/TaskList.java deleted file mode 100644 index fca4f3ae24d22..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/TaskList.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** OData page of tasks. */ -@Fluent -public final class TaskList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TaskList.class); - - /* - * List of tasks - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to load the next page of tasks - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of tasks. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of tasks. - * - * @param value the value value to set. - * @return the TaskList object itself. - */ - public TaskList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to load the next page of tasks. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL to load the next page of tasks. - * - * @param nextLink the nextLink value to set. - * @return the TaskList object itself. - */ - public TaskList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/TaskState.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/TaskState.java deleted file mode 100644 index 664b714fa7dc9..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/TaskState.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Tasks.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Tasks.java deleted file mode 100644 index 9559990f1e376..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Tasks.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Tasks. */ -public interface Tasks { - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - PagedIterable list(String groupName, String serviceName, String projectName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of tasks. - */ - PagedIterable list( - String groupName, String serviceName, String projectName, String taskType, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - ProjectTask get(String groupName, String serviceName, String projectName, String taskName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - Response getWithResponse( - String groupName, String serviceName, String projectName, String taskName, String expand, Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String groupName, String serviceName, String projectName, String taskName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse( - String groupName, - String serviceName, - String projectName, - String taskName, - Boolean deleteRunningTasks, - Context context); - - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - ProjectTask cancel(String groupName, String serviceName, String projectName, String taskName); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - Response cancelWithResponse( - String groupName, String serviceName, String projectName, String taskName, Context context); - - /** - * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The GET method - * retrieves information about a task. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - ProjectTask getById(String id); - - /** - * 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 id the resource ID. - * @param expand Expand the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a task resource. - */ - Response getByIdWithResponse(String id, String expand, Context context); - - /** - * 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 id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * 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 id the resource ID. - * @param deleteRunningTasks Delete the resource even if it contains running tasks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteByIdWithResponse(String id, Boolean deleteRunningTasks, Context context); - - /** - * Begins definition for a new ProjectTask resource. - * - * @param name resource name. - * @return the first stage of the new ProjectTask definition. - */ - ProjectTask.DefinitionStages.Blank define(String name); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/UpdateActionType.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/UpdateActionType.java deleted file mode 100644 index 9989f79a41239..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/UpdateActionType.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Usages.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Usages.java deleted file mode 100644 index 05413591ed3a3..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/Usages.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Usages. */ -public interface Usages { - /** - * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - PagedIterable list(String location); - - /** - * This method returns region-specific quotas and resource usage information for the Database Migration Service. - * - * @param location The Azure region of the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oData page of quota objects. - */ - PagedIterable list(String location, Context context); -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java deleted file mode 100644 index 8368a23dcf700..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class ValidateMigrationInputSqlServerSqlDbSyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateMigrationInputSqlServerSqlDbSyncTaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public ValidateSyncMigrationInputSqlServerTaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskInput.java deleted file mode 100644 index 18d22ee0a6763..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskInput.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. */ -@Immutable -public final class ValidateMigrationInputSqlServerSqlMISyncTaskInput extends SqlServerSqlMISyncTaskInput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateMigrationInputSqlServerSqlMISyncTaskInput.class); - - /** {@inheritDoc} */ - @Override - public ValidateMigrationInputSqlServerSqlMISyncTaskInput withSelectedDatabases( - List selectedDatabases) { - super.withSelectedDatabases(selectedDatabases); - return this; - } - - /** {@inheritDoc} */ - @Override - public ValidateMigrationInputSqlServerSqlMISyncTaskInput withBackupFileShare(FileShare backupFileShare) { - super.withBackupFileShare(backupFileShare); - return this; - } - - /** {@inheritDoc} */ - @Override - public ValidateMigrationInputSqlServerSqlMISyncTaskInput withStorageResourceId(String storageResourceId) { - super.withStorageResourceId(storageResourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public ValidateMigrationInputSqlServerSqlMISyncTaskInput withSourceConnectionInfo( - SqlConnectionInfo sourceConnectionInfo) { - super.withSourceConnectionInfo(sourceConnectionInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public ValidateMigrationInputSqlServerSqlMISyncTaskInput withTargetConnectionInfo( - MiSqlConnectionInfo targetConnectionInfo) { - super.withTargetConnectionInfo(targetConnectionInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public ValidateMigrationInputSqlServerSqlMISyncTaskInput withAzureApp(AzureActiveDirectoryApp azureApp) { - super.withAzureApp(azureApp); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskOutput.java deleted file mode 100644 index 9c85e39e1c017..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskOutput.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for task that validates migration input for Azure SQL Database Managed Instance online migration. */ -@Immutable -public final class ValidateMigrationInputSqlServerSqlMISyncTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateMigrationInputSqlServerSqlMISyncTaskOutput.class); - - /* - * 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 the id property: Database identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Name of database. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the validationErrors property: Errors associated with a selected database object. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java deleted file mode 100644 index af61493513713..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMISyncTaskProperties.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Properties for task that validates migration input for SQL to Azure SQL Database Managed Instance sync scenario. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS") -@Fluent -public final class ValidateMigrationInputSqlServerSqlMISyncTaskProperties extends ProjectTaskProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateMigrationInputSqlServerSqlMISyncTaskProperties.class); - - /* - * Task input - */ - @JsonProperty(value = "input") - private ValidateMigrationInputSqlServerSqlMISyncTaskInput input; - - /* - * Task output. This is ignored if submitted. - */ - @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) - private List output; - - /** - * Get the input property: Task input. - * - * @return the input value. - */ - public ValidateMigrationInputSqlServerSqlMISyncTaskInput input() { - return this.input; - } - - /** - * Set the input property: Task input. - * - * @param input the input value to set. - * @return the ValidateMigrationInputSqlServerSqlMISyncTaskProperties object itself. - */ - public ValidateMigrationInputSqlServerSqlMISyncTaskProperties withInput( - ValidateMigrationInputSqlServerSqlMISyncTaskInput input) { - this.input = input; - return this; - } - - /** - * Get the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskInput.java deleted file mode 100644 index 230a476a32876..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskInput.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for task that validates migration input for SQL to Azure SQL Managed Instance. */ -@Fluent -public final class ValidateMigrationInputSqlServerSqlMITaskInput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateMigrationInputSqlServerSqlMITaskInput.class); - - /* - * 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. - */ - @JsonProperty(value = "backupMode") - private BackupMode backupMode; - - /** - * Get the sourceConnectionInfo property: Information for connecting to source. - * - * @return the sourceConnectionInfo value. - */ - public SqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: 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 the targetConnectionInfo property: Information for connecting to target. - * - * @return the targetConnectionInfo value. - */ - public SqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: 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 the selectedDatabases property: Databases to migrate. - * - * @return the selectedDatabases value. - */ - public List selectedDatabases() { - return this.selectedDatabases; - } - - /** - * Set the selectedDatabases property: 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 the selectedLogins property: Logins to migrate. - * - * @return the selectedLogins value. - */ - public List selectedLogins() { - return this.selectedLogins; - } - - /** - * Set the selectedLogins property: 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 the backupFileShare property: Backup file share information for all selected databases. - * - * @return the backupFileShare value. - */ - public FileShare backupFileShare() { - return this.backupFileShare; - } - - /** - * Set the backupFileShare property: 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 the backupBlobShare property: 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 the backupBlobShare property: 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 the backupMode property: Backup Mode to specify whether to use existing backup or create new backup. - * - * @return the backupMode value. - */ - public BackupMode backupMode() { - return this.backupMode; - } - - /** - * Set the backupMode property: Backup Mode to specify whether to use existing backup or create new backup. - * - * @param backupMode the backupMode value to set. - * @return the ValidateMigrationInputSqlServerSqlMITaskInput object itself. - */ - public ValidateMigrationInputSqlServerSqlMITaskInput withBackupMode(BackupMode backupMode) { - this.backupMode = backupMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model" - + " ValidateMigrationInputSqlServerSqlMITaskInput")); - } else { - sourceConnectionInfo().validate(); - } - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model" - + " ValidateMigrationInputSqlServerSqlMITaskInput")); - } else { - targetConnectionInfo().validate(); - } - if (selectedDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedDatabases in model" - + " ValidateMigrationInputSqlServerSqlMITaskInput")); - } else { - selectedDatabases().forEach(e -> e.validate()); - } - if (backupFileShare() != null) { - backupFileShare().validate(); - } - if (backupBlobShare() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property backupBlobShare in model" - + " ValidateMigrationInputSqlServerSqlMITaskInput")); - } else { - backupBlobShare().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskOutput.java deleted file mode 100644 index 94dbac24d2af2..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskOutput.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for task that validates migration input for SQL to Azure SQL Managed Instance migrations. */ -@Fluent -public final class ValidateMigrationInputSqlServerSqlMITaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateMigrationInputSqlServerSqlMITaskOutput.class); - - /* - * 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 the id property: Result identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Name of database. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the restoreDatabaseNameErrors property: Errors associated with the RestoreDatabaseName. - * - * @return the restoreDatabaseNameErrors value. - */ - public List restoreDatabaseNameErrors() { - return this.restoreDatabaseNameErrors; - } - - /** - * Get the backupFolderErrors property: Errors associated with the BackupFolder path. - * - * @return the backupFolderErrors value. - */ - public List backupFolderErrors() { - return this.backupFolderErrors; - } - - /** - * Get the backupShareCredentialsErrors property: Errors associated with backup share user name and password - * credentials. - * - * @return the backupShareCredentialsErrors value. - */ - public List backupShareCredentialsErrors() { - return this.backupShareCredentialsErrors; - } - - /** - * Get the backupStorageAccountErrors property: Errors associated with the storage account provided. - * - * @return the backupStorageAccountErrors value. - */ - public List backupStorageAccountErrors() { - return this.backupStorageAccountErrors; - } - - /** - * Get the existingBackupErrors property: Errors associated with existing backup files. - * - * @return the existingBackupErrors value. - */ - public List existingBackupErrors() { - return this.existingBackupErrors; - } - - /** - * Get the databaseBackupInfo property: Information about backup files when existing backup mode is used. - * - * @return the databaseBackupInfo value. - */ - public DatabaseBackupInfo databaseBackupInfo() { - return this.databaseBackupInfo; - } - - /** - * Set the databaseBackupInfo property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (restoreDatabaseNameErrors() != null) { - restoreDatabaseNameErrors().forEach(e -> e.validate()); - } - if (backupFolderErrors() != null) { - backupFolderErrors().forEach(e -> e.validate()); - } - if (backupShareCredentialsErrors() != null) { - backupShareCredentialsErrors().forEach(e -> e.validate()); - } - if (backupStorageAccountErrors() != null) { - backupStorageAccountErrors().forEach(e -> e.validate()); - } - if (existingBackupErrors() != null) { - existingBackupErrors().forEach(e -> e.validate()); - } - if (databaseBackupInfo() != null) { - databaseBackupInfo().validate(); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskProperties.java deleted file mode 100644 index 279ddf01f5f3f..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateMigrationInputSqlServerSqlMITaskProperties.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** 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") -@Fluent -public final class ValidateMigrationInputSqlServerSqlMITaskProperties extends ProjectTaskProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateMigrationInputSqlServerSqlMITaskProperties.class); - - /* - * 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 the input property: Task input. - * - * @return the input value. - */ - public ValidateMigrationInputSqlServerSqlMITaskInput input() { - return this.input; - } - - /** - * Set the input property: 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 the output property: Task output. This is ignored if submitted. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (input() != null) { - input().validate(); - } - if (output() != null) { - output().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateSyncMigrationInputSqlServerTaskInput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateSyncMigrationInputSqlServerTaskInput.java deleted file mode 100644 index c8036c3547d47..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateSyncMigrationInputSqlServerTaskInput.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Input for task that validates migration input for SQL sync migrations. */ -@Fluent -public final class ValidateSyncMigrationInputSqlServerTaskInput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateSyncMigrationInputSqlServerTaskInput.class); - - /* - * 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 the sourceConnectionInfo property: Information for connecting to source SQL server. - * - * @return the sourceConnectionInfo value. - */ - public SqlConnectionInfo sourceConnectionInfo() { - return this.sourceConnectionInfo; - } - - /** - * Set the sourceConnectionInfo property: 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 the targetConnectionInfo property: Information for connecting to target. - * - * @return the targetConnectionInfo value. - */ - public SqlConnectionInfo targetConnectionInfo() { - return this.targetConnectionInfo; - } - - /** - * Set the targetConnectionInfo property: 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 the selectedDatabases property: Databases to migrate. - * - * @return the selectedDatabases value. - */ - public List selectedDatabases() { - return this.selectedDatabases; - } - - /** - * Set the selectedDatabases property: 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceConnectionInfo in model" - + " ValidateSyncMigrationInputSqlServerTaskInput")); - } else { - sourceConnectionInfo().validate(); - } - if (targetConnectionInfo() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetConnectionInfo in model" - + " ValidateSyncMigrationInputSqlServerTaskInput")); - } else { - targetConnectionInfo().validate(); - } - if (selectedDatabases() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property selectedDatabases in model" - + " ValidateSyncMigrationInputSqlServerTaskInput")); - } else { - selectedDatabases().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateSyncMigrationInputSqlServerTaskOutput.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateSyncMigrationInputSqlServerTaskOutput.java deleted file mode 100644 index e563383146807..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidateSyncMigrationInputSqlServerTaskOutput.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output for task that validates migration input for SQL sync migrations. */ -@Immutable -public final class ValidateSyncMigrationInputSqlServerTaskOutput { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ValidateSyncMigrationInputSqlServerTaskOutput.class); - - /* - * 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 the id property: Database identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Name of database. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the validationErrors property: Errors associated with a selected database object. - * - * @return the validationErrors value. - */ - public List validationErrors() { - return this.validationErrors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationErrors() != null) { - validationErrors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidationError.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidationError.java deleted file mode 100644 index cd719a8a55de3..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidationError.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Description about the errors happen while performing migration validation. */ -@Immutable -public final class ValidationError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidationError.class); - - /* - * Error Text - */ - @JsonProperty(value = "text", access = JsonProperty.Access.WRITE_ONLY) - private String text; - - /* - * Severity of the error - */ - @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) - private Severity severity; - - /** - * Get the text property: Error Text. - * - * @return the text value. - */ - public String text() { - return this.text; - } - - /** - * Get the severity property: Severity of the error. - * - * @return the severity value. - */ - public Severity severity() { - return this.severity; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidationStatus.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidationStatus.java deleted file mode 100644 index 3a5bc7f9d151e..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/ValidationStatus.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** 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/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/WaitStatistics.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/WaitStatistics.java deleted file mode 100644 index 976302eecddca..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/WaitStatistics.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datamigration.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Wait statistics gathered during query batch execution. */ -@Immutable -public final class WaitStatistics { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatistics.class); - - /* - * Type of the Wait - */ - @JsonProperty(value = "waitType", access = JsonProperty.Access.WRITE_ONLY) - private String waitType; - - /* - * Total wait time in millisecond(s) - */ - @JsonProperty(value = "waitTimeMs", access = JsonProperty.Access.WRITE_ONLY) - private Float waitTimeMs; - - /* - * Total no. of waits - */ - @JsonProperty(value = "waitCount", access = JsonProperty.Access.WRITE_ONLY) - private Long waitCount; - - /** - * Get the waitType property: Type of the Wait. - * - * @return the waitType value. - */ - public String waitType() { - return this.waitType; - } - - /** - * Get the waitTimeMs property: Total wait time in millisecond(s). - * - * @return the waitTimeMs value. - */ - public Float waitTimeMs() { - return this.waitTimeMs; - } - - /** - * Get the waitCount property: Total no. of waits. - * - * @return the waitCount value. - */ - public Long waitCount() { - return this.waitCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/package-info.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/package-info.java deleted file mode 100644 index d5aeec466dfef..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/models/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the data models for DataMigrationManagementClient. Data Migration Client. */ -package com.azure.resourcemanager.datamigration.models; diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/package-info.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/package-info.java deleted file mode 100644 index e3c6a93d6d6f0..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the classes for DataMigrationManagementClient. Data Migration Client. */ -package com.azure.resourcemanager.datamigration; diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/module-info.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/module-info.java deleted file mode 100644 index 151fa21034511..0000000000000 --- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/module-info.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.datamigration { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.datamigration; - exports com.azure.resourcemanager.datamigration.fluent; - exports com.azure.resourcemanager.datamigration.fluent.models; - exports com.azure.resourcemanager.datamigration.models; - - opens com.azure.resourcemanager.datamigration.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.datamigration.models to - com.azure.core, - com.fasterxml.jackson.databind; -}