diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/data_migration_service_client.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/data_migration_service_client.py index e378ec10b4be..5fb7c0ebb1fe 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/data_migration_service_client.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/data_migration_service_client.py @@ -88,7 +88,6 @@ def __init__( super(DataMigrationServiceClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-04-19' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py index b72ad77faf01..d3904f749467 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py @@ -10,9 +10,62 @@ # -------------------------------------------------------------------------- try: + from .odata_error_py3 import ODataError + from .reportable_exception_py3 import ReportableException + from .migrate_sync_complete_command_output_py3 import MigrateSyncCompleteCommandOutput + from .migrate_sync_complete_command_input_py3 import MigrateSyncCompleteCommandInput + from .migrate_sync_complete_command_properties_py3 import MigrateSyncCompleteCommandProperties + from .command_properties_py3 import CommandProperties from .tracked_resource_py3 import TrackedResource from .resource_py3 import Resource - from .odata_error_py3 import ODataError + from .get_tde_certificates_sql_task_output_py3 import GetTdeCertificatesSqlTaskOutput + from .selected_certificate_input_py3 import SelectedCertificateInput + from .file_share_py3 import FileShare + from .postgre_sql_connection_info_py3 import PostgreSqlConnectionInfo + from .my_sql_connection_info_py3 import MySqlConnectionInfo + from .connection_info_py3 import ConnectionInfo + from .sql_connection_info_py3 import SqlConnectionInfo + from .get_tde_certificates_sql_task_input_py3 import GetTdeCertificatesSqlTaskInput + from .get_tde_certificates_sql_task_properties_py3 import GetTdeCertificatesSqlTaskProperties + from .database_backup_info_py3 import DatabaseBackupInfo + from .validate_migration_input_sql_server_sql_mi_task_output_py3 import ValidateMigrationInputSqlServerSqlMITaskOutput + from .blob_share_py3 import BlobShare + from .migrate_sql_server_sql_mi_database_input_py3 import MigrateSqlServerSqlMIDatabaseInput + from .validate_migration_input_sql_server_sql_mi_task_input_py3 import ValidateMigrationInputSqlServerSqlMITaskInput + from .validate_migration_input_sql_server_sql_mi_task_properties_py3 import ValidateMigrationInputSqlServerSqlMITaskProperties + from .validate_sync_migration_input_sql_server_task_output_py3 import ValidateSyncMigrationInputSqlServerTaskOutput + from .migrate_sql_server_sql_db_sync_database_input_py3 import MigrateSqlServerSqlDbSyncDatabaseInput + from .validate_sync_migration_input_sql_server_task_input_py3 import ValidateSyncMigrationInputSqlServerTaskInput + from .validate_migration_input_sql_server_sql_db_sync_task_properties_py3 import ValidateMigrationInputSqlServerSqlDbSyncTaskProperties + from .sync_migration_database_error_event_py3 import SyncMigrationDatabaseErrorEvent + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_error_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputError + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutput + from .migrate_my_sql_azure_db_for_my_sql_sync_database_input_py3 import MigrateMySqlAzureDbForMySqlSyncDatabaseInput + from .migrate_my_sql_azure_db_for_my_sql_sync_task_input_py3 import MigrateMySqlAzureDbForMySqlSyncTaskInput + from .migrate_my_sql_azure_db_for_my_sql_sync_task_properties_py3 import MigrateMySqlAzureDbForMySqlSyncTaskProperties + from .migrate_sql_server_sql_db_sync_task_output_database_error_py3 import MigrateSqlServerSqlDbSyncTaskOutputDatabaseError + from .migrate_sql_server_sql_db_sync_task_output_error_py3 import MigrateSqlServerSqlDbSyncTaskOutputError + from .migrate_sql_server_sql_db_sync_task_output_table_level_py3 import MigrateSqlServerSqlDbSyncTaskOutputTableLevel + from .migrate_sql_server_sql_db_sync_task_output_database_level_py3 import MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel + from .migrate_sql_server_sql_db_sync_task_output_migration_level_py3 import MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel + from .migrate_sql_server_sql_db_sync_task_output_py3 import MigrateSqlServerSqlDbSyncTaskOutput + from .sql_migration_task_input_py3 import SqlMigrationTaskInput + from .migration_validation_options_py3 import MigrationValidationOptions + from .migrate_sql_server_sql_db_sync_task_input_py3 import MigrateSqlServerSqlDbSyncTaskInput + from .migrate_sql_server_sql_db_sync_task_properties_py3 import MigrateSqlServerSqlDbSyncTaskProperties from .validation_error_py3 import ValidationError from .wait_statistics_py3 import WaitStatistics from .execution_statistics_py3 import ExecutionStatistics @@ -24,7 +77,6 @@ from .migration_validation_database_level_result_py3 import MigrationValidationDatabaseLevelResult from .migration_validation_database_summary_result_py3 import MigrationValidationDatabaseSummaryResult from .migration_validation_result_py3 import MigrationValidationResult - from .reportable_exception_py3 import ReportableException from .migrate_sql_server_sql_db_task_output_error_py3 import MigrateSqlServerSqlDbTaskOutputError from .migrate_sql_server_sql_db_task_output_table_level_py3 import MigrateSqlServerSqlDbTaskOutputTableLevel from .data_item_migration_summary_result_py3 import DataItemMigrationSummaryResult @@ -33,18 +85,34 @@ from .database_summary_result_py3 import DatabaseSummaryResult from .migrate_sql_server_sql_db_task_output_migration_level_py3 import MigrateSqlServerSqlDbTaskOutputMigrationLevel from .migrate_sql_server_sql_db_task_output_py3 import MigrateSqlServerSqlDbTaskOutput - from .connection_info_py3 import ConnectionInfo - from .sql_connection_info_py3 import SqlConnectionInfo - from .sql_migration_task_input_py3 import SqlMigrationTaskInput - from .migration_validation_options_py3 import MigrationValidationOptions from .migrate_sql_server_sql_db_database_input_py3 import MigrateSqlServerSqlDbDatabaseInput from .migrate_sql_server_sql_db_task_input_py3 import MigrateSqlServerSqlDbTaskInput from .migrate_sql_server_sql_db_task_properties_py3 import MigrateSqlServerSqlDbTaskProperties + from .migrate_sql_server_sql_mi_task_output_error_py3 import MigrateSqlServerSqlMITaskOutputError + from .migrate_sql_server_sql_mi_task_output_login_level_py3 import MigrateSqlServerSqlMITaskOutputLoginLevel + from .migrate_sql_server_sql_mi_task_output_agent_job_level_py3 import MigrateSqlServerSqlMITaskOutputAgentJobLevel + from .migrate_sql_server_sql_mi_task_output_database_level_py3 import MigrateSqlServerSqlMITaskOutputDatabaseLevel + from .start_migration_scenario_server_role_result_py3 import StartMigrationScenarioServerRoleResult + from .migrate_sql_server_sql_mi_task_output_migration_level_py3 import MigrateSqlServerSqlMITaskOutputMigrationLevel + from .migrate_sql_server_sql_mi_task_output_py3 import MigrateSqlServerSqlMITaskOutput + from .migrate_sql_server_sql_mi_task_input_py3 import MigrateSqlServerSqlMITaskInput + from .migrate_sql_server_sql_mi_task_properties_py3 import MigrateSqlServerSqlMITaskProperties + from .connect_to_target_azure_db_for_my_sql_task_output_py3 import ConnectToTargetAzureDbForMySqlTaskOutput + from .connect_to_target_azure_db_for_my_sql_task_input_py3 import ConnectToTargetAzureDbForMySqlTaskInput + from .connect_to_target_azure_db_for_my_sql_task_properties_py3 import ConnectToTargetAzureDbForMySqlTaskProperties + from .connect_to_target_sql_mi_task_output_py3 import ConnectToTargetSqlMITaskOutput + from .connect_to_target_sql_mi_task_input_py3 import ConnectToTargetSqlMITaskInput + from .connect_to_target_sql_mi_task_properties_py3 import ConnectToTargetSqlMITaskProperties from .database_table_py3 import DatabaseTable + from .get_user_tables_sql_sync_task_output_py3 import GetUserTablesSqlSyncTaskOutput + from .get_user_tables_sql_sync_task_input_py3 import GetUserTablesSqlSyncTaskInput + from .get_user_tables_sql_sync_task_properties_py3 import GetUserTablesSqlSyncTaskProperties from .get_user_tables_sql_task_output_py3 import GetUserTablesSqlTaskOutput from .get_user_tables_sql_task_input_py3 import GetUserTablesSqlTaskInput from .get_user_tables_sql_task_properties_py3 import GetUserTablesSqlTaskProperties from .connect_to_target_sql_db_task_output_py3 import ConnectToTargetSqlDbTaskOutput + from .connect_to_target_sql_sql_db_sync_task_input_py3 import ConnectToTargetSqlSqlDbSyncTaskInput + from .connect_to_target_sql_sql_db_sync_task_properties_py3 import ConnectToTargetSqlSqlDbSyncTaskProperties from .connect_to_target_sql_db_task_input_py3 import ConnectToTargetSqlDbTaskInput from .connect_to_target_sql_db_task_properties_py3 import ConnectToTargetSqlDbTaskProperties from .migration_eligibility_info_py3 import MigrationEligibilityInfo @@ -55,6 +123,7 @@ from .connect_to_source_sql_server_task_output_task_level_py3 import ConnectToSourceSqlServerTaskOutputTaskLevel from .connect_to_source_sql_server_task_output_py3 import ConnectToSourceSqlServerTaskOutput from .connect_to_source_sql_server_task_input_py3 import ConnectToSourceSqlServerTaskInput + from .connect_to_source_sql_server_sync_task_properties_py3 import ConnectToSourceSqlServerSyncTaskProperties from .connect_to_source_sql_server_task_properties_py3 import ConnectToSourceSqlServerTaskProperties from .project_task_properties_py3 import ProjectTaskProperties from .project_task_py3 import ProjectTask @@ -78,20 +147,88 @@ from .resource_sku_costs_py3 import ResourceSkuCosts from .resource_sku_capacity_py3 import ResourceSkuCapacity from .resource_sku_py3 import ResourceSku + from .connect_to_source_my_sql_task_input_py3 import ConnectToSourceMySqlTaskInput + from .server_properties_py3 import ServerProperties + from .connect_to_source_non_sql_task_output_py3 import ConnectToSourceNonSqlTaskOutput + from .connect_to_source_my_sql_task_properties_py3 import ConnectToSourceMySqlTaskProperties + from .schema_migration_setting_py3 import SchemaMigrationSetting + from .migrate_schema_sql_server_sql_db_database_input_py3 import MigrateSchemaSqlServerSqlDbDatabaseInput + from .migrate_schema_sql_server_sql_db_task_input_py3 import MigrateSchemaSqlServerSqlDbTaskInput + from .migrate_schema_sql_server_sql_db_task_output_py3 import MigrateSchemaSqlServerSqlDbTaskOutput + from .migrate_schema_sql_server_sql_db_task_properties_py3 import MigrateSchemaSqlServerSqlDbTaskProperties + from .migrate_schema_sql_server_sql_db_task_output_migration_level_py3 import MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel + from .migrate_schema_sql_server_sql_db_task_output_database_level_py3 import MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel + from .migrate_schema_sql_server_sql_db_task_output_error_py3 import MigrateSchemaSqlServerSqlDbTaskOutputError + from .migrate_schema_sql_task_output_error_py3 import MigrateSchemaSqlTaskOutputError from .database_py3 import Database from .database_object_name_py3 import DatabaseObjectName from .migration_table_metadata_py3 import MigrationTableMetadata from .data_migration_project_metadata_py3 import DataMigrationProjectMetadata + from .get_project_details_non_sql_task_input_py3 import GetProjectDetailsNonSqlTaskInput + from .non_sql_data_migration_table_py3 import NonSqlDataMigrationTable + from .non_sql_migration_task_input_py3 import NonSqlMigrationTaskInput from .data_migration_error_py3 import DataMigrationError - from .file_share_py3 import FileShare + from .non_sql_data_migration_table_result_py3 import NonSqlDataMigrationTableResult + from .non_sql_migration_task_output_py3 import NonSqlMigrationTaskOutput from .database_file_input_py3 import DatabaseFileInput from .migrate_sql_server_sql_server_database_input_py3 import MigrateSqlServerSqlServerDatabaseInput - from .blob_share_py3 import BlobShare - from .start_migration_scenario_server_role_result_py3 import StartMigrationScenarioServerRoleResult except (SyntaxError, ImportError): + from .odata_error import ODataError + from .reportable_exception import ReportableException + from .migrate_sync_complete_command_output import MigrateSyncCompleteCommandOutput + from .migrate_sync_complete_command_input import MigrateSyncCompleteCommandInput + from .migrate_sync_complete_command_properties import MigrateSyncCompleteCommandProperties + from .command_properties import CommandProperties from .tracked_resource import TrackedResource from .resource import Resource - from .odata_error import ODataError + from .get_tde_certificates_sql_task_output import GetTdeCertificatesSqlTaskOutput + from .selected_certificate_input import SelectedCertificateInput + from .file_share import FileShare + from .postgre_sql_connection_info import PostgreSqlConnectionInfo + from .my_sql_connection_info import MySqlConnectionInfo + from .connection_info import ConnectionInfo + from .sql_connection_info import SqlConnectionInfo + from .get_tde_certificates_sql_task_input import GetTdeCertificatesSqlTaskInput + from .get_tde_certificates_sql_task_properties import GetTdeCertificatesSqlTaskProperties + from .database_backup_info import DatabaseBackupInfo + from .validate_migration_input_sql_server_sql_mi_task_output import ValidateMigrationInputSqlServerSqlMITaskOutput + from .blob_share import BlobShare + from .migrate_sql_server_sql_mi_database_input import MigrateSqlServerSqlMIDatabaseInput + from .validate_migration_input_sql_server_sql_mi_task_input import ValidateMigrationInputSqlServerSqlMITaskInput + from .validate_migration_input_sql_server_sql_mi_task_properties import ValidateMigrationInputSqlServerSqlMITaskProperties + from .validate_sync_migration_input_sql_server_task_output import ValidateSyncMigrationInputSqlServerTaskOutput + from .migrate_sql_server_sql_db_sync_database_input import MigrateSqlServerSqlDbSyncDatabaseInput + from .validate_sync_migration_input_sql_server_task_input import ValidateSyncMigrationInputSqlServerTaskInput + from .validate_migration_input_sql_server_sql_db_sync_task_properties import ValidateMigrationInputSqlServerSqlDbSyncTaskProperties + from .sync_migration_database_error_event import SyncMigrationDatabaseErrorEvent + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput + from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error import MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_error import MigrateMySqlAzureDbForMySqlSyncTaskOutputError + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level import MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level import MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level import MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel + from .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + from .migrate_my_sql_azure_db_for_my_sql_sync_database_input import MigrateMySqlAzureDbForMySqlSyncDatabaseInput + from .migrate_my_sql_azure_db_for_my_sql_sync_task_input import MigrateMySqlAzureDbForMySqlSyncTaskInput + from .migrate_my_sql_azure_db_for_my_sql_sync_task_properties import MigrateMySqlAzureDbForMySqlSyncTaskProperties + from .migrate_sql_server_sql_db_sync_task_output_database_error import MigrateSqlServerSqlDbSyncTaskOutputDatabaseError + from .migrate_sql_server_sql_db_sync_task_output_error import MigrateSqlServerSqlDbSyncTaskOutputError + from .migrate_sql_server_sql_db_sync_task_output_table_level import MigrateSqlServerSqlDbSyncTaskOutputTableLevel + from .migrate_sql_server_sql_db_sync_task_output_database_level import MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel + from .migrate_sql_server_sql_db_sync_task_output_migration_level import MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel + from .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + from .sql_migration_task_input import SqlMigrationTaskInput + from .migration_validation_options import MigrationValidationOptions + from .migrate_sql_server_sql_db_sync_task_input import MigrateSqlServerSqlDbSyncTaskInput + from .migrate_sql_server_sql_db_sync_task_properties import MigrateSqlServerSqlDbSyncTaskProperties from .validation_error import ValidationError from .wait_statistics import WaitStatistics from .execution_statistics import ExecutionStatistics @@ -103,7 +240,6 @@ from .migration_validation_database_level_result import MigrationValidationDatabaseLevelResult from .migration_validation_database_summary_result import MigrationValidationDatabaseSummaryResult from .migration_validation_result import MigrationValidationResult - from .reportable_exception import ReportableException from .migrate_sql_server_sql_db_task_output_error import MigrateSqlServerSqlDbTaskOutputError from .migrate_sql_server_sql_db_task_output_table_level import MigrateSqlServerSqlDbTaskOutputTableLevel from .data_item_migration_summary_result import DataItemMigrationSummaryResult @@ -112,18 +248,34 @@ from .database_summary_result import DatabaseSummaryResult from .migrate_sql_server_sql_db_task_output_migration_level import MigrateSqlServerSqlDbTaskOutputMigrationLevel from .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput - from .connection_info import ConnectionInfo - from .sql_connection_info import SqlConnectionInfo - from .sql_migration_task_input import SqlMigrationTaskInput - from .migration_validation_options import MigrationValidationOptions from .migrate_sql_server_sql_db_database_input import MigrateSqlServerSqlDbDatabaseInput from .migrate_sql_server_sql_db_task_input import MigrateSqlServerSqlDbTaskInput from .migrate_sql_server_sql_db_task_properties import MigrateSqlServerSqlDbTaskProperties + from .migrate_sql_server_sql_mi_task_output_error import MigrateSqlServerSqlMITaskOutputError + from .migrate_sql_server_sql_mi_task_output_login_level import MigrateSqlServerSqlMITaskOutputLoginLevel + from .migrate_sql_server_sql_mi_task_output_agent_job_level import MigrateSqlServerSqlMITaskOutputAgentJobLevel + from .migrate_sql_server_sql_mi_task_output_database_level import MigrateSqlServerSqlMITaskOutputDatabaseLevel + from .start_migration_scenario_server_role_result import StartMigrationScenarioServerRoleResult + from .migrate_sql_server_sql_mi_task_output_migration_level import MigrateSqlServerSqlMITaskOutputMigrationLevel + from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + from .migrate_sql_server_sql_mi_task_input import MigrateSqlServerSqlMITaskInput + from .migrate_sql_server_sql_mi_task_properties import MigrateSqlServerSqlMITaskProperties + from .connect_to_target_azure_db_for_my_sql_task_output import ConnectToTargetAzureDbForMySqlTaskOutput + from .connect_to_target_azure_db_for_my_sql_task_input import ConnectToTargetAzureDbForMySqlTaskInput + from .connect_to_target_azure_db_for_my_sql_task_properties import ConnectToTargetAzureDbForMySqlTaskProperties + from .connect_to_target_sql_mi_task_output import ConnectToTargetSqlMITaskOutput + from .connect_to_target_sql_mi_task_input import ConnectToTargetSqlMITaskInput + from .connect_to_target_sql_mi_task_properties import ConnectToTargetSqlMITaskProperties from .database_table import DatabaseTable + from .get_user_tables_sql_sync_task_output import GetUserTablesSqlSyncTaskOutput + from .get_user_tables_sql_sync_task_input import GetUserTablesSqlSyncTaskInput + from .get_user_tables_sql_sync_task_properties import GetUserTablesSqlSyncTaskProperties from .get_user_tables_sql_task_output import GetUserTablesSqlTaskOutput from .get_user_tables_sql_task_input import GetUserTablesSqlTaskInput from .get_user_tables_sql_task_properties import GetUserTablesSqlTaskProperties from .connect_to_target_sql_db_task_output import ConnectToTargetSqlDbTaskOutput + from .connect_to_target_sql_sql_db_sync_task_input import ConnectToTargetSqlSqlDbSyncTaskInput + from .connect_to_target_sql_sql_db_sync_task_properties import ConnectToTargetSqlSqlDbSyncTaskProperties from .connect_to_target_sql_db_task_input import ConnectToTargetSqlDbTaskInput from .connect_to_target_sql_db_task_properties import ConnectToTargetSqlDbTaskProperties from .migration_eligibility_info import MigrationEligibilityInfo @@ -134,6 +286,7 @@ from .connect_to_source_sql_server_task_output_task_level import ConnectToSourceSqlServerTaskOutputTaskLevel from .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput from .connect_to_source_sql_server_task_input import ConnectToSourceSqlServerTaskInput + from .connect_to_source_sql_server_sync_task_properties import ConnectToSourceSqlServerSyncTaskProperties from .connect_to_source_sql_server_task_properties import ConnectToSourceSqlServerTaskProperties from .project_task_properties import ProjectTaskProperties from .project_task import ProjectTask @@ -157,16 +310,31 @@ from .resource_sku_costs import ResourceSkuCosts from .resource_sku_capacity import ResourceSkuCapacity from .resource_sku import ResourceSku + from .connect_to_source_my_sql_task_input import ConnectToSourceMySqlTaskInput + from .server_properties import ServerProperties + from .connect_to_source_non_sql_task_output import ConnectToSourceNonSqlTaskOutput + from .connect_to_source_my_sql_task_properties import ConnectToSourceMySqlTaskProperties + from .schema_migration_setting import SchemaMigrationSetting + from .migrate_schema_sql_server_sql_db_database_input import MigrateSchemaSqlServerSqlDbDatabaseInput + from .migrate_schema_sql_server_sql_db_task_input import MigrateSchemaSqlServerSqlDbTaskInput + from .migrate_schema_sql_server_sql_db_task_output import MigrateSchemaSqlServerSqlDbTaskOutput + from .migrate_schema_sql_server_sql_db_task_properties import MigrateSchemaSqlServerSqlDbTaskProperties + from .migrate_schema_sql_server_sql_db_task_output_migration_level import MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel + from .migrate_schema_sql_server_sql_db_task_output_database_level import MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel + from .migrate_schema_sql_server_sql_db_task_output_error import MigrateSchemaSqlServerSqlDbTaskOutputError + from .migrate_schema_sql_task_output_error import MigrateSchemaSqlTaskOutputError from .database import Database from .database_object_name import DatabaseObjectName from .migration_table_metadata import MigrationTableMetadata from .data_migration_project_metadata import DataMigrationProjectMetadata + from .get_project_details_non_sql_task_input import GetProjectDetailsNonSqlTaskInput + from .non_sql_data_migration_table import NonSqlDataMigrationTable + from .non_sql_migration_task_input import NonSqlMigrationTaskInput from .data_migration_error import DataMigrationError - from .file_share import FileShare + from .non_sql_data_migration_table_result import NonSqlDataMigrationTableResult + from .non_sql_migration_task_output import NonSqlMigrationTaskOutput from .database_file_input import DatabaseFileInput from .migrate_sql_server_sql_server_database_input import MigrateSqlServerSqlServerDatabaseInput - from .blob_share import BlobShare - from .start_migration_scenario_server_role_result import StartMigrationScenarioServerRoleResult from .resource_sku_paged import ResourceSkuPaged from .available_service_sku_paged import AvailableServiceSkuPaged from .data_migration_service_paged import DataMigrationServicePaged @@ -175,6 +343,13 @@ from .quota_paged import QuotaPaged from .service_operation_paged import ServiceOperationPaged from .data_migration_service_client_enums import ( + CommandState, + SqlSourcePlatform, + AuthenticationType, + BackupType, + BackupMode, + SyncTableMigrationState, + SyncDatabaseMigrationReportingState, ValidationStatus, Severity, UpdateActionType, @@ -182,7 +357,7 @@ MigrationState, DatabaseMigrationStage, MigrationStatus, - AuthenticationType, + LoginMigrationStage, LoginType, DatabaseState, DatabaseCompatLevel, @@ -198,14 +373,70 @@ ResourceSkuRestrictionsType, ResourceSkuRestrictionsReasonCode, ResourceSkuCapacityScaleType, + MySqlTargetPlatformType, + SchemaMigrationOption, + SchemaMigrationStage, + DataMigrationResultCode, ErrorType, - LoginMigrationStage, ) __all__ = [ + 'ODataError', + 'ReportableException', + 'MigrateSyncCompleteCommandOutput', + 'MigrateSyncCompleteCommandInput', + 'MigrateSyncCompleteCommandProperties', + 'CommandProperties', 'TrackedResource', 'Resource', - 'ODataError', + 'GetTdeCertificatesSqlTaskOutput', + 'SelectedCertificateInput', + 'FileShare', + 'PostgreSqlConnectionInfo', + 'MySqlConnectionInfo', + 'ConnectionInfo', + 'SqlConnectionInfo', + 'GetTdeCertificatesSqlTaskInput', + 'GetTdeCertificatesSqlTaskProperties', + 'DatabaseBackupInfo', + 'ValidateMigrationInputSqlServerSqlMITaskOutput', + 'BlobShare', + 'MigrateSqlServerSqlMIDatabaseInput', + 'ValidateMigrationInputSqlServerSqlMITaskInput', + 'ValidateMigrationInputSqlServerSqlMITaskProperties', + 'ValidateSyncMigrationInputSqlServerTaskOutput', + 'MigrateSqlServerSqlDbSyncDatabaseInput', + 'ValidateSyncMigrationInputSqlServerTaskInput', + 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', + 'SyncMigrationDatabaseErrorEvent', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputError', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutput', + 'MigrateMySqlAzureDbForMySqlSyncDatabaseInput', + 'MigrateMySqlAzureDbForMySqlSyncTaskInput', + 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', + 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseError', + 'MigrateSqlServerSqlDbSyncTaskOutputError', + 'MigrateSqlServerSqlDbSyncTaskOutputTableLevel', + 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel', + 'MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel', + 'MigrateSqlServerSqlDbSyncTaskOutput', + 'SqlMigrationTaskInput', + 'MigrationValidationOptions', + 'MigrateSqlServerSqlDbSyncTaskInput', + 'MigrateSqlServerSqlDbSyncTaskProperties', 'ValidationError', 'WaitStatistics', 'ExecutionStatistics', @@ -217,7 +448,6 @@ 'MigrationValidationDatabaseLevelResult', 'MigrationValidationDatabaseSummaryResult', 'MigrationValidationResult', - 'ReportableException', 'MigrateSqlServerSqlDbTaskOutputError', 'MigrateSqlServerSqlDbTaskOutputTableLevel', 'DataItemMigrationSummaryResult', @@ -226,18 +456,34 @@ 'DatabaseSummaryResult', 'MigrateSqlServerSqlDbTaskOutputMigrationLevel', 'MigrateSqlServerSqlDbTaskOutput', - 'ConnectionInfo', - 'SqlConnectionInfo', - 'SqlMigrationTaskInput', - 'MigrationValidationOptions', 'MigrateSqlServerSqlDbDatabaseInput', 'MigrateSqlServerSqlDbTaskInput', 'MigrateSqlServerSqlDbTaskProperties', + 'MigrateSqlServerSqlMITaskOutputError', + 'MigrateSqlServerSqlMITaskOutputLoginLevel', + 'MigrateSqlServerSqlMITaskOutputAgentJobLevel', + 'MigrateSqlServerSqlMITaskOutputDatabaseLevel', + 'StartMigrationScenarioServerRoleResult', + 'MigrateSqlServerSqlMITaskOutputMigrationLevel', + 'MigrateSqlServerSqlMITaskOutput', + 'MigrateSqlServerSqlMITaskInput', + 'MigrateSqlServerSqlMITaskProperties', + 'ConnectToTargetAzureDbForMySqlTaskOutput', + 'ConnectToTargetAzureDbForMySqlTaskInput', + 'ConnectToTargetAzureDbForMySqlTaskProperties', + 'ConnectToTargetSqlMITaskOutput', + 'ConnectToTargetSqlMITaskInput', + 'ConnectToTargetSqlMITaskProperties', 'DatabaseTable', + 'GetUserTablesSqlSyncTaskOutput', + 'GetUserTablesSqlSyncTaskInput', + 'GetUserTablesSqlSyncTaskProperties', 'GetUserTablesSqlTaskOutput', 'GetUserTablesSqlTaskInput', 'GetUserTablesSqlTaskProperties', 'ConnectToTargetSqlDbTaskOutput', + 'ConnectToTargetSqlSqlDbSyncTaskInput', + 'ConnectToTargetSqlSqlDbSyncTaskProperties', 'ConnectToTargetSqlDbTaskInput', 'ConnectToTargetSqlDbTaskProperties', 'MigrationEligibilityInfo', @@ -248,6 +494,7 @@ 'ConnectToSourceSqlServerTaskOutputTaskLevel', 'ConnectToSourceSqlServerTaskOutput', 'ConnectToSourceSqlServerTaskInput', + 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToSourceSqlServerTaskProperties', 'ProjectTaskProperties', 'ProjectTask', @@ -271,16 +518,31 @@ 'ResourceSkuCosts', 'ResourceSkuCapacity', 'ResourceSku', + 'ConnectToSourceMySqlTaskInput', + 'ServerProperties', + 'ConnectToSourceNonSqlTaskOutput', + 'ConnectToSourceMySqlTaskProperties', + 'SchemaMigrationSetting', + 'MigrateSchemaSqlServerSqlDbDatabaseInput', + 'MigrateSchemaSqlServerSqlDbTaskInput', + 'MigrateSchemaSqlServerSqlDbTaskOutput', + 'MigrateSchemaSqlServerSqlDbTaskProperties', + 'MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel', + 'MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel', + 'MigrateSchemaSqlServerSqlDbTaskOutputError', + 'MigrateSchemaSqlTaskOutputError', 'Database', 'DatabaseObjectName', 'MigrationTableMetadata', 'DataMigrationProjectMetadata', + 'GetProjectDetailsNonSqlTaskInput', + 'NonSqlDataMigrationTable', + 'NonSqlMigrationTaskInput', 'DataMigrationError', - 'FileShare', + 'NonSqlDataMigrationTableResult', + 'NonSqlMigrationTaskOutput', 'DatabaseFileInput', 'MigrateSqlServerSqlServerDatabaseInput', - 'BlobShare', - 'StartMigrationScenarioServerRoleResult', 'ResourceSkuPaged', 'AvailableServiceSkuPaged', 'DataMigrationServicePaged', @@ -288,6 +550,13 @@ 'ProjectPaged', 'QuotaPaged', 'ServiceOperationPaged', + 'CommandState', + 'SqlSourcePlatform', + 'AuthenticationType', + 'BackupType', + 'BackupMode', + 'SyncTableMigrationState', + 'SyncDatabaseMigrationReportingState', 'ValidationStatus', 'Severity', 'UpdateActionType', @@ -295,7 +564,7 @@ 'MigrationState', 'DatabaseMigrationStage', 'MigrationStatus', - 'AuthenticationType', + 'LoginMigrationStage', 'LoginType', 'DatabaseState', 'DatabaseCompatLevel', @@ -311,6 +580,9 @@ 'ResourceSkuRestrictionsType', 'ResourceSkuRestrictionsReasonCode', 'ResourceSkuCapacityScaleType', + 'MySqlTargetPlatformType', + 'SchemaMigrationOption', + 'SchemaMigrationStage', + 'DataMigrationResultCode', 'ErrorType', - 'LoginMigrationStage', ] diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/available_service_sku_sku.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/available_service_sku_sku.py index 856ecbb729dc..dd2a4c97f593 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/available_service_sku_sku.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/available_service_sku_sku.py @@ -21,8 +21,8 @@ class AvailableServiceSkuSku(Model): :type family: str :param size: SKU size :type size: str - :param tier: The tier of the SKU, such as "Free", "Basic", "Standard", or - "Premium" + :param tier: The tier of the SKU, such as "Basic", "General Purpose", or + "Business Critical" :type tier: str """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/available_service_sku_sku_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/available_service_sku_sku_py3.py index f8bd991360d9..6051099d109a 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/available_service_sku_sku_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/available_service_sku_sku_py3.py @@ -21,8 +21,8 @@ class AvailableServiceSkuSku(Model): :type family: str :param size: SKU size :type size: str - :param tier: The tier of the SKU, such as "Free", "Basic", "Standard", or - "Premium" + :param tier: The tier of the SKU, such as "Basic", "General Purpose", or + "Business Critical" :type tier: str """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties.py new file mode 100644 index 000000000000..74947a116cde --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CommandProperties(Model): + """Base class for all types of DMS command properties. If command is not + supported by current client, this object is returned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSyncCompleteCommandProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. + Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', + 'Failed' + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param command_type: Required. Constant filled by server. + :type command_type: str + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'command_type': {'required': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'command_type': {'key': 'commandType', 'type': 'str'}, + } + + _subtype_map = { + 'command_type': {'Migrate.Sync.Complete.Database': 'MigrateSyncCompleteCommandProperties'} + } + + def __init__(self, **kwargs): + super(CommandProperties, self).__init__(**kwargs) + self.errors = None + self.state = None + self.command_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties_py3.py new file mode 100644 index 000000000000..1e050060e555 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CommandProperties(Model): + """Base class for all types of DMS command properties. If command is not + supported by current client, this object is returned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSyncCompleteCommandProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. + Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', + 'Failed' + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param command_type: Required. Constant filled by server. + :type command_type: str + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'command_type': {'required': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'command_type': {'key': 'commandType', 'type': 'str'}, + } + + _subtype_map = { + 'command_type': {'Migrate.Sync.Complete.Database': 'MigrateSyncCompleteCommandProperties'} + } + + def __init__(self, **kwargs) -> None: + super(CommandProperties, self).__init__(**kwargs) + self.errors = None + self.state = None + self.command_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_input.py new file mode 100644 index 000000000000..1a558b2caf88 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_input.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToSourceMySqlTaskInput(Model): + """Input for the task that validates MySQL database connection. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + MySQL source + :type source_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_platform: Target Platform for the migration. Possible values + include: 'AzureDbForMySQL' + :type target_platform: str or + ~azure.mgmt.datamigration.models.MySqlTargetPlatformType + :param check_permissions_group: Permission group for validations. Possible + values include: 'Default', 'MigrationFromSqlServerToAzureDB', + 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' + :type check_permissions_group: str or + ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_platform': {'key': 'targetPlatform', 'type': 'str'}, + 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectToSourceMySqlTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs.get('source_connection_info', None) + self.target_platform = kwargs.get('target_platform', None) + self.check_permissions_group = kwargs.get('check_permissions_group', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_input_py3.py new file mode 100644 index 000000000000..7efb73a3bf0f --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_input_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToSourceMySqlTaskInput(Model): + """Input for the task that validates MySQL database connection. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + MySQL source + :type source_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_platform: Target Platform for the migration. Possible values + include: 'AzureDbForMySQL' + :type target_platform: str or + ~azure.mgmt.datamigration.models.MySqlTargetPlatformType + :param check_permissions_group: Permission group for validations. Possible + values include: 'Default', 'MigrationFromSqlServerToAzureDB', + 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' + :type check_permissions_group: str or + ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_platform': {'key': 'targetPlatform', 'type': 'str'}, + 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, + } + + def __init__(self, *, source_connection_info, target_platform=None, check_permissions_group=None, **kwargs) -> None: + super(ConnectToSourceMySqlTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_platform = target_platform + self.check_permissions_group = check_permissions_group diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_properties.py new file mode 100644 index 000000000000..48abf926bbfe --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_properties.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class ConnectToSourceMySqlTaskProperties(ProjectTaskProperties): + """Properties for the task that validates MySQL database connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToSourceMySqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToSourceNonSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceNonSqlTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(ConnectToSourceMySqlTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'ConnectToSource.MySql' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_properties_py3.py new file mode 100644 index 000000000000..8ede548132eb --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_my_sql_task_properties_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class ConnectToSourceMySqlTaskProperties(ProjectTaskProperties): + """Properties for the task that validates MySQL database connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToSourceMySqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToSourceNonSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceNonSqlTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(ConnectToSourceMySqlTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'ConnectToSource.MySql' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_non_sql_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_non_sql_task_output.py new file mode 100644 index 000000000000..9cf392d2263a --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_non_sql_task_output.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToSourceNonSqlTaskOutput(Model): + """Output for connect to Oracle, MySQL type source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar source_server_brand_version: Server brand version + :vartype source_server_brand_version: str + :ivar server_properties: Server properties + :vartype server_properties: + ~azure.mgmt.datamigration.models.ServerProperties + :ivar databases: List of databases on the server + :vartype databases: list[str] + :ivar validation_errors: Validation errors associated with the task + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'server_properties': {'readonly': True}, + 'databases': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'server_properties': {'key': 'serverProperties', 'type': 'ServerProperties'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(ConnectToSourceNonSqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.source_server_brand_version = None + self.server_properties = None + self.databases = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_non_sql_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_non_sql_task_output_py3.py new file mode 100644 index 000000000000..c29eaeef1cc8 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_non_sql_task_output_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToSourceNonSqlTaskOutput(Model): + """Output for connect to Oracle, MySQL type source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar source_server_brand_version: Server brand version + :vartype source_server_brand_version: str + :ivar server_properties: Server properties + :vartype server_properties: + ~azure.mgmt.datamigration.models.ServerProperties + :ivar databases: List of databases on the server + :vartype databases: list[str] + :ivar validation_errors: Validation errors associated with the task + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'server_properties': {'readonly': True}, + 'databases': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'server_properties': {'key': 'serverProperties', 'type': 'ServerProperties'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectToSourceNonSqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.source_server_brand_version = None + self.server_properties = None + self.databases = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_sync_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_sync_task_properties.py new file mode 100644 index 000000000000..5952b7f6b083 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_sync_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class ConnectToSourceSqlServerSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL Server and source + server requirements for online migration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceSqlServerTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(ConnectToSourceSqlServerSyncTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'ConnectToSource.SqlServer.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_sync_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_sync_task_properties_py3.py new file mode 100644 index 000000000000..f053267bf88a --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_sync_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class ConnectToSourceSqlServerSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL Server and source + server requirements for online migration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceSqlServerTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(ConnectToSourceSqlServerSyncTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'ConnectToSource.SqlServer.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py index a7cc0d41dd7e..a81daa14660e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py @@ -23,7 +23,8 @@ class ConnectToSourceSqlServerTaskInput(Model): :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo :param check_permissions_group: Permission group for validations. Possible - values include: 'Default', 'MigrationFromSqlServerToAzureDB' + values include: 'Default', 'MigrationFromSqlServerToAzureDB', + 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' :type check_permissions_group: str or ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup :param collect_logins: Flag for whether to collect logins from source @@ -32,6 +33,9 @@ class ConnectToSourceSqlServerTaskInput(Model): :param collect_agent_jobs: Flag for whether to collect agent jobs from source server. Default value: False . :type collect_agent_jobs: bool + :param collect_tde_certificate_info: Flag for whether to collect TDE + Certificate names from source server. Default value: False . + :type collect_tde_certificate_info: bool """ _validation = { @@ -43,6 +47,7 @@ class ConnectToSourceSqlServerTaskInput(Model): 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, 'collect_logins': {'key': 'collectLogins', 'type': 'bool'}, 'collect_agent_jobs': {'key': 'collectAgentJobs', 'type': 'bool'}, + 'collect_tde_certificate_info': {'key': 'collectTdeCertificateInfo', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -51,3 +56,4 @@ def __init__(self, **kwargs): self.check_permissions_group = kwargs.get('check_permissions_group', None) self.collect_logins = kwargs.get('collect_logins', False) self.collect_agent_jobs = kwargs.get('collect_agent_jobs', False) + self.collect_tde_certificate_info = kwargs.get('collect_tde_certificate_info', False) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input_py3.py index db247d3cb17b..30afc6f8d8cd 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_input_py3.py @@ -23,7 +23,8 @@ class ConnectToSourceSqlServerTaskInput(Model): :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo :param check_permissions_group: Permission group for validations. Possible - values include: 'Default', 'MigrationFromSqlServerToAzureDB' + values include: 'Default', 'MigrationFromSqlServerToAzureDB', + 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' :type check_permissions_group: str or ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup :param collect_logins: Flag for whether to collect logins from source @@ -32,6 +33,9 @@ class ConnectToSourceSqlServerTaskInput(Model): :param collect_agent_jobs: Flag for whether to collect agent jobs from source server. Default value: False . :type collect_agent_jobs: bool + :param collect_tde_certificate_info: Flag for whether to collect TDE + Certificate names from source server. Default value: False . + :type collect_tde_certificate_info: bool """ _validation = { @@ -43,11 +47,13 @@ class ConnectToSourceSqlServerTaskInput(Model): 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, 'collect_logins': {'key': 'collectLogins', 'type': 'bool'}, 'collect_agent_jobs': {'key': 'collectAgentJobs', 'type': 'bool'}, + 'collect_tde_certificate_info': {'key': 'collectTdeCertificateInfo', 'type': 'bool'}, } - def __init__(self, *, source_connection_info, check_permissions_group=None, collect_logins: bool=False, collect_agent_jobs: bool=False, **kwargs) -> None: + def __init__(self, *, source_connection_info, check_permissions_group=None, collect_logins: bool=False, collect_agent_jobs: bool=False, collect_tde_certificate_info: bool=False, **kwargs) -> None: super(ConnectToSourceSqlServerTaskInput, self).__init__(**kwargs) self.source_connection_info = source_connection_info self.check_permissions_group = check_permissions_group self.collect_logins = collect_logins self.collect_agent_jobs = collect_agent_jobs + self.collect_tde_certificate_info = collect_tde_certificate_info diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py index 973bec72df1e..5e94d9de1293 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py @@ -13,7 +13,7 @@ class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTaskOutput): - """AgentJob level output for the task that validates connection to SQL Server + """Agent Job level output for the task that validates connection to SQL Server and also validates source server requirements. Variables are only populated by the server, and will be ignored when @@ -25,17 +25,20 @@ class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTa :vartype id: str :param result_type: Required. Constant filled by server. :type result_type: str - :ivar name: AgentJob name + :ivar name: Agent Job name :vartype name: str - :ivar job_category: The type of AgentJob. + :ivar job_category: The type of Agent Job. :vartype job_category: str - :ivar is_enabled: The state of the original AgentJob. + :ivar is_enabled: The state of the original Agent Job. :vartype is_enabled: bool - :ivar job_owner: The owner of the AgentJob + :ivar job_owner: The owner of the Agent Job :vartype job_owner: str - :ivar last_executed_on: UTC Date and time when the AgentJob was last + :ivar last_executed_on: UTC Date and time when the Agent Job was last executed. :vartype last_executed_on: datetime + :ivar validation_errors: Validation errors + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] :ivar migration_eligibility: Information about eligiblity of agent job for migration. :vartype migration_eligibility: @@ -50,6 +53,7 @@ class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTa 'is_enabled': {'readonly': True}, 'job_owner': {'readonly': True}, 'last_executed_on': {'readonly': True}, + 'validation_errors': {'readonly': True}, 'migration_eligibility': {'readonly': True}, } @@ -61,6 +65,7 @@ class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTa 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'job_owner': {'key': 'jobOwner', 'type': 'str'}, 'last_executed_on': {'key': 'lastExecutedOn', 'type': 'iso-8601'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, 'migration_eligibility': {'key': 'migrationEligibility', 'type': 'MigrationEligibilityInfo'}, } @@ -71,5 +76,6 @@ def __init__(self, **kwargs): self.is_enabled = None self.job_owner = None self.last_executed_on = None + self.validation_errors = None self.migration_eligibility = None self.result_type = 'AgentJobLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level_py3.py index 2380a3f6ff12..ee49275f2e0b 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level_py3.py @@ -13,7 +13,7 @@ class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTaskOutput): - """AgentJob level output for the task that validates connection to SQL Server + """Agent Job level output for the task that validates connection to SQL Server and also validates source server requirements. Variables are only populated by the server, and will be ignored when @@ -25,17 +25,20 @@ class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTa :vartype id: str :param result_type: Required. Constant filled by server. :type result_type: str - :ivar name: AgentJob name + :ivar name: Agent Job name :vartype name: str - :ivar job_category: The type of AgentJob. + :ivar job_category: The type of Agent Job. :vartype job_category: str - :ivar is_enabled: The state of the original AgentJob. + :ivar is_enabled: The state of the original Agent Job. :vartype is_enabled: bool - :ivar job_owner: The owner of the AgentJob + :ivar job_owner: The owner of the Agent Job :vartype job_owner: str - :ivar last_executed_on: UTC Date and time when the AgentJob was last + :ivar last_executed_on: UTC Date and time when the Agent Job was last executed. :vartype last_executed_on: datetime + :ivar validation_errors: Validation errors + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] :ivar migration_eligibility: Information about eligiblity of agent job for migration. :vartype migration_eligibility: @@ -50,6 +53,7 @@ class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTa 'is_enabled': {'readonly': True}, 'job_owner': {'readonly': True}, 'last_executed_on': {'readonly': True}, + 'validation_errors': {'readonly': True}, 'migration_eligibility': {'readonly': True}, } @@ -61,6 +65,7 @@ class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTa 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'job_owner': {'key': 'jobOwner', 'type': 'str'}, 'last_executed_on': {'key': 'lastExecutedOn', 'type': 'iso-8601'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, 'migration_eligibility': {'key': 'migrationEligibility', 'type': 'MigrationEligibilityInfo'}, } @@ -71,5 +76,6 @@ def __init__(self, **kwargs) -> None: self.is_enabled = None self.job_owner = None self.last_executed_on = None + self.validation_errors = None self.migration_eligibility = None self.result_type = 'AgentJobLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level.py index ad28eb21c17e..1e66cb6fce94 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level.py @@ -55,7 +55,7 @@ class ConnectToSourceSqlServerTaskOutputLoginLevel(ConnectToSourceSqlServerTaskO 'id': {'key': 'id', 'type': 'str'}, 'result_type': {'key': 'resultType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'login_type': {'key': 'loginType', 'type': 'LoginType'}, + 'login_type': {'key': 'loginType', 'type': 'str'}, 'default_database': {'key': 'defaultDatabase', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'migration_eligibility': {'key': 'migrationEligibility', 'type': 'MigrationEligibilityInfo'}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level_py3.py index a02d6b46a3df..43367462ae9c 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level_py3.py @@ -55,7 +55,7 @@ class ConnectToSourceSqlServerTaskOutputLoginLevel(ConnectToSourceSqlServerTaskO 'id': {'key': 'id', 'type': 'str'}, 'result_type': {'key': 'resultType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'login_type': {'key': 'loginType', 'type': 'LoginType'}, + 'login_type': {'key': 'loginType', 'type': 'str'}, 'default_database': {'key': 'defaultDatabase', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'migration_eligibility': {'key': 'migrationEligibility', 'type': 'MigrationEligibilityInfo'}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py index e6d060ea8e71..387bb04e7ab1 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py @@ -32,6 +32,9 @@ class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOu :vartype logins: dict[str, str] :ivar agent_jobs: Source agent jobs as a map from agent job name to id. :vartype agent_jobs: dict[str, str] + :ivar database_tde_certificate_mapping: Mapping from database name to TDE + certificate name, if applicable + :vartype database_tde_certificate_mapping: dict[str, str] :ivar source_server_version: Source server version :vartype source_server_version: str :ivar source_server_brand_version: Source server brand version @@ -47,6 +50,7 @@ class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOu 'databases': {'readonly': True}, 'logins': {'readonly': True}, 'agent_jobs': {'readonly': True}, + 'database_tde_certificate_mapping': {'readonly': True}, 'source_server_version': {'readonly': True}, 'source_server_brand_version': {'readonly': True}, 'validation_errors': {'readonly': True}, @@ -58,6 +62,7 @@ class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOu 'databases': {'key': 'databases', 'type': '{str}'}, 'logins': {'key': 'logins', 'type': '{str}'}, 'agent_jobs': {'key': 'agentJobs', 'type': '{str}'}, + 'database_tde_certificate_mapping': {'key': 'databaseTdeCertificateMapping', 'type': '{str}'}, 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, @@ -68,6 +73,7 @@ def __init__(self, **kwargs): self.databases = None self.logins = None self.agent_jobs = None + self.database_tde_certificate_mapping = None self.source_server_version = None self.source_server_brand_version = None self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level_py3.py index 35fda096b09d..c5576f17315f 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level_py3.py @@ -32,6 +32,9 @@ class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOu :vartype logins: dict[str, str] :ivar agent_jobs: Source agent jobs as a map from agent job name to id. :vartype agent_jobs: dict[str, str] + :ivar database_tde_certificate_mapping: Mapping from database name to TDE + certificate name, if applicable + :vartype database_tde_certificate_mapping: dict[str, str] :ivar source_server_version: Source server version :vartype source_server_version: str :ivar source_server_brand_version: Source server brand version @@ -47,6 +50,7 @@ class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOu 'databases': {'readonly': True}, 'logins': {'readonly': True}, 'agent_jobs': {'readonly': True}, + 'database_tde_certificate_mapping': {'readonly': True}, 'source_server_version': {'readonly': True}, 'source_server_brand_version': {'readonly': True}, 'validation_errors': {'readonly': True}, @@ -58,6 +62,7 @@ class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOu 'databases': {'key': 'databases', 'type': '{str}'}, 'logins': {'key': 'logins', 'type': '{str}'}, 'agent_jobs': {'key': 'agentJobs', 'type': '{str}'}, + 'database_tde_certificate_mapping': {'key': 'databaseTdeCertificateMapping', 'type': '{str}'}, 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, @@ -68,6 +73,7 @@ def __init__(self, **kwargs) -> None: self.databases = None self.logins = None self.agent_jobs = None + self.database_tde_certificate_mapping = None self.source_server_version = None self.source_server_brand_version = None self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py index 01f6e015c94c..3e7a2f75f429 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py @@ -21,12 +21,15 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :param errors: Array of errors. This is ignored if submitted. - :type errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] :param task_type: Required. Constant filled by server. :type task_type: str :param input: Task input @@ -38,7 +41,9 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): """ _validation = { + 'errors': {'readonly': True}, 'state': {'readonly': True}, + 'commands': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, } @@ -46,6 +51,7 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): _attribute_map = { 'errors': {'key': 'errors', 'type': '[ODataError]'}, 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'task_type': {'key': 'taskType', 'type': 'str'}, 'input': {'key': 'input', 'type': 'ConnectToSourceSqlServerTaskInput'}, 'output': {'key': 'output', 'type': '[ConnectToSourceSqlServerTaskOutput]'}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties_py3.py index aff6212ab398..2919e63b85be 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_source_sql_server_task_properties_py3.py @@ -21,12 +21,15 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :param errors: Array of errors. This is ignored if submitted. - :type errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] :param task_type: Required. Constant filled by server. :type task_type: str :param input: Task input @@ -38,7 +41,9 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): """ _validation = { + 'errors': {'readonly': True}, 'state': {'readonly': True}, + 'commands': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, } @@ -46,13 +51,14 @@ class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): _attribute_map = { 'errors': {'key': 'errors', 'type': '[ODataError]'}, 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'task_type': {'key': 'taskType', 'type': 'str'}, 'input': {'key': 'input', 'type': 'ConnectToSourceSqlServerTaskInput'}, 'output': {'key': 'output', 'type': '[ConnectToSourceSqlServerTaskOutput]'}, } - def __init__(self, *, errors=None, input=None, **kwargs) -> None: - super(ConnectToSourceSqlServerTaskProperties, self).__init__(errors=errors, **kwargs) + def __init__(self, *, input=None, **kwargs) -> None: + super(ConnectToSourceSqlServerTaskProperties, self).__init__(**kwargs) self.input = input self.output = None self.task_type = 'ConnectToSource.SqlServer' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py new file mode 100644 index 000000000000..3a68faf64099 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToTargetAzureDbForMySqlTaskInput(Model): + """Input for the task that validates connection to Azure Database for MySQL + and target server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source + MySQL server + :type source_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Required. Connection information for target + Azure Database for MySQL server + :type target_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + } + + def __init__(self, **kwargs): + super(ConnectToTargetAzureDbForMySqlTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs.get('source_connection_info', None) + self.target_connection_info = kwargs.get('target_connection_info', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input_py3.py new file mode 100644 index 000000000000..e8c5c825fde4 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToTargetAzureDbForMySqlTaskInput(Model): + """Input for the task that validates connection to Azure Database for MySQL + and target server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source + MySQL server + :type source_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Required. Connection information for target + Azure Database for MySQL server + :type target_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + } + + def __init__(self, *, source_connection_info, target_connection_info, **kwargs) -> None: + super(ConnectToTargetAzureDbForMySqlTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py new file mode 100644 index 000000000000..d8422e1ce711 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToTargetAzureDbForMySqlTaskOutput(Model): + """Output for the task that validates connection to Azure Database for MySQL + and target server requirements. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar server_version: Version of the target server + :vartype server_version: str + :ivar databases: List of databases on target server + :vartype databases: list[str] + :ivar target_server_brand_version: Target server brand version + :vartype target_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(ConnectToTargetAzureDbForMySqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.server_version = None + self.databases = None + self.target_server_brand_version = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output_py3.py new file mode 100644 index 000000000000..2d061985a741 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToTargetAzureDbForMySqlTaskOutput(Model): + """Output for the task that validates connection to Azure Database for MySQL + and target server requirements. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar server_version: Version of the target server + :vartype server_version: str + :ivar databases: List of databases on target server + :vartype databases: list[str] + :ivar target_server_brand_version: Target server brand version + :vartype target_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectToTargetAzureDbForMySqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.server_version = None + self.databases = None + self.target_server_brand_version = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py new file mode 100644 index 000000000000..b686097526d9 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class ConnectToTargetAzureDbForMySqlTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure Database for + MySQL and target server requirements. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForMySqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForMySqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetAzureDbForMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetAzureDbForMySqlTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(ConnectToTargetAzureDbForMySqlTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'ConnectToTarget.AzureDbForMySql' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties_py3.py new file mode 100644 index 000000000000..28869d4a6915 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class ConnectToTargetAzureDbForMySqlTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure Database for + MySQL and target server requirements. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForMySqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForMySqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetAzureDbForMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetAzureDbForMySqlTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(ConnectToTargetAzureDbForMySqlTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'ConnectToTarget.AzureDbForMySql' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py index 4f92302d5253..60310b599545 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py @@ -21,12 +21,15 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :param errors: Array of errors. This is ignored if submitted. - :type errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] :param task_type: Required. Constant filled by server. :type task_type: str :param input: Task input @@ -38,7 +41,9 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): """ _validation = { + 'errors': {'readonly': True}, 'state': {'readonly': True}, + 'commands': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, } @@ -46,6 +51,7 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): _attribute_map = { 'errors': {'key': 'errors', 'type': '[ODataError]'}, 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'task_type': {'key': 'taskType', 'type': 'str'}, 'input': {'key': 'input', 'type': 'ConnectToTargetSqlDbTaskInput'}, 'output': {'key': 'output', 'type': '[ConnectToTargetSqlDbTaskOutput]'}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties_py3.py index 5c8b6a2eaadf..05a178dc988b 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_db_task_properties_py3.py @@ -21,12 +21,15 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :param errors: Array of errors. This is ignored if submitted. - :type errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] :param task_type: Required. Constant filled by server. :type task_type: str :param input: Task input @@ -38,7 +41,9 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): """ _validation = { + 'errors': {'readonly': True}, 'state': {'readonly': True}, + 'commands': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, } @@ -46,13 +51,14 @@ class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): _attribute_map = { 'errors': {'key': 'errors', 'type': '[ODataError]'}, 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'task_type': {'key': 'taskType', 'type': 'str'}, 'input': {'key': 'input', 'type': 'ConnectToTargetSqlDbTaskInput'}, 'output': {'key': 'output', 'type': '[ConnectToTargetSqlDbTaskOutput]'}, } - def __init__(self, *, errors=None, input=None, **kwargs) -> None: - super(ConnectToTargetSqlDbTaskProperties, self).__init__(errors=errors, **kwargs) + def __init__(self, *, input=None, **kwargs) -> None: + super(ConnectToTargetSqlDbTaskProperties, self).__init__(**kwargs) self.input = input self.output = None self.task_type = 'ConnectToTarget.SqlDb' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py new file mode 100644 index 000000000000..5c4a175938d9 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToTargetSqlMITaskInput(Model): + """Input for the task that validates connection to Azure SQL Database Managed + Instance. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Connection information for target + SQL Server + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + """ + + _validation = { + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + } + + def __init__(self, **kwargs): + super(ConnectToTargetSqlMITaskInput, self).__init__(**kwargs) + self.target_connection_info = kwargs.get('target_connection_info', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input_py3.py new file mode 100644 index 000000000000..873c751e9c5c --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_input_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToTargetSqlMITaskInput(Model): + """Input for the task that validates connection to Azure SQL Database Managed + Instance. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Connection information for target + SQL Server + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + """ + + _validation = { + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + } + + def __init__(self, *, target_connection_info, **kwargs) -> None: + super(ConnectToTargetSqlMITaskInput, self).__init__(**kwargs) + self.target_connection_info = target_connection_info diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py new file mode 100644 index 000000000000..e57a86874315 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToTargetSqlMITaskOutput(Model): + """Output for the task that validates connection to Azure SQL Database Managed + Instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version + :vartype target_server_brand_version: str + :ivar logins: List of logins on the target server. + :vartype logins: list[str] + :ivar agent_jobs: List of agent jobs on the target server. + :vartype agent_jobs: list[str] + :ivar validation_errors: Validation errors + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'logins': {'readonly': True}, + 'agent_jobs': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'logins': {'key': 'logins', 'type': '[str]'}, + 'agent_jobs': {'key': 'agentJobs', 'type': '[str]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(ConnectToTargetSqlMITaskOutput, self).__init__(**kwargs) + self.id = None + self.target_server_version = None + self.target_server_brand_version = None + self.logins = None + self.agent_jobs = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output_py3.py new file mode 100644 index 000000000000..1bb59fabd44f --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_output_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToTargetSqlMITaskOutput(Model): + """Output for the task that validates connection to Azure SQL Database Managed + Instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version + :vartype target_server_brand_version: str + :ivar logins: List of logins on the target server. + :vartype logins: list[str] + :ivar agent_jobs: List of agent jobs on the target server. + :vartype agent_jobs: list[str] + :ivar validation_errors: Validation errors + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'logins': {'readonly': True}, + 'agent_jobs': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'logins': {'key': 'logins', 'type': '[str]'}, + 'agent_jobs': {'key': 'agentJobs', 'type': '[str]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectToTargetSqlMITaskOutput, self).__init__(**kwargs) + self.id = None + self.target_server_version = None + self.target_server_brand_version = None + self.logins = None + self.agent_jobs = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py new file mode 100644 index 000000000000..33fd07ec8710 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class ConnectToTargetSqlMITaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure SQL Database + Managed Instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToTargetSqlMITaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetSqlMITaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlMITaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlMITaskOutput]'}, + } + + def __init__(self, **kwargs): + super(ConnectToTargetSqlMITaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'ConnectToTarget.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties_py3.py new file mode 100644 index 000000000000..a072295a0a97 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class ConnectToTargetSqlMITaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure SQL Database + Managed Instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToTargetSqlMITaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetSqlMITaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlMITaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlMITaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(ConnectToTargetSqlMITaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'ConnectToTarget.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_input.py new file mode 100644 index 000000000000..625ee797c116 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_input.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToTargetSqlSqlDbSyncTaskInput(Model): + """Input for the task that validates connection to Azure SQL DB and target + server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source + SQL Server + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for target + SQL DB + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + } + + def __init__(self, **kwargs): + super(ConnectToTargetSqlSqlDbSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs.get('source_connection_info', None) + self.target_connection_info = kwargs.get('target_connection_info', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_input_py3.py new file mode 100644 index 000000000000..ae6bbdaac350 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_input_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectToTargetSqlSqlDbSyncTaskInput(Model): + """Input for the task that validates connection to Azure SQL DB and target + server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source + SQL Server + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for target + SQL DB + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + } + + def __init__(self, *, source_connection_info, target_connection_info, **kwargs) -> None: + super(ConnectToTargetSqlSqlDbSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_properties.py new file mode 100644 index 000000000000..5d42bea3c97f --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class ConnectToTargetSqlSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL DB and target + server requirements for online migration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToTargetSqlSqlDbSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetSqlDbTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlSqlDbSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlDbTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(ConnectToTargetSqlSqlDbSyncTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'ConnectToTarget.SqlDb.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_properties_py3.py new file mode 100644 index 000000000000..ac64d25a051d --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_sql_sql_db_sync_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class ConnectToTargetSqlSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL DB and target + server requirements for online migration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToTargetSqlSqlDbSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetSqlDbTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlSqlDbSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlDbTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(ConnectToTargetSqlSqlDbSyncTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'ConnectToTarget.SqlDb.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info.py index 8ea4edeb344c..1c673462129d 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info.py @@ -16,7 +16,8 @@ class ConnectionInfo(Model): """Defines the connection properties of a server. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SqlConnectionInfo + sub-classes are: PostgreSqlConnectionInfo, MySqlConnectionInfo, + SqlConnectionInfo All required parameters must be populated in order to send to Azure. @@ -39,7 +40,7 @@ class ConnectionInfo(Model): } _subtype_map = { - 'type': {'SqlConnectionInfo': 'SqlConnectionInfo'} + 'type': {'PostgreSqlConnectionInfo': 'PostgreSqlConnectionInfo', 'MySqlConnectionInfo': 'MySqlConnectionInfo', 'SqlConnectionInfo': 'SqlConnectionInfo'} } def __init__(self, **kwargs): diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info_py3.py index 1a1b80f51376..80211d0253c2 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connection_info_py3.py @@ -16,7 +16,8 @@ class ConnectionInfo(Model): """Defines the connection properties of a server. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SqlConnectionInfo + sub-classes are: PostgreSqlConnectionInfo, MySqlConnectionInfo, + SqlConnectionInfo All required parameters must be populated in order to send to Azure. @@ -39,7 +40,7 @@ class ConnectionInfo(Model): } _subtype_map = { - 'type': {'SqlConnectionInfo': 'SqlConnectionInfo'} + 'type': {'PostgreSqlConnectionInfo': 'PostgreSqlConnectionInfo', 'MySqlConnectionInfo': 'MySqlConnectionInfo', 'SqlConnectionInfo': 'SqlConnectionInfo'} } def __init__(self, *, user_name: str=None, password: str=None, **kwargs) -> None: diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result.py index 2a3c8b040b67..7b82ac28cc97 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result.py @@ -15,22 +15,14 @@ class DataIntegrityValidationResult(Model): """Results for checksum based Data Integrity validation results. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar failed_objects: List of failed table names of source and target pair - :vartype failed_objects: dict[str, str] - :ivar validation_errors: List of errors that happened while performing + :param failed_objects: List of failed table names of source and target + pair + :type failed_objects: dict[str, str] + :param validation_errors: List of errors that happened while performing data integrity validation - :vartype validation_errors: - ~azure.mgmt.datamigration.models.ValidationError + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError """ - _validation = { - 'failed_objects': {'readonly': True}, - 'validation_errors': {'readonly': True}, - } - _attribute_map = { 'failed_objects': {'key': 'failedObjects', 'type': '{str}'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, @@ -38,5 +30,5 @@ class DataIntegrityValidationResult(Model): def __init__(self, **kwargs): super(DataIntegrityValidationResult, self).__init__(**kwargs) - self.failed_objects = None - self.validation_errors = None + self.failed_objects = kwargs.get('failed_objects', None) + self.validation_errors = kwargs.get('validation_errors', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result_py3.py index 2a0f4f51dd4e..026a2b642eb8 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_integrity_validation_result_py3.py @@ -15,28 +15,20 @@ class DataIntegrityValidationResult(Model): """Results for checksum based Data Integrity validation results. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar failed_objects: List of failed table names of source and target pair - :vartype failed_objects: dict[str, str] - :ivar validation_errors: List of errors that happened while performing + :param failed_objects: List of failed table names of source and target + pair + :type failed_objects: dict[str, str] + :param validation_errors: List of errors that happened while performing data integrity validation - :vartype validation_errors: - ~azure.mgmt.datamigration.models.ValidationError + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError """ - _validation = { - 'failed_objects': {'readonly': True}, - 'validation_errors': {'readonly': True}, - } - _attribute_map = { 'failed_objects': {'key': 'failedObjects', 'type': '{str}'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, failed_objects=None, validation_errors=None, **kwargs) -> None: super(DataIntegrityValidationResult, self).__init__(**kwargs) - self.failed_objects = None - self.validation_errors = None + self.failed_objects = failed_objects + self.validation_errors = validation_errors diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error.py index 7db00f94bcd5..110159c5b509 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error.py @@ -20,8 +20,7 @@ class DataMigrationError(Model): :ivar message: Error description :vartype message: str - :param type: Type of error. Possible values include: 'Default', 'Warning', - 'Error' + :param type: Possible values include: 'Default', 'Warning', 'Error' :type type: str or ~azure.mgmt.datamigration.models.ErrorType """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error_py3.py index c2d670e0227f..9cb1fa6fc5cb 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_error_py3.py @@ -20,8 +20,7 @@ class DataMigrationError(Model): :ivar message: Error description :vartype message: str - :param type: Type of error. Possible values include: 'Default', 'Warning', - 'Error' + :param type: Possible values include: 'Default', 'Warning', 'Error' :type type: str or ~azure.mgmt.datamigration.models.ErrorType """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_client_enums.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_client_enums.py index d239d78e1fbb..ad8f22838e90 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_client_enums.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/data_migration_service_client_enums.py @@ -12,6 +12,71 @@ from enum import Enum +class CommandState(str, Enum): + + unknown = "Unknown" + accepted = "Accepted" + running = "Running" + succeeded = "Succeeded" + failed = "Failed" + + +class SqlSourcePlatform(str, Enum): + + sql_on_prem = "SqlOnPrem" + + +class AuthenticationType(str, Enum): + + none = "None" + windows_authentication = "WindowsAuthentication" + sql_authentication = "SqlAuthentication" + active_directory_integrated = "ActiveDirectoryIntegrated" + active_directory_password = "ActiveDirectoryPassword" + + +class BackupType(str, Enum): + + database = "Database" + transaction_log = "TransactionLog" + file = "File" + differential_database = "DifferentialDatabase" + differential_file = "DifferentialFile" + partial = "Partial" + differential_partial = "DifferentialPartial" + + +class BackupMode(str, Enum): + + create_backup = "CreateBackup" + existing_backup = "ExistingBackup" + + +class SyncTableMigrationState(str, Enum): + + before_load = "BEFORE_LOAD" + full_load = "FULL_LOAD" + completed = "COMPLETED" + canceled = "CANCELED" + error = "ERROR" + failed = "FAILED" + + +class SyncDatabaseMigrationReportingState(str, Enum): + + undefined = "UNDEFINED" + configuring = "CONFIGURING" + initialiazing = "INITIALIAZING" + starting = "STARTING" + running = "RUNNING" + ready_to_complete = "READY_TO_COMPLETE" + completing = "COMPLETING" + complete = "COMPLETE" + cancelling = "CANCELLING" + cancelled = "CANCELLED" + failed = "FAILED" + + class ValidationStatus(str, Enum): default = "Default" @@ -20,8 +85,8 @@ class ValidationStatus(str, Enum): in_progress = "InProgress" completed = "Completed" completed_with_issues = "CompletedWithIssues" - failed = "Failed" stopped = "Stopped" + failed = "Failed" class Severity(str, Enum): @@ -82,13 +147,17 @@ class MigrationStatus(str, Enum): completed_with_warnings = "CompletedWithWarnings" -class AuthenticationType(str, Enum): +class LoginMigrationStage(str, Enum): none = "None" - windows_authentication = "WindowsAuthentication" - sql_authentication = "SqlAuthentication" - active_directory_integrated = "ActiveDirectoryIntegrated" - active_directory_password = "ActiveDirectoryPassword" + initialize = "Initialize" + login_migration = "LoginMigration" + establish_user_mapping = "EstablishUserMapping" + assign_role_membership = "AssignRoleMembership" + assign_role_ownership = "AssignRoleOwnership" + establish_server_permissions = "EstablishServerPermissions" + establish_object_permissions = "EstablishObjectPermissions" + completed = "Completed" class LoginType(str, Enum): @@ -139,6 +208,8 @@ class ServerLevelPermissionsGroup(str, Enum): default = "Default" migration_from_sql_server_to_azure_db = "MigrationFromSqlServerToAzureDB" + migration_from_sql_server_to_azure_mi = "MigrationFromSqlServerToAzureMI" + migration_from_my_sql_to_azure_db_for_my_sql = "MigrationFromMySQLToAzureDBForMySQL" class TaskState(str, Enum): @@ -170,12 +241,17 @@ class ServiceProvisioningState(str, Enum): class ProjectTargetPlatform(str, Enum): sqldb = "SQLDB" + sqlmi = "SQLMI" + azure_db_for_my_sql = "AzureDbForMySql" + azure_db_for_postgre_sql = "AzureDbForPostgreSql" unknown = "Unknown" class ProjectSourcePlatform(str, Enum): sql = "SQL" + my_sql = "MySQL" + postgre_sql = "PostgreSql" unknown = "Unknown" @@ -216,21 +292,44 @@ class ResourceSkuCapacityScaleType(str, Enum): none = "None" -class ErrorType(str, Enum): +class MySqlTargetPlatformType(str, Enum): - default = "Default" - warning = "Warning" - error = "Error" + azure_db_for_my_sql = "AzureDbForMySQL" -class LoginMigrationStage(str, Enum): +class SchemaMigrationOption(str, Enum): none = "None" - initialize = "Initialize" - login_migration = "LoginMigration" - establish_user_mapping = "EstablishUserMapping" - assign_role_membership = "AssignRoleMembership" - assign_role_ownership = "AssignRoleOwnership" - establish_server_permissions = "EstablishServerPermissions" - establish_object_permissions = "EstablishObjectPermissions" + extract_from_source = "ExtractFromSource" + use_storage_file = "UseStorageFile" + + +class SchemaMigrationStage(str, Enum): + + not_started = "NotStarted" + validating_inputs = "ValidatingInputs" + collecting_objects = "CollectingObjects" + downloading_script = "DownloadingScript" + generating_script = "GeneratingScript" + uploading_script = "UploadingScript" + deploying_schema = "DeployingSchema" completed = "Completed" + completed_with_warnings = "CompletedWithWarnings" + failed = "Failed" + + +class DataMigrationResultCode(str, Enum): + + initial = "Initial" + completed = "Completed" + object_not_exists_in_source = "ObjectNotExistsInSource" + object_not_exists_in_target = "ObjectNotExistsInTarget" + target_object_is_inaccessible = "TargetObjectIsInaccessible" + fatal_error = "FatalError" + + +class ErrorType(str, Enum): + + default = "Default" + warning = "Warning" + error = "Error" diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database.py index a098e7c6a412..527ea44ee80c 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database.py @@ -15,73 +15,50 @@ class Database(Model): """Information about a single database. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Unique identifier for the database - :vartype id: str - :ivar name: Name of the database - :vartype name: str - :ivar compatibility_level: SQL Server compatibility level of database. + :param id: Unique identifier for the database + :type id: str + :param name: Name of the database + :type name: str + :param compatibility_level: SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140' - :vartype compatibility_level: str or + :type compatibility_level: str or ~azure.mgmt.datamigration.models.DatabaseCompatLevel - :ivar collation: Collation name of the database - :vartype collation: str - :ivar server_name: Name of the server - :vartype server_name: str - :ivar fqdn: Fully qualified name - :vartype fqdn: str - :ivar install_id: Install id of the database - :vartype install_id: str - :ivar server_version: Version of the server - :vartype server_version: str - :ivar server_edition: Edition of the server - :vartype server_edition: str - :ivar server_level: Product level of the server (RTM, SP, CTP). - :vartype server_level: str - :ivar server_default_data_path: Default path of the data files - :vartype server_default_data_path: str - :ivar server_default_log_path: Default path of the log files - :vartype server_default_log_path: str - :ivar server_default_backup_path: Default path of the backup folder - :vartype server_default_backup_path: str - :ivar server_core_count: Number of cores on the server - :vartype server_core_count: int - :ivar server_visible_online_core_count: Number of cores on the server that - have VISIBLE ONLINE status - :vartype server_visible_online_core_count: int - :ivar database_state: State of the database. Possible values include: + :param collation: Collation name of the database + :type collation: str + :param server_name: Name of the server + :type server_name: str + :param fqdn: Fully qualified name + :type fqdn: str + :param install_id: Install id of the database + :type install_id: str + :param server_version: Version of the server + :type server_version: str + :param server_edition: Edition of the server + :type server_edition: str + :param server_level: Product level of the server (RTM, SP, CTP). + :type server_level: str + :param server_default_data_path: Default path of the data files + :type server_default_data_path: str + :param server_default_log_path: Default path of the log files + :type server_default_log_path: str + :param server_default_backup_path: Default path of the backup folder + :type server_default_backup_path: str + :param server_core_count: Number of cores on the server + :type server_core_count: int + :param server_visible_online_core_count: Number of cores on the server + that have VISIBLE ONLINE status + :type server_visible_online_core_count: int + :param database_state: State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary' - :vartype database_state: str or + :type database_state: str or ~azure.mgmt.datamigration.models.DatabaseState - :ivar server_id: The unique Server Id - :vartype server_id: str + :param server_id: The unique Server Id + :type server_id: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'compatibility_level': {'readonly': True}, - 'collation': {'readonly': True}, - 'server_name': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'install_id': {'readonly': True}, - 'server_version': {'readonly': True}, - 'server_edition': {'readonly': True}, - 'server_level': {'readonly': True}, - 'server_default_data_path': {'readonly': True}, - 'server_default_log_path': {'readonly': True}, - 'server_default_backup_path': {'readonly': True}, - 'server_core_count': {'readonly': True}, - 'server_visible_online_core_count': {'readonly': True}, - 'database_state': {'readonly': True}, - 'server_id': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -104,20 +81,20 @@ class Database(Model): def __init__(self, **kwargs): super(Database, self).__init__(**kwargs) - self.id = None - self.name = None - self.compatibility_level = None - self.collation = None - self.server_name = None - self.fqdn = None - self.install_id = None - self.server_version = None - self.server_edition = None - self.server_level = None - self.server_default_data_path = None - self.server_default_log_path = None - self.server_default_backup_path = None - self.server_core_count = None - self.server_visible_online_core_count = None - self.database_state = None - self.server_id = None + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.compatibility_level = kwargs.get('compatibility_level', None) + self.collation = kwargs.get('collation', None) + self.server_name = kwargs.get('server_name', None) + self.fqdn = kwargs.get('fqdn', None) + self.install_id = kwargs.get('install_id', None) + self.server_version = kwargs.get('server_version', None) + self.server_edition = kwargs.get('server_edition', None) + self.server_level = kwargs.get('server_level', None) + self.server_default_data_path = kwargs.get('server_default_data_path', None) + self.server_default_log_path = kwargs.get('server_default_log_path', None) + self.server_default_backup_path = kwargs.get('server_default_backup_path', None) + self.server_core_count = kwargs.get('server_core_count', None) + self.server_visible_online_core_count = kwargs.get('server_visible_online_core_count', None) + self.database_state = kwargs.get('database_state', None) + self.server_id = kwargs.get('server_id', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_backup_info.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_backup_info.py new file mode 100644 index 000000000000..781fd1c8aef8 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_backup_info.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseBackupInfo(Model): + """Information about backup files when existing backup mode is used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar database_name: Database name. + :vartype database_name: str + :ivar backup_type: Backup Type. Possible values include: 'Database', + 'TransactionLog', 'File', 'DifferentialDatabase', 'DifferentialFile', + 'Partial', 'DifferentialPartial' + :vartype backup_type: str or ~azure.mgmt.datamigration.models.BackupType + :ivar backup_files: The list of backup files for the current database. + :vartype backup_files: list[str] + :ivar position: Position of current database backup in the file. + :vartype position: int + :ivar is_damaged: Database was damaged when backed up, but the backup + operation was requested to continue despite errors. + :vartype is_damaged: bool + :ivar is_compressed: Whether the backup set is compressed + :vartype is_compressed: bool + :ivar family_count: Number of files in the backup set. + :vartype family_count: int + :ivar backup_finish_date: Date and time when the backup operation + finished. + :vartype backup_finish_date: datetime + """ + + _validation = { + 'database_name': {'readonly': True}, + 'backup_type': {'readonly': True}, + 'backup_files': {'readonly': True}, + 'position': {'readonly': True}, + 'is_damaged': {'readonly': True}, + 'is_compressed': {'readonly': True}, + 'family_count': {'readonly': True}, + 'backup_finish_date': {'readonly': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'backup_files': {'key': 'backupFiles', 'type': '[str]'}, + 'position': {'key': 'position', 'type': 'int'}, + 'is_damaged': {'key': 'isDamaged', 'type': 'bool'}, + 'is_compressed': {'key': 'isCompressed', 'type': 'bool'}, + 'family_count': {'key': 'familyCount', 'type': 'int'}, + 'backup_finish_date': {'key': 'backupFinishDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DatabaseBackupInfo, self).__init__(**kwargs) + self.database_name = None + self.backup_type = None + self.backup_files = None + self.position = None + self.is_damaged = None + self.is_compressed = None + self.family_count = None + self.backup_finish_date = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_backup_info_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_backup_info_py3.py new file mode 100644 index 000000000000..dc4cb2780f2b --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_backup_info_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DatabaseBackupInfo(Model): + """Information about backup files when existing backup mode is used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar database_name: Database name. + :vartype database_name: str + :ivar backup_type: Backup Type. Possible values include: 'Database', + 'TransactionLog', 'File', 'DifferentialDatabase', 'DifferentialFile', + 'Partial', 'DifferentialPartial' + :vartype backup_type: str or ~azure.mgmt.datamigration.models.BackupType + :ivar backup_files: The list of backup files for the current database. + :vartype backup_files: list[str] + :ivar position: Position of current database backup in the file. + :vartype position: int + :ivar is_damaged: Database was damaged when backed up, but the backup + operation was requested to continue despite errors. + :vartype is_damaged: bool + :ivar is_compressed: Whether the backup set is compressed + :vartype is_compressed: bool + :ivar family_count: Number of files in the backup set. + :vartype family_count: int + :ivar backup_finish_date: Date and time when the backup operation + finished. + :vartype backup_finish_date: datetime + """ + + _validation = { + 'database_name': {'readonly': True}, + 'backup_type': {'readonly': True}, + 'backup_files': {'readonly': True}, + 'position': {'readonly': True}, + 'is_damaged': {'readonly': True}, + 'is_compressed': {'readonly': True}, + 'family_count': {'readonly': True}, + 'backup_finish_date': {'readonly': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'backup_files': {'key': 'backupFiles', 'type': '[str]'}, + 'position': {'key': 'position', 'type': 'int'}, + 'is_damaged': {'key': 'isDamaged', 'type': 'bool'}, + 'is_compressed': {'key': 'isCompressed', 'type': 'bool'}, + 'family_count': {'key': 'familyCount', 'type': 'int'}, + 'backup_finish_date': {'key': 'backupFinishDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseBackupInfo, self).__init__(**kwargs) + self.database_name = None + self.backup_type = None + self.backup_files = None + self.position = None + self.is_damaged = None + self.is_compressed = None + self.family_count = None + self.backup_finish_date = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_py3.py index b8795479e407..4f11b4f238c7 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/database_py3.py @@ -15,73 +15,50 @@ class Database(Model): """Information about a single database. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Unique identifier for the database - :vartype id: str - :ivar name: Name of the database - :vartype name: str - :ivar compatibility_level: SQL Server compatibility level of database. + :param id: Unique identifier for the database + :type id: str + :param name: Name of the database + :type name: str + :param compatibility_level: SQL Server compatibility level of database. Possible values include: 'CompatLevel80', 'CompatLevel90', 'CompatLevel100', 'CompatLevel110', 'CompatLevel120', 'CompatLevel130', 'CompatLevel140' - :vartype compatibility_level: str or + :type compatibility_level: str or ~azure.mgmt.datamigration.models.DatabaseCompatLevel - :ivar collation: Collation name of the database - :vartype collation: str - :ivar server_name: Name of the server - :vartype server_name: str - :ivar fqdn: Fully qualified name - :vartype fqdn: str - :ivar install_id: Install id of the database - :vartype install_id: str - :ivar server_version: Version of the server - :vartype server_version: str - :ivar server_edition: Edition of the server - :vartype server_edition: str - :ivar server_level: Product level of the server (RTM, SP, CTP). - :vartype server_level: str - :ivar server_default_data_path: Default path of the data files - :vartype server_default_data_path: str - :ivar server_default_log_path: Default path of the log files - :vartype server_default_log_path: str - :ivar server_default_backup_path: Default path of the backup folder - :vartype server_default_backup_path: str - :ivar server_core_count: Number of cores on the server - :vartype server_core_count: int - :ivar server_visible_online_core_count: Number of cores on the server that - have VISIBLE ONLINE status - :vartype server_visible_online_core_count: int - :ivar database_state: State of the database. Possible values include: + :param collation: Collation name of the database + :type collation: str + :param server_name: Name of the server + :type server_name: str + :param fqdn: Fully qualified name + :type fqdn: str + :param install_id: Install id of the database + :type install_id: str + :param server_version: Version of the server + :type server_version: str + :param server_edition: Edition of the server + :type server_edition: str + :param server_level: Product level of the server (RTM, SP, CTP). + :type server_level: str + :param server_default_data_path: Default path of the data files + :type server_default_data_path: str + :param server_default_log_path: Default path of the log files + :type server_default_log_path: str + :param server_default_backup_path: Default path of the backup folder + :type server_default_backup_path: str + :param server_core_count: Number of cores on the server + :type server_core_count: int + :param server_visible_online_core_count: Number of cores on the server + that have VISIBLE ONLINE status + :type server_visible_online_core_count: int + :param database_state: State of the database. Possible values include: 'Online', 'Restoring', 'Recovering', 'RecoveryPending', 'Suspect', 'Emergency', 'Offline', 'Copying', 'OfflineSecondary' - :vartype database_state: str or + :type database_state: str or ~azure.mgmt.datamigration.models.DatabaseState - :ivar server_id: The unique Server Id - :vartype server_id: str + :param server_id: The unique Server Id + :type server_id: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'compatibility_level': {'readonly': True}, - 'collation': {'readonly': True}, - 'server_name': {'readonly': True}, - 'fqdn': {'readonly': True}, - 'install_id': {'readonly': True}, - 'server_version': {'readonly': True}, - 'server_edition': {'readonly': True}, - 'server_level': {'readonly': True}, - 'server_default_data_path': {'readonly': True}, - 'server_default_log_path': {'readonly': True}, - 'server_default_backup_path': {'readonly': True}, - 'server_core_count': {'readonly': True}, - 'server_visible_online_core_count': {'readonly': True}, - 'database_state': {'readonly': True}, - 'server_id': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -102,22 +79,22 @@ class Database(Model): 'server_id': {'key': 'serverId', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, id: str=None, name: str=None, compatibility_level=None, collation: str=None, server_name: str=None, fqdn: str=None, install_id: str=None, server_version: str=None, server_edition: str=None, server_level: str=None, server_default_data_path: str=None, server_default_log_path: str=None, server_default_backup_path: str=None, server_core_count: int=None, server_visible_online_core_count: int=None, database_state=None, server_id: str=None, **kwargs) -> None: super(Database, self).__init__(**kwargs) - self.id = None - self.name = None - self.compatibility_level = None - self.collation = None - self.server_name = None - self.fqdn = None - self.install_id = None - self.server_version = None - self.server_edition = None - self.server_level = None - self.server_default_data_path = None - self.server_default_log_path = None - self.server_default_backup_path = None - self.server_core_count = None - self.server_visible_online_core_count = None - self.database_state = None - self.server_id = None + self.id = id + self.name = name + self.compatibility_level = compatibility_level + self.collation = collation + self.server_name = server_name + self.fqdn = fqdn + self.install_id = install_id + self.server_version = server_version + self.server_edition = server_edition + self.server_level = server_level + self.server_default_data_path = server_default_data_path + self.server_default_log_path = server_default_log_path + self.server_default_backup_path = server_default_backup_path + self.server_core_count = server_core_count + self.server_visible_online_core_count = server_visible_online_core_count + self.database_state = database_state + self.server_id = server_id diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics.py index 098919cb25a7..eb2c318820a1 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics.py @@ -15,34 +15,23 @@ class ExecutionStatistics(Model): """Description about the errors happen while performing migration validation. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar execution_count: No. of query executions - :vartype execution_count: long - :ivar cpu_time_ms: CPU Time in millisecond(s) for the query execution - :vartype cpu_time_ms: float - :ivar elapsed_time_ms: Time taken in millisecond(s) for executing the + :param execution_count: No. of query executions + :type execution_count: long + :param cpu_time_ms: CPU Time in millisecond(s) for the query execution + :type cpu_time_ms: float + :param elapsed_time_ms: Time taken in millisecond(s) for executing the query - :vartype elapsed_time_ms: float + :type elapsed_time_ms: float :param wait_stats: Dictionary of sql query execution wait types and the respective statistics :type wait_stats: dict[str, ~azure.mgmt.datamigration.models.WaitStatistics] - :ivar has_errors: Indicates whether the query resulted in an error - :vartype has_errors: bool - :ivar sql_errors: List of sql Errors - :vartype sql_errors: list[str] + :param has_errors: Indicates whether the query resulted in an error + :type has_errors: bool + :param sql_errors: List of sql Errors + :type sql_errors: list[str] """ - _validation = { - 'execution_count': {'readonly': True}, - 'cpu_time_ms': {'readonly': True}, - 'elapsed_time_ms': {'readonly': True}, - 'has_errors': {'readonly': True}, - 'sql_errors': {'readonly': True}, - } - _attribute_map = { 'execution_count': {'key': 'executionCount', 'type': 'long'}, 'cpu_time_ms': {'key': 'cpuTimeMs', 'type': 'float'}, @@ -54,9 +43,9 @@ class ExecutionStatistics(Model): def __init__(self, **kwargs): super(ExecutionStatistics, self).__init__(**kwargs) - self.execution_count = None - self.cpu_time_ms = None - self.elapsed_time_ms = None + self.execution_count = kwargs.get('execution_count', None) + self.cpu_time_ms = kwargs.get('cpu_time_ms', None) + self.elapsed_time_ms = kwargs.get('elapsed_time_ms', None) self.wait_stats = kwargs.get('wait_stats', None) - self.has_errors = None - self.sql_errors = None + self.has_errors = kwargs.get('has_errors', None) + self.sql_errors = kwargs.get('sql_errors', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics_py3.py index f19075a919ff..7fefb7275b2a 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/execution_statistics_py3.py @@ -15,34 +15,23 @@ class ExecutionStatistics(Model): """Description about the errors happen while performing migration validation. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar execution_count: No. of query executions - :vartype execution_count: long - :ivar cpu_time_ms: CPU Time in millisecond(s) for the query execution - :vartype cpu_time_ms: float - :ivar elapsed_time_ms: Time taken in millisecond(s) for executing the + :param execution_count: No. of query executions + :type execution_count: long + :param cpu_time_ms: CPU Time in millisecond(s) for the query execution + :type cpu_time_ms: float + :param elapsed_time_ms: Time taken in millisecond(s) for executing the query - :vartype elapsed_time_ms: float + :type elapsed_time_ms: float :param wait_stats: Dictionary of sql query execution wait types and the respective statistics :type wait_stats: dict[str, ~azure.mgmt.datamigration.models.WaitStatistics] - :ivar has_errors: Indicates whether the query resulted in an error - :vartype has_errors: bool - :ivar sql_errors: List of sql Errors - :vartype sql_errors: list[str] + :param has_errors: Indicates whether the query resulted in an error + :type has_errors: bool + :param sql_errors: List of sql Errors + :type sql_errors: list[str] """ - _validation = { - 'execution_count': {'readonly': True}, - 'cpu_time_ms': {'readonly': True}, - 'elapsed_time_ms': {'readonly': True}, - 'has_errors': {'readonly': True}, - 'sql_errors': {'readonly': True}, - } - _attribute_map = { 'execution_count': {'key': 'executionCount', 'type': 'long'}, 'cpu_time_ms': {'key': 'cpuTimeMs', 'type': 'float'}, @@ -52,11 +41,11 @@ class ExecutionStatistics(Model): 'sql_errors': {'key': 'sqlErrors', 'type': '[str]'}, } - def __init__(self, *, wait_stats=None, **kwargs) -> None: + def __init__(self, *, execution_count: int=None, cpu_time_ms: float=None, elapsed_time_ms: float=None, wait_stats=None, has_errors: bool=None, sql_errors=None, **kwargs) -> None: super(ExecutionStatistics, self).__init__(**kwargs) - self.execution_count = None - self.cpu_time_ms = None - self.elapsed_time_ms = None + self.execution_count = execution_count + self.cpu_time_ms = cpu_time_ms + self.elapsed_time_ms = elapsed_time_ms self.wait_stats = wait_stats - self.has_errors = None - self.sql_errors = None + self.has_errors = has_errors + self.sql_errors = sql_errors diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_project_details_non_sql_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_project_details_non_sql_task_input.py new file mode 100644 index 000000000000..e1ff11953a80 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_project_details_non_sql_task_input.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetProjectDetailsNonSqlTaskInput(Model): + """Input for the task that reads configuration from project artifacts. + + All required parameters must be populated in order to send to Azure. + + :param project_name: Required. Name of the migration project + :type project_name: str + :param project_location: Required. A URL that points to the location to + access project artifacts + :type project_location: str + """ + + _validation = { + 'project_name': {'required': True}, + 'project_location': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'project_location': {'key': 'projectLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GetProjectDetailsNonSqlTaskInput, self).__init__(**kwargs) + self.project_name = kwargs.get('project_name', None) + self.project_location = kwargs.get('project_location', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_project_details_non_sql_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_project_details_non_sql_task_input_py3.py new file mode 100644 index 000000000000..0c7ded3b33fb --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_project_details_non_sql_task_input_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetProjectDetailsNonSqlTaskInput(Model): + """Input for the task that reads configuration from project artifacts. + + All required parameters must be populated in order to send to Azure. + + :param project_name: Required. Name of the migration project + :type project_name: str + :param project_location: Required. A URL that points to the location to + access project artifacts + :type project_location: str + """ + + _validation = { + 'project_name': {'required': True}, + 'project_location': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'project_location': {'key': 'projectLocation', 'type': 'str'}, + } + + def __init__(self, *, project_name: str, project_location: str, **kwargs) -> None: + super(GetProjectDetailsNonSqlTaskInput, self).__init__(**kwargs) + self.project_name = project_name + self.project_location = project_location diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_input.py new file mode 100644 index 000000000000..9234e8617bd7 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_input.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetTdeCertificatesSqlTaskInput(Model): + """Input for the task that gets TDE certificates in Base64 encoded format. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Connection information for SQL Server + :type connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param backup_file_share: Required. Backup file share information for file + share to be used for temporarily storing files. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param selected_certificates: Required. List containing certificate names + and corresponding password to use for encrypting the exported certificate. + :type selected_certificates: + list[~azure.mgmt.datamigration.models.SelectedCertificateInput] + """ + + _validation = { + 'connection_info': {'required': True}, + 'backup_file_share': {'required': True}, + 'selected_certificates': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'SqlConnectionInfo'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'selected_certificates': {'key': 'selectedCertificates', 'type': '[SelectedCertificateInput]'}, + } + + def __init__(self, **kwargs): + super(GetTdeCertificatesSqlTaskInput, self).__init__(**kwargs) + self.connection_info = kwargs.get('connection_info', None) + self.backup_file_share = kwargs.get('backup_file_share', None) + self.selected_certificates = kwargs.get('selected_certificates', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_input_py3.py new file mode 100644 index 000000000000..90dbe44bac55 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_input_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetTdeCertificatesSqlTaskInput(Model): + """Input for the task that gets TDE certificates in Base64 encoded format. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Connection information for SQL Server + :type connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param backup_file_share: Required. Backup file share information for file + share to be used for temporarily storing files. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param selected_certificates: Required. List containing certificate names + and corresponding password to use for encrypting the exported certificate. + :type selected_certificates: + list[~azure.mgmt.datamigration.models.SelectedCertificateInput] + """ + + _validation = { + 'connection_info': {'required': True}, + 'backup_file_share': {'required': True}, + 'selected_certificates': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'SqlConnectionInfo'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'selected_certificates': {'key': 'selectedCertificates', 'type': '[SelectedCertificateInput]'}, + } + + def __init__(self, *, connection_info, backup_file_share, selected_certificates, **kwargs) -> None: + super(GetTdeCertificatesSqlTaskInput, self).__init__(**kwargs) + self.connection_info = connection_info + self.backup_file_share = backup_file_share + self.selected_certificates = selected_certificates diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_output.py new file mode 100644 index 000000000000..723403ca1296 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_output.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetTdeCertificatesSqlTaskOutput(Model): + """Output of the task that gets TDE certificates in Base64 encoded format. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar base64_encoded_certificates: Mapping from certificate name to base + 64 encoded format. + :vartype base64_encoded_certificates: dict[str, list[str]] + :ivar validation_errors: Validation errors + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'base64_encoded_certificates': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'base64_encoded_certificates': {'key': 'base64EncodedCertificates', 'type': '{[str]}'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(GetTdeCertificatesSqlTaskOutput, self).__init__(**kwargs) + self.base64_encoded_certificates = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_output_py3.py new file mode 100644 index 000000000000..16b09d215a62 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_output_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetTdeCertificatesSqlTaskOutput(Model): + """Output of the task that gets TDE certificates in Base64 encoded format. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar base64_encoded_certificates: Mapping from certificate name to base + 64 encoded format. + :vartype base64_encoded_certificates: dict[str, list[str]] + :ivar validation_errors: Validation errors + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'base64_encoded_certificates': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'base64_encoded_certificates': {'key': 'base64EncodedCertificates', 'type': '{[str]}'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(GetTdeCertificatesSqlTaskOutput, self).__init__(**kwargs) + self.base64_encoded_certificates = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_properties.py new file mode 100644 index 000000000000..95c9a800fddf --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class GetTdeCertificatesSqlTaskProperties(ProjectTaskProperties): + """Properties for the task that gets TDE certificates in Base64 encoded + format. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.GetTdeCertificatesSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.GetTdeCertificatesSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetTdeCertificatesSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetTdeCertificatesSqlTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(GetTdeCertificatesSqlTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'GetTDECertificates.Sql' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_properties_py3.py new file mode 100644 index 000000000000..8ed508a77333 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_tde_certificates_sql_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class GetTdeCertificatesSqlTaskProperties(ProjectTaskProperties): + """Properties for the task that gets TDE certificates in Base64 encoded + format. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.GetTdeCertificatesSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.GetTdeCertificatesSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetTdeCertificatesSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetTdeCertificatesSqlTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(GetTdeCertificatesSqlTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'GetTDECertificates.Sql' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_input.py new file mode 100644 index 000000000000..edb3ff0086cf --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_input.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetUserTablesSqlSyncTaskInput(Model): + """Input for the task that collects user tables for the given list of + databases. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for SQL + Server + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for SQL DB + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_source_databases: Required. List of source database names + to collect tables for + :type selected_source_databases: list[str] + :param selected_target_databases: Required. List of target database names + to collect tables for + :type selected_target_databases: list[str] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_source_databases': {'required': True}, + 'selected_target_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_source_databases': {'key': 'selectedSourceDatabases', 'type': '[str]'}, + 'selected_target_databases': {'key': 'selectedTargetDatabases', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(GetUserTablesSqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs.get('source_connection_info', None) + self.target_connection_info = kwargs.get('target_connection_info', None) + self.selected_source_databases = kwargs.get('selected_source_databases', None) + self.selected_target_databases = kwargs.get('selected_target_databases', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_input_py3.py new file mode 100644 index 000000000000..d5d094e38618 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_input_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetUserTablesSqlSyncTaskInput(Model): + """Input for the task that collects user tables for the given list of + databases. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for SQL + Server + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for SQL DB + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_source_databases: Required. List of source database names + to collect tables for + :type selected_source_databases: list[str] + :param selected_target_databases: Required. List of target database names + to collect tables for + :type selected_target_databases: list[str] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_source_databases': {'required': True}, + 'selected_target_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_source_databases': {'key': 'selectedSourceDatabases', 'type': '[str]'}, + 'selected_target_databases': {'key': 'selectedTargetDatabases', 'type': '[str]'}, + } + + def __init__(self, *, source_connection_info, target_connection_info, selected_source_databases, selected_target_databases, **kwargs) -> None: + super(GetUserTablesSqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.selected_source_databases = selected_source_databases + self.selected_target_databases = selected_target_databases diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_output.py new file mode 100644 index 000000000000..d74132c96373 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_output.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetUserTablesSqlSyncTaskOutput(Model): + """Output of the task that collects user tables for the given list of + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar databases_to_source_tables: Mapping from database name to list of + source tables + :vartype databases_to_source_tables: dict[str, + list[~azure.mgmt.datamigration.models.DatabaseTable]] + :ivar databases_to_target_tables: Mapping from database name to list of + target tables + :vartype databases_to_target_tables: dict[str, + list[~azure.mgmt.datamigration.models.DatabaseTable]] + :ivar table_validation_errors: Mapping from database name to list of + validation errors + :vartype table_validation_errors: dict[str, list[str]] + :ivar validation_errors: Validation errors + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'databases_to_source_tables': {'readonly': True}, + 'databases_to_target_tables': {'readonly': True}, + 'table_validation_errors': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'databases_to_source_tables': {'key': 'databasesToSourceTables', 'type': '{[DatabaseTable]}'}, + 'databases_to_target_tables': {'key': 'databasesToTargetTables', 'type': '{[DatabaseTable]}'}, + 'table_validation_errors': {'key': 'tableValidationErrors', 'type': '{[str]}'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(GetUserTablesSqlSyncTaskOutput, self).__init__(**kwargs) + self.databases_to_source_tables = None + self.databases_to_target_tables = None + self.table_validation_errors = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_output_py3.py new file mode 100644 index 000000000000..c5cc317b5991 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_output_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetUserTablesSqlSyncTaskOutput(Model): + """Output of the task that collects user tables for the given list of + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar databases_to_source_tables: Mapping from database name to list of + source tables + :vartype databases_to_source_tables: dict[str, + list[~azure.mgmt.datamigration.models.DatabaseTable]] + :ivar databases_to_target_tables: Mapping from database name to list of + target tables + :vartype databases_to_target_tables: dict[str, + list[~azure.mgmt.datamigration.models.DatabaseTable]] + :ivar table_validation_errors: Mapping from database name to list of + validation errors + :vartype table_validation_errors: dict[str, list[str]] + :ivar validation_errors: Validation errors + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'databases_to_source_tables': {'readonly': True}, + 'databases_to_target_tables': {'readonly': True}, + 'table_validation_errors': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'databases_to_source_tables': {'key': 'databasesToSourceTables', 'type': '{[DatabaseTable]}'}, + 'databases_to_target_tables': {'key': 'databasesToTargetTables', 'type': '{[DatabaseTable]}'}, + 'table_validation_errors': {'key': 'tableValidationErrors', 'type': '{[str]}'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(GetUserTablesSqlSyncTaskOutput, self).__init__(**kwargs) + self.databases_to_source_tables = None + self.databases_to_target_tables = None + self.table_validation_errors = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_properties.py new file mode 100644 index 000000000000..cc02106c367c --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class GetUserTablesSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.GetUserTablesSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.GetUserTablesSqlSyncTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetUserTablesSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesSqlSyncTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(GetUserTablesSqlSyncTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'GetUserTables.AzureSqlDb.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_properties_py3.py new file mode 100644 index 000000000000..cfb16ce27a08 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_sync_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class GetUserTablesSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.GetUserTablesSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.GetUserTablesSqlSyncTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetUserTablesSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesSqlSyncTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(GetUserTablesSqlSyncTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'GetUserTables.AzureSqlDb.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties.py index 51f06680e246..4b40b52906ec 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties.py @@ -21,12 +21,15 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :param errors: Array of errors. This is ignored if submitted. - :type errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] :param task_type: Required. Constant filled by server. :type task_type: str :param input: Task input @@ -37,7 +40,9 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): """ _validation = { + 'errors': {'readonly': True}, 'state': {'readonly': True}, + 'commands': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, } @@ -45,6 +50,7 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): _attribute_map = { 'errors': {'key': 'errors', 'type': '[ODataError]'}, 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'task_type': {'key': 'taskType', 'type': 'str'}, 'input': {'key': 'input', 'type': 'GetUserTablesSqlTaskInput'}, 'output': {'key': 'output', 'type': '[GetUserTablesSqlTaskOutput]'}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties_py3.py index af726e4b4e53..0f6fd4ca766d 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/get_user_tables_sql_task_properties_py3.py @@ -21,12 +21,15 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :param errors: Array of errors. This is ignored if submitted. - :type errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] :param task_type: Required. Constant filled by server. :type task_type: str :param input: Task input @@ -37,7 +40,9 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): """ _validation = { + 'errors': {'readonly': True}, 'state': {'readonly': True}, + 'commands': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, } @@ -45,13 +50,14 @@ class GetUserTablesSqlTaskProperties(ProjectTaskProperties): _attribute_map = { 'errors': {'key': 'errors', 'type': '[ODataError]'}, 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'task_type': {'key': 'taskType', 'type': 'str'}, 'input': {'key': 'input', 'type': 'GetUserTablesSqlTaskInput'}, 'output': {'key': 'output', 'type': '[GetUserTablesSqlTaskOutput]'}, } - def __init__(self, *, errors=None, input=None, **kwargs) -> None: - super(GetUserTablesSqlTaskProperties, self).__init__(errors=errors, **kwargs) + def __init__(self, *, input=None, **kwargs) -> None: + super(GetUserTablesSqlTaskProperties, self).__init__(**kwargs) self.input = input self.output = None self.task_type = 'GetUserTables.Sql' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py new file mode 100644 index 000000000000..6ef56a65cc29 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateMySqlAzureDbForMySqlSyncDatabaseInput(Model): + """Database specific information for MySQL to Azure Database for MySQL + migration task inputs. + + :param name: Name of the database + :type name: str + :param target_database_name: Name of target database. Note: Target + database will be truncated before starting migration. + :type target_database_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MigrateMySqlAzureDbForMySqlSyncDatabaseInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_database_name = kwargs.get('target_database_name', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input_py3.py new file mode 100644 index 000000000000..aa813938d691 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateMySqlAzureDbForMySqlSyncDatabaseInput(Model): + """Database specific information for MySQL to Azure Database for MySQL + migration task inputs. + + :param name: Name of the database + :type name: str + :param target_database_name: Name of target database. Note: Target + database will be truncated before starting migration. + :type target_database_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, target_database_name: str=None, **kwargs) -> None: + super(MigrateMySqlAzureDbForMySqlSyncDatabaseInput, self).__init__(**kwargs) + self.name = name + self.target_database_name = target_database_name diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py new file mode 100644 index 000000000000..b248f0efb40d --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateMySqlAzureDbForMySqlSyncTaskInput(Model): + """Input for the task that migrates MySQL databases to Azure Database for + MySQL for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source + MySQL + :type source_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Required. Connection information for target + Azure Database for MySQL + :type target_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncDatabaseInput] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateMySqlAzureDbForMySqlSyncDatabaseInput]'}, + } + + def __init__(self, **kwargs): + super(MigrateMySqlAzureDbForMySqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs.get('source_connection_info', None) + self.target_connection_info = kwargs.get('target_connection_info', None) + self.selected_databases = kwargs.get('selected_databases', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input_py3.py new file mode 100644 index 000000000000..ff72651a7ec1 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateMySqlAzureDbForMySqlSyncTaskInput(Model): + """Input for the task that migrates MySQL databases to Azure Database for + MySQL for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source + MySQL + :type source_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Required. Connection information for target + Azure Database for MySQL + :type target_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncDatabaseInput] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateMySqlAzureDbForMySqlSyncDatabaseInput]'}, + } + + def __init__(self, *, source_connection_info, target_connection_info, selected_databases, **kwargs) -> None: + super(MigrateMySqlAzureDbForMySqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.selected_databases = selected_databases diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py new file mode 100644 index 000000000000..ce87413056b5 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutput(Model): + """Output for the task that migrates MySQL databases to Azure Database for + MySQL for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError', 'ErrorOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputError', 'TableLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel', 'DatabaseLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel'} + } + + def __init__(self, **kwargs): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py new file mode 100644 index 000000000000..19ea595d9431 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :param error_message: Error message + :type error_message: str + :param events: List of error events. + :type events: + list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__(self, **kwargs): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.error_message = kwargs.get('error_message', None) + self.events = kwargs.get('events', None) + self.result_type = 'DatabaseLevelErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error_py3.py new file mode 100644 index 000000000000..0e9b50426d75 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :param error_message: Error message + :type error_message: str + :param events: List of error events. + :type events: + list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__(self, *, error_message: str=None, events=None, **kwargs) -> None: + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.error_message = error_message + self.events = events + self.result_type = 'DatabaseLevelErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py new file mode 100644 index 000000000000..05ef91f1fff4 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar migration_state: Migration state that this database is in. Possible + values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', + 'RUNNING', 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', + 'CANCELLED', 'FAILED' + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has + been completed + :vartype initialization_completed: bool + :ivar latency: CDC apply latency + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level_py3.py new file mode 100644 index 000000000000..6d6af1e1cdaa --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level_py3.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar migration_state: Migration state that this database is in. Possible + values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', + 'RUNNING', 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', + 'CANCELLED', 'FAILED' + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has + been completed + :vartype initialization_completed: bool + :ivar latency: CDC apply latency + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py new file mode 100644 index 000000000000..b545553163c3 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputError(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar error: Migration error + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__(self, **kwargs): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputError, self).__init__(**kwargs) + self.error = None + self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error_py3.py new file mode 100644 index 000000000000..a250a71f53c6 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputError(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar error: Migration error + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputError, self).__init__(**kwargs) + self.error = None + self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py new file mode 100644 index 000000000000..e859a576d331 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar source_server_version: Source server version + :vartype source_server_version: str + :ivar source_server: Source server name + :vartype source_server: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server: Target server name + :vartype target_server: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level_py3.py new file mode 100644 index 000000000000..bd74827ef775 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar source_server_version: Source server version + :vartype source_server_version: str + :ivar source_server: Source server name + :vartype source_server: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server: Target server name + :vartype target_server: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_py3.py new file mode 100644 index 000000000000..64d731ac887d --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutput(Model): + """Output for the task that migrates MySQL databases to Azure Database for + MySQL for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError', 'ErrorOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputError', 'TableLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel', 'DatabaseLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel'} + } + + def __init__(self, **kwargs) -> None: + super(MigrateMySqlAzureDbForMySqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py new file mode 100644 index 000000000000..2ec7f6dc726a --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table + :vartype table_name: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts + :vartype cdc_insert_counter: str + :ivar cdc_update_counter: Number of applied updates + :vartype cdc_update_counter: str + :ivar cdc_delete_counter: Number of applied deletes + :vartype cdc_delete_counter: str + :ivar full_load_est_finish_time: Estimate to finish full load + :vartype full_load_est_finish_time: datetime + :ivar full_load_started_on: Full load start time + :vartype full_load_started_on: datetime + :ivar full_load_ended_on: Full load end time + :vartype full_load_ended_on: datetime + :ivar full_load_total_rows: Number of rows applied in full load + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values + include: 'BEFORE_LOAD', 'FULL_LOAD', 'COMPLETED', 'CANCELED', 'ERROR', + 'FAILED' + :vartype state: str or + ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target + :vartype last_modified_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'str'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'str'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'str'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + self.result_type = 'TableLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level_py3.py new file mode 100644 index 000000000000..012b20615f83 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level_py3.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table + :vartype table_name: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts + :vartype cdc_insert_counter: str + :ivar cdc_update_counter: Number of applied updates + :vartype cdc_update_counter: str + :ivar cdc_delete_counter: Number of applied deletes + :vartype cdc_delete_counter: str + :ivar full_load_est_finish_time: Estimate to finish full load + :vartype full_load_est_finish_time: datetime + :ivar full_load_started_on: Full load start time + :vartype full_load_started_on: datetime + :ivar full_load_ended_on: Full load end time + :vartype full_load_ended_on: datetime + :ivar full_load_total_rows: Number of rows applied in full load + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values + include: 'BEFORE_LOAD', 'FULL_LOAD', 'COMPLETED', 'CANCELED', 'ERROR', + 'FAILED' + :vartype state: str or + ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target + :vartype last_modified_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'str'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'str'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'str'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + self.result_type = 'TableLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py new file mode 100644 index 000000000000..a5c24c42dcdd --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class MigrateMySqlAzureDbForMySqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates MySQL databases to Azure Database for + MySQL for online migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateMySqlAzureDbForMySqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateMySqlAzureDbForMySqlSyncTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(MigrateMySqlAzureDbForMySqlSyncTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'Migrate.MySql.AzureDbForMySql.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties_py3.py new file mode 100644 index 000000000000..0c2175b78690 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class MigrateMySqlAzureDbForMySqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates MySQL databases to Azure Database for + MySQL for online migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateMySqlAzureDbForMySqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateMySqlAzureDbForMySqlSyncTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(MigrateMySqlAzureDbForMySqlSyncTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'Migrate.MySql.AzureDbForMySql.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py new file mode 100644 index 000000000000..cdabccddc0b0 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput(Model): + """Database specific information for PostgreSQL to Azure Database for + PostgreSQL migration task inputs. + + :param name: Name of the database + :type name: str + :param target_database_name: Name of target database. Note: Target + database will be truncated before starting migration. + :type target_database_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_database_name = kwargs.get('target_database_name', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input_py3.py new file mode 100644 index 000000000000..8b38aebe0bc3 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput(Model): + """Database specific information for PostgreSQL to Azure Database for + PostgreSQL migration task inputs. + + :param name: Name of the database + :type name: str + :param target_database_name: Name of target database. Note: Target + database will be truncated before starting migration. + :type target_database_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, target_database_name: str=None, **kwargs) -> None: + super(MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, self).__init__(**kwargs) + self.name = name + self.target_database_name = target_database_name diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py new file mode 100644 index 000000000000..34cdca4180fa --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput(Model): + """Input for the task that migrates PostgreSQL databases to Azure Database for + PostgreSQL for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput] + :param target_connection_info: Required. Connection information for target + Azure Database for PostgreSQL + :type target_connection_info: + ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param source_connection_info: Required. Connection information for source + PostgreSQL + :type source_connection_info: + ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + """ + + _validation = { + 'selected_databases': {'required': True}, + 'target_connection_info': {'required': True}, + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput]'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + } + + def __init__(self, **kwargs): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs.get('selected_databases', None) + self.target_connection_info = kwargs.get('target_connection_info', None) + self.source_connection_info = kwargs.get('source_connection_info', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input_py3.py new file mode 100644 index 000000000000..edbcd964ea28 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput(Model): + """Input for the task that migrates PostgreSQL databases to Azure Database for + PostgreSQL for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput] + :param target_connection_info: Required. Connection information for target + Azure Database for PostgreSQL + :type target_connection_info: + ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param source_connection_info: Required. Connection information for source + PostgreSQL + :type source_connection_info: + ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + """ + + _validation = { + 'selected_databases': {'required': True}, + 'target_connection_info': {'required': True}, + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput]'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + } + + def __init__(self, *, selected_databases, target_connection_info, source_connection_info, **kwargs) -> None: + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.selected_databases = selected_databases + self.target_connection_info = target_connection_info + self.source_connection_info = source_connection_info diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py new file mode 100644 index 000000000000..2e67ad72eea5 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput(Model): + """Output for the task that migrates PostgreSQL databases to Azure Database + for PostgreSQL for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError', 'ErrorOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError', 'TableLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel', 'DatabaseLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel'} + } + + def __init__(self, **kwargs): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py new file mode 100644 index 000000000000..2cf6c6f523e4 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :param error_message: Error message + :type error_message: str + :param events: List of error events. + :type events: + list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__(self, **kwargs): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.error_message = kwargs.get('error_message', None) + self.events = kwargs.get('events', None) + self.result_type = 'DatabaseLevelErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error_py3.py new file mode 100644 index 000000000000..20d8350ca4d9 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :param error_message: Error message + :type error_message: str + :param events: List of error events. + :type events: + list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__(self, *, error_message: str=None, events=None, **kwargs) -> None: + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.error_message = error_message + self.events = events + self.result_type = 'DatabaseLevelErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py new file mode 100644 index 000000000000..6e6a904277da --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar migration_state: Migration state that this database is in. Possible + values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', + 'RUNNING', 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', + 'CANCELLED', 'FAILED' + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has + been completed + :vartype initialization_completed: bool + :ivar latency: CDC apply latency + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level_py3.py new file mode 100644 index 000000000000..b43b9c0f96c7 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level_py3.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar migration_state: Migration state that this database is in. Possible + values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', + 'RUNNING', 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', + 'CANCELLED', 'FAILED' + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has + been completed + :vartype initialization_completed: bool + :ivar latency: CDC apply latency + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py new file mode 100644 index 000000000000..84d67be56cd5 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar error: Migration error + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__(self, **kwargs): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, self).__init__(**kwargs) + self.error = None + self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error_py3.py new file mode 100644 index 000000000000..f3c0512f5767 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar error: Migration error + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__(self, **kwargs) -> None: + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, self).__init__(**kwargs) + self.error = None + self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py new file mode 100644 index 000000000000..fdf53d082ab7 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar source_server_version: Source server version + :vartype source_server_version: str + :ivar source_server: Source server name + :vartype source_server: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server: Target server name + :vartype target_server: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level_py3.py new file mode 100644 index 000000000000..b69704273b7c --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar source_server_version: Source server version + :vartype source_server_version: str + :ivar source_server: Source server name + :vartype source_server: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server: Target server name + :vartype target_server: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_py3.py new file mode 100644 index 000000000000..79f5489e9e8e --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput(Model): + """Output for the task that migrates PostgreSQL databases to Azure Database + for PostgreSQL for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError', 'ErrorOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError', 'TableLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel', 'DatabaseLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel'} + } + + def __init__(self, **kwargs) -> None: + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py new file mode 100644 index 000000000000..d9bd66b4cc7c --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table + :vartype table_name: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts + :vartype cdc_insert_counter: long + :ivar cdc_update_counter: Number of applied updates + :vartype cdc_update_counter: long + :ivar cdc_delete_counter: Number of applied deletes + :vartype cdc_delete_counter: long + :ivar full_load_est_finish_time: Estimate to finish full load + :vartype full_load_est_finish_time: datetime + :ivar full_load_started_on: Full load start time + :vartype full_load_started_on: datetime + :ivar full_load_ended_on: Full load end time + :vartype full_load_ended_on: datetime + :ivar full_load_total_rows: Number of rows applied in full load + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values + include: 'BEFORE_LOAD', 'FULL_LOAD', 'COMPLETED', 'CANCELED', 'ERROR', + 'FAILED' + :vartype state: str or + ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target + :vartype last_modified_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + self.result_type = 'TableLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level_py3.py new file mode 100644 index 000000000000..3735d1b3a54d --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level_py3.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table + :vartype table_name: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts + :vartype cdc_insert_counter: long + :ivar cdc_update_counter: Number of applied updates + :vartype cdc_update_counter: long + :ivar cdc_delete_counter: Number of applied deletes + :vartype cdc_delete_counter: long + :ivar full_load_est_finish_time: Estimate to finish full load + :vartype full_load_est_finish_time: datetime + :ivar full_load_started_on: Full load start time + :vartype full_load_started_on: datetime + :ivar full_load_ended_on: Full load end time + :vartype full_load_ended_on: datetime + :ivar full_load_total_rows: Number of rows applied in full load + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values + include: 'BEFORE_LOAD', 'FULL_LOAD', 'COMPLETED', 'CANCELED', 'ERROR', + 'FAILED' + :vartype state: str or + ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target + :vartype last_modified_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + self.result_type = 'TableLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py new file mode 100644 index 000000000000..bd681f289119 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates PostgreSQL databases to Azure + Database for PostgreSQL for online migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties_py3.py new file mode 100644 index 000000000000..fdd9e444a36c --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates PostgreSQL databases to Azure + Database for PostgreSQL for online migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_database_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_database_input.py new file mode 100644 index 000000000000..56b805f441c8 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_database_input.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSchemaSqlServerSqlDbDatabaseInput(Model): + """Database input for migrate schema Sql Server to Azure SQL Server scenario. + + :param target_database_name: Name of target database + :type target_database_name: str + :param schema_setting: Database schema migration settings + :type schema_setting: + ~azure.mgmt.datamigration.models.SchemaMigrationSetting + """ + + _attribute_map = { + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'schema_setting': {'key': 'schemaSetting', 'type': 'SchemaMigrationSetting'}, + } + + def __init__(self, **kwargs): + super(MigrateSchemaSqlServerSqlDbDatabaseInput, self).__init__(**kwargs) + self.target_database_name = kwargs.get('target_database_name', None) + self.schema_setting = kwargs.get('schema_setting', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_database_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_database_input_py3.py new file mode 100644 index 000000000000..17c28c7a0757 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_database_input_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSchemaSqlServerSqlDbDatabaseInput(Model): + """Database input for migrate schema Sql Server to Azure SQL Server scenario. + + :param target_database_name: Name of target database + :type target_database_name: str + :param schema_setting: Database schema migration settings + :type schema_setting: + ~azure.mgmt.datamigration.models.SchemaMigrationSetting + """ + + _attribute_map = { + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'schema_setting': {'key': 'schemaSetting', 'type': 'SchemaMigrationSetting'}, + } + + def __init__(self, *, target_database_name: str=None, schema_setting=None, **kwargs) -> None: + super(MigrateSchemaSqlServerSqlDbDatabaseInput, self).__init__(**kwargs) + self.target_database_name = target_database_name + self.schema_setting = schema_setting diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_input.py new file mode 100644 index 000000000000..780840f12dd7 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_input.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sql_migration_task_input import SqlMigrationTaskInput + + +class MigrateSchemaSqlServerSqlDbTaskInput(SqlMigrationTaskInput): + """Input for task that migrates Schema for SQL Server databases to Azure SQL + databases. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbDatabaseInput] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSchemaSqlServerSqlDbDatabaseInput]'}, + } + + def __init__(self, **kwargs): + super(MigrateSchemaSqlServerSqlDbTaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs.get('selected_databases', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_input_py3.py new file mode 100644 index 000000000000..0af2ff8e749b --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_input_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sql_migration_task_input_py3 import SqlMigrationTaskInput + + +class MigrateSchemaSqlServerSqlDbTaskInput(SqlMigrationTaskInput): + """Input for task that migrates Schema for SQL Server databases to Azure SQL + databases. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbDatabaseInput] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSchemaSqlServerSqlDbDatabaseInput]'}, + } + + def __init__(self, *, source_connection_info, target_connection_info, selected_databases, **kwargs) -> None: + super(MigrateSchemaSqlServerSqlDbTaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info, **kwargs) + self.selected_databases = selected_databases diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output.py new file mode 100644 index 000000000000..cedc5073506a --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSchemaSqlServerSqlDbTaskOutput(Model): + """Output for the task that migrates Schema for SQL Server databases to Azure + SQL databases. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, + MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, + MigrateSchemaSqlServerSqlDbTaskOutputError, MigrateSchemaSqlTaskOutputError + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'MigrationLevelOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel', 'DatabaseLevelOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel', 'SchemaErrorOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputError', 'ErrorOutput': 'MigrateSchemaSqlTaskOutputError'} + } + + def __init__(self, **kwargs): + super(MigrateSchemaSqlServerSqlDbTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_database_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_database_level.py new file mode 100644 index 000000000000..bd79bf6e5bc1 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_database_level.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_schema_sql_server_sql_db_task_output import MigrateSchemaSqlServerSqlDbTaskOutput + + +class MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar state: State of the schema migration for this database. Possible + values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Schema migration stage for this database. Possible values + include: 'NotStarted', 'ValidatingInputs', 'CollectingObjects', + 'DownloadingScript', 'GeneratingScript', 'UploadingScript', + 'DeployingSchema', 'Completed', 'CompletedWithWarnings', 'Failed' + :vartype stage: str or + ~azure.mgmt.datamigration.models.SchemaMigrationStage + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar database_error_result_prefix: Prefix string to use for querying + errors for this database + :vartype database_error_result_prefix: str + :ivar schema_error_result_prefix: Prefix string to use for querying schema + errors for this database + :vartype schema_error_result_prefix: str + :ivar number_of_successful_operations: Number of successful operations for + this database + :vartype number_of_successful_operations: long + :ivar number_of_failed_operations: Number of failed operations for this + database + :vartype number_of_failed_operations: long + :ivar file_id: Identifier for the file resource containing the schema of + this database + :vartype file_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'database_error_result_prefix': {'readonly': True}, + 'schema_error_result_prefix': {'readonly': True}, + 'number_of_successful_operations': {'readonly': True}, + 'number_of_failed_operations': {'readonly': True}, + 'file_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'database_error_result_prefix': {'key': 'databaseErrorResultPrefix', 'type': 'str'}, + 'schema_error_result_prefix': {'key': 'schemaErrorResultPrefix', 'type': 'str'}, + 'number_of_successful_operations': {'key': 'numberOfSuccessfulOperations', 'type': 'long'}, + 'number_of_failed_operations': {'key': 'numberOfFailedOperations', 'type': 'long'}, + 'file_id': {'key': 'fileId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.database_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.database_error_result_prefix = None + self.schema_error_result_prefix = None + self.number_of_successful_operations = None + self.number_of_failed_operations = None + self.file_id = None + self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_database_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_database_level_py3.py new file mode 100644 index 000000000000..40ca965b8ed3 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_database_level_py3.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_schema_sql_server_sql_db_task_output_py3 import MigrateSchemaSqlServerSqlDbTaskOutput + + +class MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar state: State of the schema migration for this database. Possible + values include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Schema migration stage for this database. Possible values + include: 'NotStarted', 'ValidatingInputs', 'CollectingObjects', + 'DownloadingScript', 'GeneratingScript', 'UploadingScript', + 'DeployingSchema', 'Completed', 'CompletedWithWarnings', 'Failed' + :vartype stage: str or + ~azure.mgmt.datamigration.models.SchemaMigrationStage + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar database_error_result_prefix: Prefix string to use for querying + errors for this database + :vartype database_error_result_prefix: str + :ivar schema_error_result_prefix: Prefix string to use for querying schema + errors for this database + :vartype schema_error_result_prefix: str + :ivar number_of_successful_operations: Number of successful operations for + this database + :vartype number_of_successful_operations: long + :ivar number_of_failed_operations: Number of failed operations for this + database + :vartype number_of_failed_operations: long + :ivar file_id: Identifier for the file resource containing the schema of + this database + :vartype file_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'database_error_result_prefix': {'readonly': True}, + 'schema_error_result_prefix': {'readonly': True}, + 'number_of_successful_operations': {'readonly': True}, + 'number_of_failed_operations': {'readonly': True}, + 'file_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'database_error_result_prefix': {'key': 'databaseErrorResultPrefix', 'type': 'str'}, + 'schema_error_result_prefix': {'key': 'schemaErrorResultPrefix', 'type': 'str'}, + 'number_of_successful_operations': {'key': 'numberOfSuccessfulOperations', 'type': 'long'}, + 'number_of_failed_operations': {'key': 'numberOfFailedOperations', 'type': 'long'}, + 'file_id': {'key': 'fileId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.database_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.database_error_result_prefix = None + self.schema_error_result_prefix = None + self.number_of_successful_operations = None + self.number_of_failed_operations = None + self.file_id = None + self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_error.py new file mode 100644 index 000000000000..3a6c16548eb7 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_error.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_schema_sql_server_sql_db_task_output import MigrateSchemaSqlServerSqlDbTaskOutput + + +class MigrateSchemaSqlServerSqlDbTaskOutputError(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar command_text: Schema command which failed + :vartype command_text: str + :ivar error_text: Reason of failure + :vartype error_text: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'command_text': {'readonly': True}, + 'error_text': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'command_text': {'key': 'commandText', 'type': 'str'}, + 'error_text': {'key': 'errorText', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MigrateSchemaSqlServerSqlDbTaskOutputError, self).__init__(**kwargs) + self.command_text = None + self.error_text = None + self.result_type = 'SchemaErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_error_py3.py new file mode 100644 index 000000000000..ba6d5386a5cd --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_error_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_schema_sql_server_sql_db_task_output_py3 import MigrateSchemaSqlServerSqlDbTaskOutput + + +class MigrateSchemaSqlServerSqlDbTaskOutputError(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar command_text: Schema command which failed + :vartype command_text: str + :ivar error_text: Reason of failure + :vartype error_text: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'command_text': {'readonly': True}, + 'error_text': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'command_text': {'key': 'commandText', 'type': 'str'}, + 'error_text': {'key': 'errorText', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSchemaSqlServerSqlDbTaskOutputError, self).__init__(**kwargs) + self.command_text = None + self.error_text = None + self.result_type = 'SchemaErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_migration_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_migration_level.py new file mode 100644 index 000000000000..b1f960f98a77 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_migration_level.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_schema_sql_server_sql_db_task_output import MigrateSchemaSqlServerSqlDbTaskOutput + + +class MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar state: Overall state of the schema migration. Possible values + include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar source_server_version: Source server version + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version + :vartype target_server_brand_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, self).__init__(**kwargs) + self.state = None + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_migration_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_migration_level_py3.py new file mode 100644 index 000000000000..7e5399871ed4 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_migration_level_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_schema_sql_server_sql_db_task_output_py3 import MigrateSchemaSqlServerSqlDbTaskOutput + + +class MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar state: Overall state of the schema migration. Possible values + include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar source_server_version: Source server version + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version + :vartype target_server_brand_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, self).__init__(**kwargs) + self.state = None + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_py3.py new file mode 100644 index 000000000000..3db08cbd64c4 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_output_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSchemaSqlServerSqlDbTaskOutput(Model): + """Output for the task that migrates Schema for SQL Server databases to Azure + SQL databases. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, + MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, + MigrateSchemaSqlServerSqlDbTaskOutputError, MigrateSchemaSqlTaskOutputError + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'MigrationLevelOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel', 'DatabaseLevelOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel', 'SchemaErrorOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputError', 'ErrorOutput': 'MigrateSchemaSqlTaskOutputError'} + } + + def __init__(self, **kwargs) -> None: + super(MigrateSchemaSqlServerSqlDbTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_properties.py new file mode 100644 index 000000000000..1c98cfad9fd6 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class MigrateSchemaSqlServerSqlDbTaskProperties(ProjectTaskProperties): + """Properties for task that migrates Schema for SQL Server databases to Azure + SQL databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSchemaSqlServerSqlDbTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSchemaSqlServerSqlDbTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(MigrateSchemaSqlServerSqlDbTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'MigrateSchemaSqlServerSqlDb' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_properties_py3.py new file mode 100644 index 000000000000..f1cd1fd1dd71 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_server_sql_db_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class MigrateSchemaSqlServerSqlDbTaskProperties(ProjectTaskProperties): + """Properties for task that migrates Schema for SQL Server databases to Azure + SQL databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSchemaSqlServerSqlDbTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSchemaSqlServerSqlDbTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(MigrateSchemaSqlServerSqlDbTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'MigrateSchemaSqlServerSqlDb' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_task_output_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_task_output_error.py new file mode 100644 index 000000000000..074885c0322b --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_task_output_error.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_schema_sql_server_sql_db_task_output import MigrateSchemaSqlServerSqlDbTaskOutput + + +class MigrateSchemaSqlTaskOutputError(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar error: Migration error + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__(self, **kwargs): + super(MigrateSchemaSqlTaskOutputError, self).__init__(**kwargs) + self.error = None + self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_task_output_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_task_output_error_py3.py new file mode 100644 index 000000000000..9afffc5b2aa0 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_schema_sql_task_output_error_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_schema_sql_server_sql_db_task_output_py3 import MigrateSchemaSqlServerSqlDbTaskOutput + + +class MigrateSchemaSqlTaskOutputError(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar error: Migration error + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSchemaSqlTaskOutputError, self).__init__(**kwargs) + self.error = None + self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_database_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_database_input.py new file mode 100644 index 000000000000..f088fb0680d6 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_database_input.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSqlServerSqlDbSyncDatabaseInput(Model): + """Database specific information for SQL to Azure SQL DB sync migration task + inputs. + + :param id: Unique identifier for database + :type id: str + :param name: Name of database + :type name: str + :param target_database_name: Target database name + :type target_database_name: str + :param schema_name: Schema name to be migrated + :type schema_name: str + :param table_map: Mapping of source to target tables + :type table_map: dict[str, str] + :param migration_setting: Migration settings which tune the migration + behavior + :type migration_setting: dict[str, str] + :param source_setting: Source settings to tune source endpoint migration + behavior + :type source_setting: dict[str, str] + :param target_setting: Target settings to tune target endpoint migration + behavior + :type target_setting: dict[str, str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + 'migration_setting': {'key': 'migrationSetting', 'type': '{str}'}, + 'source_setting': {'key': 'sourceSetting', 'type': '{str}'}, + 'target_setting': {'key': 'targetSetting', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlDbSyncDatabaseInput, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.target_database_name = kwargs.get('target_database_name', None) + self.schema_name = kwargs.get('schema_name', None) + self.table_map = kwargs.get('table_map', None) + self.migration_setting = kwargs.get('migration_setting', None) + self.source_setting = kwargs.get('source_setting', None) + self.target_setting = kwargs.get('target_setting', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_database_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_database_input_py3.py new file mode 100644 index 000000000000..1298fe296799 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_database_input_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSqlServerSqlDbSyncDatabaseInput(Model): + """Database specific information for SQL to Azure SQL DB sync migration task + inputs. + + :param id: Unique identifier for database + :type id: str + :param name: Name of database + :type name: str + :param target_database_name: Target database name + :type target_database_name: str + :param schema_name: Schema name to be migrated + :type schema_name: str + :param table_map: Mapping of source to target tables + :type table_map: dict[str, str] + :param migration_setting: Migration settings which tune the migration + behavior + :type migration_setting: dict[str, str] + :param source_setting: Source settings to tune source endpoint migration + behavior + :type source_setting: dict[str, str] + :param target_setting: Target settings to tune target endpoint migration + behavior + :type target_setting: dict[str, str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + 'migration_setting': {'key': 'migrationSetting', 'type': '{str}'}, + 'source_setting': {'key': 'sourceSetting', 'type': '{str}'}, + 'target_setting': {'key': 'targetSetting', 'type': '{str}'}, + } + + def __init__(self, *, id: str=None, name: str=None, target_database_name: str=None, schema_name: str=None, table_map=None, migration_setting=None, source_setting=None, target_setting=None, **kwargs) -> None: + super(MigrateSqlServerSqlDbSyncDatabaseInput, self).__init__(**kwargs) + self.id = id + self.name = name + self.target_database_name = target_database_name + self.schema_name = schema_name + self.table_map = table_map + self.migration_setting = migration_setting + self.source_setting = source_setting + self.target_setting = target_setting diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py new file mode 100644 index 000000000000..be135f30d86d --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sql_migration_task_input import SqlMigrationTaskInput + + +class MigrateSqlServerSqlDbSyncTaskInput(SqlMigrationTaskInput): + """Input for the task that migrates on-prem SQL Server databases to Azure SQL + Database for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncDatabaseInput] + :param validation_options: Validation options + :type validation_options: + ~azure.mgmt.datamigration.models.MigrationValidationOptions + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlDbSyncDatabaseInput]'}, + 'validation_options': {'key': 'validationOptions', 'type': 'MigrationValidationOptions'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlDbSyncTaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs.get('selected_databases', None) + self.validation_options = kwargs.get('validation_options', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input_py3.py new file mode 100644 index 000000000000..ae48ae6e3ad5 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sql_migration_task_input_py3 import SqlMigrationTaskInput + + +class MigrateSqlServerSqlDbSyncTaskInput(SqlMigrationTaskInput): + """Input for the task that migrates on-prem SQL Server databases to Azure SQL + Database for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncDatabaseInput] + :param validation_options: Validation options + :type validation_options: + ~azure.mgmt.datamigration.models.MigrationValidationOptions + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlDbSyncDatabaseInput]'}, + 'validation_options': {'key': 'validationOptions', 'type': 'MigrationValidationOptions'}, + } + + def __init__(self, *, source_connection_info, target_connection_info, selected_databases, validation_options=None, **kwargs) -> None: + super(MigrateSqlServerSqlDbSyncTaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info, **kwargs) + self.selected_databases = selected_databases + self.validation_options = validation_options diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py new file mode 100644 index 000000000000..0f6402a6c73e --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSqlServerSqlDbSyncTaskOutput(Model): + """Output for the task that migrates on-prem SQL Server databases to Azure SQL + Database for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, + MigrateSqlServerSqlDbSyncTaskOutputError, + MigrateSqlServerSqlDbSyncTaskOutputTableLevel, + MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, + MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseError', 'ErrorOutput': 'MigrateSqlServerSqlDbSyncTaskOutputError', 'TableLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputTableLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel'} + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlDbSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py new file mode 100644 index 000000000000..3a39650c763a --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputDatabaseError(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :param error_message: Error message + :type error_message: str + :param events: List of error events. + :type events: + list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.error_message = kwargs.get('error_message', None) + self.events = kwargs.get('events', None) + self.result_type = 'DatabaseLevelErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error_py3.py new file mode 100644 index 000000000000..044de6d3d8ad --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_db_sync_task_output_py3 import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputDatabaseError(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :param error_message: Error message + :type error_message: str + :param events: List of error events. + :type events: + list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__(self, *, error_message: str=None, events=None, **kwargs) -> None: + super(MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.error_message = error_message + self.events = events + self.result_type = 'DatabaseLevelErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py new file mode 100644 index 000000000000..d2874c104154 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar migration_state: Migration state that this database is in. Possible + values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', + 'RUNNING', 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', + 'CANCELLED', 'FAILED' + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has + been completed + :vartype initialization_completed: bool + :ivar latency: CDC apply latency + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level_py3.py new file mode 100644 index 000000000000..123f2b6972fa --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level_py3.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_db_sync_task_output_py3 import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar migration_state: Migration state that this database is in. Possible + values include: 'UNDEFINED', 'CONFIGURING', 'INITIALIAZING', 'STARTING', + 'RUNNING', 'READY_TO_COMPLETE', 'COMPLETING', 'COMPLETE', 'CANCELLING', + 'CANCELLED', 'FAILED' + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has + been completed + :vartype initialization_completed: bool + :ivar latency: CDC apply latency + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py new file mode 100644 index 000000000000..f8da803b0dd5 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputError(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar error: Migration error + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlDbSyncTaskOutputError, self).__init__(**kwargs) + self.error = None + self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error_py3.py new file mode 100644 index 000000000000..c09bb4d8add5 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_db_sync_task_output_py3 import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputError(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar error: Migration error + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlDbSyncTaskOutputError, self).__init__(**kwargs) + self.error = None + self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py new file mode 100644 index 000000000000..03d3e832bbe6 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar source_server_version: Source server version + :vartype source_server_version: str + :ivar source_server: Source server name + :vartype source_server: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server: Target server name + :vartype target_server: str + :ivar database_count: Count of databases + :vartype database_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + 'database_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + 'database_count': {'key': 'databaseCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.database_count = None + self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level_py3.py new file mode 100644 index 000000000000..6863d9cf96e5 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_db_sync_task_output_py3 import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar source_server_version: Source server version + :vartype source_server_version: str + :ivar source_server: Source server name + :vartype source_server: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server: Target server name + :vartype target_server: str + :ivar database_count: Count of databases + :vartype database_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + 'database_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + 'database_count': {'key': 'databaseCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.database_count = None + self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_py3.py new file mode 100644 index 000000000000..b7be743b752b --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSqlServerSqlDbSyncTaskOutput(Model): + """Output for the task that migrates on-prem SQL Server databases to Azure SQL + Database for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, + MigrateSqlServerSqlDbSyncTaskOutputError, + MigrateSqlServerSqlDbSyncTaskOutputTableLevel, + MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, + MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseError', 'ErrorOutput': 'MigrateSqlServerSqlDbSyncTaskOutputError', 'TableLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputTableLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel'} + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlDbSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py new file mode 100644 index 000000000000..6ec5c09b9e1e --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputTableLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table + :vartype table_name: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts + :vartype cdc_insert_counter: long + :ivar cdc_update_counter: Number of applied updates + :vartype cdc_update_counter: long + :ivar cdc_delete_counter: Number of applied deletes + :vartype cdc_delete_counter: long + :ivar full_load_est_finish_time: Estimate to finish full load + :vartype full_load_est_finish_time: datetime + :ivar full_load_started_on: Full load start time + :vartype full_load_started_on: datetime + :ivar full_load_ended_on: Full load end time + :vartype full_load_ended_on: datetime + :ivar full_load_total_rows: Number of rows applied in full load + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values + include: 'BEFORE_LOAD', 'FULL_LOAD', 'COMPLETED', 'CANCELED', 'ERROR', + 'FAILED' + :vartype state: str or + ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target + :vartype last_modified_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlDbSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + self.result_type = 'TableLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level_py3.py new file mode 100644 index 000000000000..a0fa99b45690 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level_py3.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_db_sync_task_output_py3 import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputTableLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table + :vartype table_name: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts + :vartype cdc_insert_counter: long + :ivar cdc_update_counter: Number of applied updates + :vartype cdc_update_counter: long + :ivar cdc_delete_counter: Number of applied deletes + :vartype cdc_delete_counter: long + :ivar full_load_est_finish_time: Estimate to finish full load + :vartype full_load_est_finish_time: datetime + :ivar full_load_started_on: Full load start time + :vartype full_load_started_on: datetime + :ivar full_load_ended_on: Full load end time + :vartype full_load_ended_on: datetime + :ivar full_load_total_rows: Number of rows applied in full load + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values + include: 'BEFORE_LOAD', 'FULL_LOAD', 'COMPLETED', 'CANCELED', 'ERROR', + 'FAILED' + :vartype state: str or + ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target + :vartype last_modified_time: datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlDbSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + self.result_type = 'TableLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py new file mode 100644 index 000000000000..41a06fa408e4 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class MigrateSqlServerSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates on-prem SQL Server databases to Azure + SQL Database for online migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlDbSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbSyncTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlDbSyncTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'Migrate.SqlServer.AzureSqlDb.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties_py3.py new file mode 100644 index 000000000000..94b893a58398 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class MigrateSqlServerSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates on-prem SQL Server databases to Azure + SQL Database for online migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlDbSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbSyncTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(MigrateSqlServerSqlDbSyncTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'Migrate.SqlServer.AzureSqlDb.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py index 32badbf078b1..a889f9e00f7b 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSqlServerSqlDbTaskOutput): - """Database level result for Sql Server to Azure Sql DB migration. + """MigrateSqlServerSqlDbTaskOutputDatabaseLevel. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level_py3.py index 1e919575fc96..a5520072991f 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level_py3.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSqlServerSqlDbTaskOutput): - """Database level result for Sql Server to Azure Sql DB migration. + """MigrateSqlServerSqlDbTaskOutputDatabaseLevel. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py index e576cdc7e233..01af38599841 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputError(MigrateSqlServerSqlDbTaskOutput): - """Task errors for Sql Server to Azure Sql DB migration. + """MigrateSqlServerSqlDbTaskOutputError. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error_py3.py index addea931935d..156a8d1a7b72 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error_py3.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputError(MigrateSqlServerSqlDbTaskOutput): - """Task errors for Sql Server to Azure Sql DB migration. + """MigrateSqlServerSqlDbTaskOutputError. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py index 34f22e16d191..28189c56cf93 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOutput): - """Migration level result for Sql server to Azure Sql DB migration. + """MigrateSqlServerSqlDbTaskOutputMigrationLevel. Variables are only populated by the server, and will be ignored when sending a request. @@ -45,9 +45,12 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut :ivar database_summary: Summary of database results in the migration :vartype database_summary: dict[str, ~azure.mgmt.datamigration.models.DatabaseSummaryResult] - :ivar migration_report: Migration Report Result, provides unique url for - downloading your migration report. - :vartype migration_report: + :param migration_validation_result: Migration Validation Results + :type migration_validation_result: + ~azure.mgmt.datamigration.models.MigrationValidationResult + :param migration_report_result: Migration Report Result, provides unique + url for downloading your migration report. + :type migration_report_result: ~azure.mgmt.datamigration.models.MigrationReportResult :ivar source_server_version: Source server version :vartype source_server_version: str @@ -73,7 +76,6 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut 'message': {'readonly': True}, 'databases': {'readonly': True}, 'database_summary': {'readonly': True}, - 'migration_report': {'readonly': True}, 'source_server_version': {'readonly': True}, 'source_server_brand_version': {'readonly': True}, 'target_server_version': {'readonly': True}, @@ -92,7 +94,8 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut 'message': {'key': 'message', 'type': 'str'}, 'databases': {'key': 'databases', 'type': '{str}'}, 'database_summary': {'key': 'databaseSummary', 'type': '{DatabaseSummaryResult}'}, - 'migration_report': {'key': 'migrationReport', 'type': 'MigrationReportResult'}, + 'migration_validation_result': {'key': 'migrationValidationResult', 'type': 'MigrationValidationResult'}, + 'migration_report_result': {'key': 'migrationReportResult', 'type': 'MigrationReportResult'}, 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, @@ -110,7 +113,8 @@ def __init__(self, **kwargs): self.message = None self.databases = None self.database_summary = None - self.migration_report = None + self.migration_validation_result = kwargs.get('migration_validation_result', None) + self.migration_report_result = kwargs.get('migration_report_result', None) self.source_server_version = None self.source_server_brand_version = None self.target_server_version = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level_py3.py index 71976086a201..3e6a2b7e30b3 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level_py3.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOutput): - """Migration level result for Sql server to Azure Sql DB migration. + """MigrateSqlServerSqlDbTaskOutputMigrationLevel. Variables are only populated by the server, and will be ignored when sending a request. @@ -45,9 +45,12 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut :ivar database_summary: Summary of database results in the migration :vartype database_summary: dict[str, ~azure.mgmt.datamigration.models.DatabaseSummaryResult] - :ivar migration_report: Migration Report Result, provides unique url for - downloading your migration report. - :vartype migration_report: + :param migration_validation_result: Migration Validation Results + :type migration_validation_result: + ~azure.mgmt.datamigration.models.MigrationValidationResult + :param migration_report_result: Migration Report Result, provides unique + url for downloading your migration report. + :type migration_report_result: ~azure.mgmt.datamigration.models.MigrationReportResult :ivar source_server_version: Source server version :vartype source_server_version: str @@ -73,7 +76,6 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut 'message': {'readonly': True}, 'databases': {'readonly': True}, 'database_summary': {'readonly': True}, - 'migration_report': {'readonly': True}, 'source_server_version': {'readonly': True}, 'source_server_brand_version': {'readonly': True}, 'target_server_version': {'readonly': True}, @@ -92,7 +94,8 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut 'message': {'key': 'message', 'type': 'str'}, 'databases': {'key': 'databases', 'type': '{str}'}, 'database_summary': {'key': 'databaseSummary', 'type': '{DatabaseSummaryResult}'}, - 'migration_report': {'key': 'migrationReport', 'type': 'MigrationReportResult'}, + 'migration_validation_result': {'key': 'migrationValidationResult', 'type': 'MigrationValidationResult'}, + 'migration_report_result': {'key': 'migrationReportResult', 'type': 'MigrationReportResult'}, 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, @@ -100,7 +103,7 @@ class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOut 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, migration_validation_result=None, migration_report_result=None, **kwargs) -> None: super(MigrateSqlServerSqlDbTaskOutputMigrationLevel, self).__init__(**kwargs) self.started_on = None self.ended_on = None @@ -110,7 +113,8 @@ def __init__(self, **kwargs) -> None: self.message = None self.databases = None self.database_summary = None - self.migration_report = None + self.migration_validation_result = migration_validation_result + self.migration_report_result = migration_report_result self.source_server_version = None self.source_server_brand_version = None self.target_server_version = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py index 9a149e79792b..7b56087a2627 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputTableLevel(MigrateSqlServerSqlDbTaskOutput): - """Table level result for Sql Server to Azure Sql DB migration. + """MigrateSqlServerSqlDbTaskOutputTableLevel. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level_py3.py index 8c621fe4aa7e..0543c50a81aa 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level_py3.py @@ -13,7 +13,7 @@ class MigrateSqlServerSqlDbTaskOutputTableLevel(MigrateSqlServerSqlDbTaskOutput): - """Table level result for Sql Server to Azure Sql DB migration. + """MigrateSqlServerSqlDbTaskOutputTableLevel. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py index f3099f7805f2..1ae011ba6c16 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py @@ -21,12 +21,15 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :param errors: Array of errors. This is ignored if submitted. - :type errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] :param task_type: Required. Constant filled by server. :type task_type: str :param input: Task input @@ -38,7 +41,9 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): """ _validation = { + 'errors': {'readonly': True}, 'state': {'readonly': True}, + 'commands': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, } @@ -46,6 +51,7 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): _attribute_map = { 'errors': {'key': 'errors', 'type': '[ODataError]'}, 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'task_type': {'key': 'taskType', 'type': 'str'}, 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlDbTaskInput'}, 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbTaskOutput]'}, diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties_py3.py index af6120676665..73aea95b3600 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties_py3.py @@ -21,12 +21,15 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): All required parameters must be populated in order to send to Azure. - :param errors: Array of errors. This is ignored if submitted. - :type errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] :param task_type: Required. Constant filled by server. :type task_type: str :param input: Task input @@ -38,7 +41,9 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): """ _validation = { + 'errors': {'readonly': True}, 'state': {'readonly': True}, + 'commands': {'readonly': True}, 'task_type': {'required': True}, 'output': {'readonly': True}, } @@ -46,13 +51,14 @@ class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): _attribute_map = { 'errors': {'key': 'errors', 'type': '[ODataError]'}, 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'task_type': {'key': 'taskType', 'type': 'str'}, 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlDbTaskInput'}, 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbTaskOutput]'}, } - def __init__(self, *, errors=None, input=None, **kwargs) -> None: - super(MigrateSqlServerSqlDbTaskProperties, self).__init__(errors=errors, **kwargs) + def __init__(self, *, input=None, **kwargs) -> None: + super(MigrateSqlServerSqlDbTaskProperties, self).__init__(**kwargs) self.input = input self.output = None self.task_type = 'Migrate.SqlServer.SqlDb' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py new file mode 100644 index 000000000000..cab20900dc54 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSqlServerSqlMIDatabaseInput(Model): + """Database specific information for SQL to Azure SQL DB Managed Instance + migration task inputs. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the database + :type name: str + :param restore_database_name: Required. Name of the database at + destination + :type restore_database_name: str + :param backup_file_share: Backup file share information for backing up + this database. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_file_paths: The list of backup files to be used in case of + existing backups. + :type backup_file_paths: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'restore_database_name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name': {'key': 'restoreDatabaseName', 'type': 'str'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_file_paths': {'key': 'backupFilePaths', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlMIDatabaseInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.restore_database_name = kwargs.get('restore_database_name', None) + self.backup_file_share = kwargs.get('backup_file_share', None) + self.backup_file_paths = kwargs.get('backup_file_paths', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input_py3.py new file mode 100644 index 000000000000..5c609a018b24 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSqlServerSqlMIDatabaseInput(Model): + """Database specific information for SQL to Azure SQL DB Managed Instance + migration task inputs. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the database + :type name: str + :param restore_database_name: Required. Name of the database at + destination + :type restore_database_name: str + :param backup_file_share: Backup file share information for backing up + this database. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_file_paths: The list of backup files to be used in case of + existing backups. + :type backup_file_paths: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'restore_database_name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name': {'key': 'restoreDatabaseName', 'type': 'str'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_file_paths': {'key': 'backupFilePaths', 'type': '[str]'}, + } + + def __init__(self, *, name: str, restore_database_name: str, backup_file_share=None, backup_file_paths=None, **kwargs) -> None: + super(MigrateSqlServerSqlMIDatabaseInput, self).__init__(**kwargs) + self.name = name + self.restore_database_name = restore_database_name + self.backup_file_share = backup_file_share + self.backup_file_paths = backup_file_paths diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py new file mode 100644 index 000000000000..2fd50fede8e0 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sql_migration_task_input import SqlMigrationTaskInput + + +class MigrateSqlServerSqlMITaskInput(SqlMigrationTaskInput): + """Input for task that migrates SQL Server databases to Azure SQL Database + Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMIDatabaseInput] + :param selected_logins: Logins to migrate. + :type selected_logins: list[str] + :param selected_agent_jobs: Agent Jobs to migrate. + :type selected_agent_jobs: list[str] + :param backup_file_share: Backup file share information for all selected + databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_blob_share: Required. SAS URI of Azure Storage Account + Container to be used for storing backup files. + :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare + :param backup_mode: Backup Mode to specify whether to use existing backup + or create new backup. If using existing backups, backup file paths are + required to be provided in selectedDatabases. Possible values include: + 'CreateBackup', 'ExistingBackup' + :type backup_mode: str or ~azure.mgmt.datamigration.models.BackupMode + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + 'backup_blob_share': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMIDatabaseInput]'}, + 'selected_logins': {'key': 'selectedLogins', 'type': '[str]'}, + 'selected_agent_jobs': {'key': 'selectedAgentJobs', 'type': '[str]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, + 'backup_mode': {'key': 'backupMode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlMITaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs.get('selected_databases', None) + self.selected_logins = kwargs.get('selected_logins', None) + self.selected_agent_jobs = kwargs.get('selected_agent_jobs', None) + self.backup_file_share = kwargs.get('backup_file_share', None) + self.backup_blob_share = kwargs.get('backup_blob_share', None) + self.backup_mode = kwargs.get('backup_mode', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input_py3.py new file mode 100644 index 000000000000..4d201d1ddcac --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .sql_migration_task_input_py3 import SqlMigrationTaskInput + + +class MigrateSqlServerSqlMITaskInput(SqlMigrationTaskInput): + """Input for task that migrates SQL Server databases to Azure SQL Database + Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMIDatabaseInput] + :param selected_logins: Logins to migrate. + :type selected_logins: list[str] + :param selected_agent_jobs: Agent Jobs to migrate. + :type selected_agent_jobs: list[str] + :param backup_file_share: Backup file share information for all selected + databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_blob_share: Required. SAS URI of Azure Storage Account + Container to be used for storing backup files. + :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare + :param backup_mode: Backup Mode to specify whether to use existing backup + or create new backup. If using existing backups, backup file paths are + required to be provided in selectedDatabases. Possible values include: + 'CreateBackup', 'ExistingBackup' + :type backup_mode: str or ~azure.mgmt.datamigration.models.BackupMode + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + 'backup_blob_share': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMIDatabaseInput]'}, + 'selected_logins': {'key': 'selectedLogins', 'type': '[str]'}, + 'selected_agent_jobs': {'key': 'selectedAgentJobs', 'type': '[str]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, + 'backup_mode': {'key': 'backupMode', 'type': 'str'}, + } + + def __init__(self, *, source_connection_info, target_connection_info, selected_databases, backup_blob_share, selected_logins=None, selected_agent_jobs=None, backup_file_share=None, backup_mode=None, **kwargs) -> None: + super(MigrateSqlServerSqlMITaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info, **kwargs) + self.selected_databases = selected_databases + self.selected_logins = selected_logins + self.selected_agent_jobs = selected_agent_jobs + self.backup_file_share = backup_file_share + self.backup_blob_share = backup_blob_share + self.backup_mode = backup_mode diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py new file mode 100644 index 000000000000..2c52e1015bb9 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSqlServerSqlMITaskOutput(Model): + """Output for task that migrates SQL Server databases to Azure SQL Database + Managed Instance. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlMITaskOutputError, + MigrateSqlServerSqlMITaskOutputLoginLevel, + MigrateSqlServerSqlMITaskOutputAgentJobLevel, + MigrateSqlServerSqlMITaskOutputDatabaseLevel, + MigrateSqlServerSqlMITaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'ErrorOutput': 'MigrateSqlServerSqlMITaskOutputError', 'LoginLevelOutput': 'MigrateSqlServerSqlMITaskOutputLoginLevel', 'AgentJobLevelOutput': 'MigrateSqlServerSqlMITaskOutputAgentJobLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlMITaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlMITaskOutputMigrationLevel'} + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlMITaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py new file mode 100644 index 000000000000..f724aaa61baa --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputAgentJobLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputAgentJobLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar name: Agent Job name. + :vartype name: str + :ivar is_enabled: The state of the original Agent Job. + :vartype is_enabled: bool + :ivar state: Current state of migration. Possible values include: 'None', + 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar message: Migration progress message + :vartype message: str + :ivar exceptions_and_warnings: Migration errors and warnings per job + :vartype exceptions_and_warnings: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'name': {'readonly': True}, + 'is_enabled': {'readonly': True}, + 'state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'state': {'key': 'state', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlMITaskOutputAgentJobLevel, self).__init__(**kwargs) + self.name = None + self.is_enabled = None + self.state = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + self.result_type = 'AgentJobLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level_py3.py new file mode 100644 index 000000000000..2ce2c02210d6 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_mi_task_output_py3 import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputAgentJobLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputAgentJobLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar name: Agent Job name. + :vartype name: str + :ivar is_enabled: The state of the original Agent Job. + :vartype is_enabled: bool + :ivar state: Current state of migration. Possible values include: 'None', + 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar message: Migration progress message + :vartype message: str + :ivar exceptions_and_warnings: Migration errors and warnings per job + :vartype exceptions_and_warnings: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'name': {'readonly': True}, + 'is_enabled': {'readonly': True}, + 'state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'state': {'key': 'state', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlMITaskOutputAgentJobLevel, self).__init__(**kwargs) + self.name = None + self.is_enabled = None + self.state = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + self.result_type = 'AgentJobLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py new file mode 100644 index 000000000000..fb0b68e98fdb --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputDatabaseLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar size_mb: Size of the database in megabytes + :vartype size_mb: float + :ivar state: Current state of migration. Possible values include: 'None', + 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Current stage of migration. Possible values include: 'None', + 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed' + :vartype stage: str or + ~azure.mgmt.datamigration.models.DatabaseMigrationStage + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar message: Migration progress message + :vartype message: str + :ivar exceptions_and_warnings: Migration exceptions and warnings + :vartype exceptions_and_warnings: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'size_mb': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'size_mb': {'key': 'sizeMB', 'type': 'float'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlMITaskOutputDatabaseLevel, self).__init__(**kwargs) + self.database_name = None + self.size_mb = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level_py3.py new file mode 100644 index 000000000000..68477fa457ca --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level_py3.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_mi_task_output_py3 import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputDatabaseLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database + :vartype database_name: str + :ivar size_mb: Size of the database in megabytes + :vartype size_mb: float + :ivar state: Current state of migration. Possible values include: 'None', + 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Current stage of migration. Possible values include: 'None', + 'Initialize', 'Backup', 'FileCopy', 'Restore', 'Completed' + :vartype stage: str or + ~azure.mgmt.datamigration.models.DatabaseMigrationStage + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar message: Migration progress message + :vartype message: str + :ivar exceptions_and_warnings: Migration exceptions and warnings + :vartype exceptions_and_warnings: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'size_mb': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'size_mb': {'key': 'sizeMB', 'type': 'float'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlMITaskOutputDatabaseLevel, self).__init__(**kwargs) + self.database_name = None + self.size_mb = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + self.result_type = 'DatabaseLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py new file mode 100644 index 000000000000..a6d243ab35f9 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputError(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar error: Migration error + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlMITaskOutputError, self).__init__(**kwargs) + self.error = None + self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error_py3.py new file mode 100644 index 000000000000..3d0a4a9043f8 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_mi_task_output_py3 import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputError(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar error: Migration error + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlMITaskOutputError, self).__init__(**kwargs) + self.error = None + self.result_type = 'ErrorOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py new file mode 100644 index 000000000000..4a32e8ca6646 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputLoginLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputLoginLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar login_name: Login name. + :vartype login_name: str + :ivar state: Current state of login. Possible values include: 'None', + 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Current stage of login. Possible values include: 'None', + 'Initialize', 'LoginMigration', 'EstablishUserMapping', + 'AssignRoleMembership', 'AssignRoleOwnership', + 'EstablishServerPermissions', 'EstablishObjectPermissions', 'Completed' + :vartype stage: str or + ~azure.mgmt.datamigration.models.LoginMigrationStage + :ivar started_on: Login migration start time + :vartype started_on: datetime + :ivar ended_on: Login migration end time + :vartype ended_on: datetime + :ivar message: Login migration progress message + :vartype message: str + :ivar exceptions_and_warnings: Login migration errors and warnings per + login + :vartype exceptions_and_warnings: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'login_name': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'login_name': {'key': 'loginName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlMITaskOutputLoginLevel, self).__init__(**kwargs) + self.login_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + self.result_type = 'LoginLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level_py3.py new file mode 100644 index 000000000000..ee9980b1b0f6 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_mi_task_output_py3 import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputLoginLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputLoginLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar login_name: Login name. + :vartype login_name: str + :ivar state: Current state of login. Possible values include: 'None', + 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Current stage of login. Possible values include: 'None', + 'Initialize', 'LoginMigration', 'EstablishUserMapping', + 'AssignRoleMembership', 'AssignRoleOwnership', + 'EstablishServerPermissions', 'EstablishObjectPermissions', 'Completed' + :vartype stage: str or + ~azure.mgmt.datamigration.models.LoginMigrationStage + :ivar started_on: Login migration start time + :vartype started_on: datetime + :ivar ended_on: Login migration end time + :vartype ended_on: datetime + :ivar message: Login migration progress message + :vartype message: str + :ivar exceptions_and_warnings: Login migration errors and warnings per + login + :vartype exceptions_and_warnings: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'login_name': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'login_name': {'key': 'loginName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlMITaskOutputLoginLevel, self).__init__(**kwargs) + self.login_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + self.result_type = 'LoginLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py new file mode 100644 index 000000000000..299889910900 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputMigrationLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar status: Current status of migration. Possible values include: + 'Default', 'Connecting', 'SourceAndTargetSelected', 'SelectLogins', + 'Configured', 'Running', 'Error', 'Stopped', 'Completed', + 'CompletedWithWarnings' + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar state: Current state of migration. Possible values include: 'None', + 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar agent_jobs: Selected agent jobs as a map from name to id + :vartype agent_jobs: dict[str, str] + :ivar logins: Selected logins as a map from name to id + :vartype logins: dict[str, str] + :ivar message: Migration progress message + :vartype message: str + :ivar server_role_results: Map of server role migration results. + :vartype server_role_results: dict[str, + ~azure.mgmt.datamigration.models.StartMigrationScenarioServerRoleResult] + :ivar orphaned_users: Map of users to database name of orphaned users. + :vartype orphaned_users: dict[str, str] + :ivar databases: Selected databases as a map from database name to + database id + :vartype databases: dict[str, str] + :ivar source_server_version: Source server version + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version + :vartype target_server_brand_version: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + 'state': {'readonly': True}, + 'agent_jobs': {'readonly': True}, + 'logins': {'readonly': True}, + 'message': {'readonly': True}, + 'server_role_results': {'readonly': True}, + 'orphaned_users': {'readonly': True}, + 'databases': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'agent_jobs': {'key': 'agentJobs', 'type': '{str}'}, + 'logins': {'key': 'logins', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'server_role_results': {'key': 'serverRoleResults', 'type': '{StartMigrationScenarioServerRoleResult}'}, + 'orphaned_users': {'key': 'orphanedUsers', 'type': '{str}'}, + 'databases': {'key': 'databases', 'type': '{str}'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlMITaskOutputMigrationLevel, self).__init__(**kwargs) + self.started_on = None + self.ended_on = None + self.status = None + self.state = None + self.agent_jobs = None + self.logins = None + self.message = None + self.server_role_results = None + self.orphaned_users = None + self.databases = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.exceptions_and_warnings = None + self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level_py3.py new file mode 100644 index 000000000000..b66621161ddb --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level_py3.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .migrate_sql_server_sql_mi_task_output_py3 import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputMigrationLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar status: Current status of migration. Possible values include: + 'Default', 'Connecting', 'SourceAndTargetSelected', 'SelectLogins', + 'Configured', 'Running', 'Error', 'Stopped', 'Completed', + 'CompletedWithWarnings' + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar state: Current state of migration. Possible values include: 'None', + 'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped' + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar agent_jobs: Selected agent jobs as a map from name to id + :vartype agent_jobs: dict[str, str] + :ivar logins: Selected logins as a map from name to id + :vartype logins: dict[str, str] + :ivar message: Migration progress message + :vartype message: str + :ivar server_role_results: Map of server role migration results. + :vartype server_role_results: dict[str, + ~azure.mgmt.datamigration.models.StartMigrationScenarioServerRoleResult] + :ivar orphaned_users: Map of users to database name of orphaned users. + :vartype orphaned_users: dict[str, str] + :ivar databases: Selected databases as a map from database name to + database id + :vartype databases: dict[str, str] + :ivar source_server_version: Source server version + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version + :vartype target_server_brand_version: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + 'state': {'readonly': True}, + 'agent_jobs': {'readonly': True}, + 'logins': {'readonly': True}, + 'message': {'readonly': True}, + 'server_role_results': {'readonly': True}, + 'orphaned_users': {'readonly': True}, + 'databases': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'agent_jobs': {'key': 'agentJobs', 'type': '{str}'}, + 'logins': {'key': 'logins', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'server_role_results': {'key': 'serverRoleResults', 'type': '{StartMigrationScenarioServerRoleResult}'}, + 'orphaned_users': {'key': 'orphanedUsers', 'type': '{str}'}, + 'databases': {'key': 'databases', 'type': '{str}'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlMITaskOutputMigrationLevel, self).__init__(**kwargs) + self.started_on = None + self.ended_on = None + self.status = None + self.state = None + self.agent_jobs = None + self.logins = None + self.message = None + self.server_role_results = None + self.orphaned_users = None + self.databases = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.exceptions_and_warnings = None + self.result_type = 'MigrationLevelOutput' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_py3.py new file mode 100644 index 000000000000..d56b33cdb678 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSqlServerSqlMITaskOutput(Model): + """Output for task that migrates SQL Server databases to Azure SQL Database + Managed Instance. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlMITaskOutputError, + MigrateSqlServerSqlMITaskOutputLoginLevel, + MigrateSqlServerSqlMITaskOutputAgentJobLevel, + MigrateSqlServerSqlMITaskOutputDatabaseLevel, + MigrateSqlServerSqlMITaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'ErrorOutput': 'MigrateSqlServerSqlMITaskOutputError', 'LoginLevelOutput': 'MigrateSqlServerSqlMITaskOutputLoginLevel', 'AgentJobLevelOutput': 'MigrateSqlServerSqlMITaskOutputAgentJobLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlMITaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlMITaskOutputMigrationLevel'} + } + + def __init__(self, **kwargs) -> None: + super(MigrateSqlServerSqlMITaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py new file mode 100644 index 000000000000..fe9ad5121056 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class MigrateSqlServerSqlMITaskProperties(ProjectTaskProperties): + """Properties for task that migrates SQL Server databases to Azure SQL + Database Managed Instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigrateSqlServerSqlMITaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMITaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlMITaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMITaskOutput]'}, + } + + def __init__(self, **kwargs): + super(MigrateSqlServerSqlMITaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'Migrate.SqlServer.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties_py3.py new file mode 100644 index 000000000000..11f5ab7be843 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class MigrateSqlServerSqlMITaskProperties(ProjectTaskProperties): + """Properties for task that migrates SQL Server databases to Azure SQL + Database Managed Instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigrateSqlServerSqlMITaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMITaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlMITaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMITaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(MigrateSqlServerSqlMITaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'Migrate.SqlServer.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input.py index 26401dac57f6..fd2a6ced8cd1 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input.py @@ -19,8 +19,8 @@ class MigrateSqlServerSqlServerDatabaseInput(Model): :type name: str :param restore_database_name: Name of the database at destination :type restore_database_name: str - :param backup_file_share: Backup file share information for this database. - :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_and_restore_folder: The backup and restore folder + :type backup_and_restore_folder: str :param database_files: The list of database files :type database_files: list[~azure.mgmt.datamigration.models.DatabaseFileInput] @@ -29,7 +29,7 @@ class MigrateSqlServerSqlServerDatabaseInput(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'restore_database_name': {'key': 'restoreDatabaseName', 'type': 'str'}, - 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_and_restore_folder': {'key': 'backupAndRestoreFolder', 'type': 'str'}, 'database_files': {'key': 'databaseFiles', 'type': '[DatabaseFileInput]'}, } @@ -37,5 +37,5 @@ def __init__(self, **kwargs): super(MigrateSqlServerSqlServerDatabaseInput, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.restore_database_name = kwargs.get('restore_database_name', None) - self.backup_file_share = kwargs.get('backup_file_share', None) + self.backup_and_restore_folder = kwargs.get('backup_and_restore_folder', None) self.database_files = kwargs.get('database_files', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input_py3.py index 5dd981f5169d..a4306e254350 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input_py3.py @@ -19,8 +19,8 @@ class MigrateSqlServerSqlServerDatabaseInput(Model): :type name: str :param restore_database_name: Name of the database at destination :type restore_database_name: str - :param backup_file_share: Backup file share information for this database. - :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_and_restore_folder: The backup and restore folder + :type backup_and_restore_folder: str :param database_files: The list of database files :type database_files: list[~azure.mgmt.datamigration.models.DatabaseFileInput] @@ -29,13 +29,13 @@ class MigrateSqlServerSqlServerDatabaseInput(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'restore_database_name': {'key': 'restoreDatabaseName', 'type': 'str'}, - 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_and_restore_folder': {'key': 'backupAndRestoreFolder', 'type': 'str'}, 'database_files': {'key': 'databaseFiles', 'type': '[DatabaseFileInput]'}, } - def __init__(self, *, name: str=None, restore_database_name: str=None, backup_file_share=None, database_files=None, **kwargs) -> None: + def __init__(self, *, name: str=None, restore_database_name: str=None, backup_and_restore_folder: str=None, database_files=None, **kwargs) -> None: super(MigrateSqlServerSqlServerDatabaseInput, self).__init__(**kwargs) self.name = name self.restore_database_name = restore_database_name - self.backup_file_share = backup_file_share + self.backup_and_restore_folder = backup_and_restore_folder self.database_files = database_files diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_input.py new file mode 100644 index 000000000000..33544df833c0 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_input.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSyncCompleteCommandInput(Model): + """Input for command that completes sync migration for a database. + + All required parameters must be populated in order to send to Azure. + + :param database_name: Required. Name of database + :type database_name: str + :param commit_time_stamp: Time stamp to complete + :type commit_time_stamp: datetime + """ + + _validation = { + 'database_name': {'required': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'commit_time_stamp': {'key': 'commitTimeStamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(MigrateSyncCompleteCommandInput, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.commit_time_stamp = kwargs.get('commit_time_stamp', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_input_py3.py new file mode 100644 index 000000000000..47c29374b37d --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_input_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSyncCompleteCommandInput(Model): + """Input for command that completes sync migration for a database. + + All required parameters must be populated in order to send to Azure. + + :param database_name: Required. Name of database + :type database_name: str + :param commit_time_stamp: Time stamp to complete + :type commit_time_stamp: datetime + """ + + _validation = { + 'database_name': {'required': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'commit_time_stamp': {'key': 'commitTimeStamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, database_name: str, commit_time_stamp=None, **kwargs) -> None: + super(MigrateSyncCompleteCommandInput, self).__init__(**kwargs) + self.database_name = database_name + self.commit_time_stamp = commit_time_stamp diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_output.py new file mode 100644 index 000000000000..a888777bfb87 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_output.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSyncCompleteCommandOutput(Model): + """Output for command that completes sync migration for a database. + + :param errors: List of errors that happened during the command execution + :type errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(MigrateSyncCompleteCommandOutput, self).__init__(**kwargs) + self.errors = kwargs.get('errors', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_output_py3.py new file mode 100644 index 000000000000..63dc03e1139d --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_output_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MigrateSyncCompleteCommandOutput(Model): + """Output for command that completes sync migration for a database. + + :param errors: List of errors that happened during the command execution + :type errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ReportableException]'}, + } + + def __init__(self, *, errors=None, **kwargs) -> None: + super(MigrateSyncCompleteCommandOutput, self).__init__(**kwargs) + self.errors = errors diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_properties.py new file mode 100644 index 000000000000..8f1ca8778a39 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_properties.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .command_properties import CommandProperties + + +class MigrateSyncCompleteCommandProperties(CommandProperties): + """Properties for the command that completes sync migration for a database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. + Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', + 'Failed' + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param command_type: Required. Constant filled by server. + :type command_type: str + :param input: Command input + :type input: + ~azure.mgmt.datamigration.models.MigrateSyncCompleteCommandInput + :ivar output: Command output. This is ignored if submitted. + :vartype output: + ~azure.mgmt.datamigration.models.MigrateSyncCompleteCommandOutput + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'command_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSyncCompleteCommandInput'}, + 'output': {'key': 'output', 'type': 'MigrateSyncCompleteCommandOutput'}, + } + + def __init__(self, **kwargs): + super(MigrateSyncCompleteCommandProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.command_type = 'Migrate.Sync.Complete.Database' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_properties_py3.py new file mode 100644 index 000000000000..5596e1f53f14 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sync_complete_command_properties_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .command_properties_py3 import CommandProperties + + +class MigrateSyncCompleteCommandProperties(CommandProperties): + """Properties for the command that completes sync migration for a database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. + Possible values include: 'Unknown', 'Accepted', 'Running', 'Succeeded', + 'Failed' + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param command_type: Required. Constant filled by server. + :type command_type: str + :param input: Command input + :type input: + ~azure.mgmt.datamigration.models.MigrateSyncCompleteCommandInput + :ivar output: Command output. This is ignored if submitted. + :vartype output: + ~azure.mgmt.datamigration.models.MigrateSyncCompleteCommandOutput + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'command_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSyncCompleteCommandInput'}, + 'output': {'key': 'output', 'type': 'MigrateSyncCompleteCommandOutput'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(MigrateSyncCompleteCommandProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.command_type = 'Migrate.Sync.Complete.Database' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result.py index 79e3f9d60bfa..7b059511f6b5 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result.py @@ -16,20 +16,12 @@ class MigrationReportResult(Model): """Migration validation report result, contains the url for downloading the generated report. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Migration validation result identifier - :vartype id: str - :ivar report_url: The url of the report. - :vartype report_url: str + :param id: Migration validation result identifier + :type id: str + :param report_url: The url of the report. + :type report_url: str """ - _validation = { - 'id': {'readonly': True}, - 'report_url': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'report_url': {'key': 'reportUrl', 'type': 'str'}, @@ -37,5 +29,5 @@ class MigrationReportResult(Model): def __init__(self, **kwargs): super(MigrationReportResult, self).__init__(**kwargs) - self.id = None - self.report_url = None + self.id = kwargs.get('id', None) + self.report_url = kwargs.get('report_url', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result_py3.py index f97c133366f8..27eaefba14b7 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_report_result_py3.py @@ -16,26 +16,18 @@ class MigrationReportResult(Model): """Migration validation report result, contains the url for downloading the generated report. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Migration validation result identifier - :vartype id: str - :ivar report_url: The url of the report. - :vartype report_url: str + :param id: Migration validation result identifier + :type id: str + :param report_url: The url of the report. + :type report_url: str """ - _validation = { - 'id': {'readonly': True}, - 'report_url': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'report_url': {'key': 'reportUrl', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, id: str=None, report_url: str=None, **kwargs) -> None: super(MigrationReportResult, self).__init__(**kwargs) - self.id = None - self.report_url = None + self.id = id + self.report_url = report_url diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_level_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_level_result.py index 30a9772f5e19..4c07312a2375 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_level_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_level_result.py @@ -44,7 +44,7 @@ class MigrationValidationDatabaseLevelResult(Model): ~azure.mgmt.datamigration.models.QueryAnalysisValidationResult :ivar status: Current status of validation at the database level. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', - 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped' + 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed' :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_level_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_level_result_py3.py index 21a67f608484..b16d85971767 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_level_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_level_result_py3.py @@ -44,7 +44,7 @@ class MigrationValidationDatabaseLevelResult(Model): ~azure.mgmt.datamigration.models.QueryAnalysisValidationResult :ivar status: Current status of validation at the database level. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', - 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped' + 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed' :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_summary_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_summary_result.py index 1cab17dd2dfb..f86917ac546e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_summary_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_summary_result.py @@ -32,7 +32,7 @@ class MigrationValidationDatabaseSummaryResult(Model): :vartype ended_on: datetime :ivar status: Current status of validation at the database level. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', - 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped' + 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed' :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_summary_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_summary_result_py3.py index 1b8c064cc391..8b537036ba04 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_summary_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_database_summary_result_py3.py @@ -32,7 +32,7 @@ class MigrationValidationDatabaseSummaryResult(Model): :vartype ended_on: datetime :ivar status: Current status of validation at the database level. Possible values include: 'Default', 'NotStarted', 'Initialized', 'InProgress', - 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped' + 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed' :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_result.py index 4bbe235c3602..534150a0db08 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_result.py @@ -28,7 +28,7 @@ class MigrationValidationResult(Model): :ivar status: Current status of validation at the migration level. Status from the database validation result status will be aggregated here. Possible values include: 'Default', 'NotStarted', 'Initialized', - 'InProgress', 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped' + 'InProgress', 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed' :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_result_py3.py index db2ae3525035..a13e92b257b4 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migration_validation_result_py3.py @@ -28,7 +28,7 @@ class MigrationValidationResult(Model): :ivar status: Current status of validation at the migration level. Status from the database validation result status will be aggregated here. Possible values include: 'Default', 'NotStarted', 'Initialized', - 'InProgress', 'Completed', 'CompletedWithIssues', 'Failed', 'Stopped' + 'InProgress', 'Completed', 'CompletedWithIssues', 'Stopped', 'Failed' :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus """ diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/my_sql_connection_info.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/my_sql_connection_info.py new file mode 100644 index 000000000000..62d5661258aa --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/my_sql_connection_info.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .connection_info import ConnectionInfo + + +class MySqlConnectionInfo(ConnectionInfo): + """Information for connecting to MySQL server. + + All required parameters must be populated in order to send to Azure. + + :param user_name: User name + :type user_name: str + :param password: Password credential. + :type password: str + :param type: Required. Constant filled by server. + :type type: str + :param server_name: Required. Name of the server + :type server_name: str + :param port: Required. Port for Server + :type port: int + """ + + _validation = { + 'type': {'required': True}, + 'server_name': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(MySqlConnectionInfo, self).__init__(**kwargs) + self.server_name = kwargs.get('server_name', None) + self.port = kwargs.get('port', None) + self.type = 'MySqlConnectionInfo' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/my_sql_connection_info_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/my_sql_connection_info_py3.py new file mode 100644 index 000000000000..2e8815c0dc6a --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/my_sql_connection_info_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .connection_info_py3 import ConnectionInfo + + +class MySqlConnectionInfo(ConnectionInfo): + """Information for connecting to MySQL server. + + All required parameters must be populated in order to send to Azure. + + :param user_name: User name + :type user_name: str + :param password: Password credential. + :type password: str + :param type: Required. Constant filled by server. + :type type: str + :param server_name: Required. Name of the server + :type server_name: str + :param port: Required. Port for Server + :type port: int + """ + + _validation = { + 'type': {'required': True}, + 'server_name': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, server_name: str, port: int, user_name: str=None, password: str=None, **kwargs) -> None: + super(MySqlConnectionInfo, self).__init__(user_name=user_name, password=password, **kwargs) + self.server_name = server_name + self.port = port + self.type = 'MySqlConnectionInfo' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response.py index e37e9b0ea619..221f7b81e05c 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response.py @@ -15,27 +15,18 @@ class NameAvailabilityResponse(Model): """Indicates whether a proposed resource name is available. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name_available: If true, the name is valid and available. If false, + :param name_available: If true, the name is valid and available. If false, 'reason' describes why not. - :vartype name_available: bool - :ivar reason: The reason why the name is not available, if nameAvailable + :type name_available: bool + :param reason: The reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid' - :vartype reason: str or + :type reason: str or ~azure.mgmt.datamigration.models.NameCheckFailureReason - :ivar message: The localized reason why the name is not available, if + :param message: The localized reason why the name is not available, if nameAvailable is false - :vartype message: str + :type message: str """ - _validation = { - 'name_available': {'readonly': True}, - 'reason': {'readonly': True}, - 'message': {'readonly': True}, - } - _attribute_map = { 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, 'reason': {'key': 'reason', 'type': 'str'}, @@ -44,6 +35,6 @@ class NameAvailabilityResponse(Model): def __init__(self, **kwargs): super(NameAvailabilityResponse, self).__init__(**kwargs) - self.name_available = None - self.reason = None - self.message = None + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response_py3.py index 7a3e3429ef1f..2ab59490aa55 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/name_availability_response_py3.py @@ -15,35 +15,26 @@ class NameAvailabilityResponse(Model): """Indicates whether a proposed resource name is available. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name_available: If true, the name is valid and available. If false, + :param name_available: If true, the name is valid and available. If false, 'reason' describes why not. - :vartype name_available: bool - :ivar reason: The reason why the name is not available, if nameAvailable + :type name_available: bool + :param reason: The reason why the name is not available, if nameAvailable is false. Possible values include: 'AlreadyExists', 'Invalid' - :vartype reason: str or + :type reason: str or ~azure.mgmt.datamigration.models.NameCheckFailureReason - :ivar message: The localized reason why the name is not available, if + :param message: The localized reason why the name is not available, if nameAvailable is false - :vartype message: str + :type message: str """ - _validation = { - 'name_available': {'readonly': True}, - 'reason': {'readonly': True}, - 'message': {'readonly': True}, - } - _attribute_map = { 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, 'reason': {'key': 'reason', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, name_available: bool=None, reason=None, message: str=None, **kwargs) -> None: super(NameAvailabilityResponse, self).__init__(**kwargs) - self.name_available = None - self.reason = None - self.message = None + self.name_available = name_available + self.reason = reason + self.message = message diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table.py new file mode 100644 index 000000000000..52a4ec40a9da --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NonSqlDataMigrationTable(Model): + """Defines metadata for table to be migrated. + + :param source_name: Source table name + :type source_name: str + """ + + _attribute_map = { + 'source_name': {'key': 'sourceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NonSqlDataMigrationTable, self).__init__(**kwargs) + self.source_name = kwargs.get('source_name', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table_py3.py new file mode 100644 index 000000000000..7f5d27b19e61 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NonSqlDataMigrationTable(Model): + """Defines metadata for table to be migrated. + + :param source_name: Source table name + :type source_name: str + """ + + _attribute_map = { + 'source_name': {'key': 'sourceName', 'type': 'str'}, + } + + def __init__(self, *, source_name: str=None, **kwargs) -> None: + super(NonSqlDataMigrationTable, self).__init__(**kwargs) + self.source_name = source_name diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table_result.py new file mode 100644 index 000000000000..978ce97b4c2e --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table_result.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NonSqlDataMigrationTableResult(Model): + """Object used to report the data migration results of a table. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar result_code: Result code of the data migration. Possible values + include: 'Initial', 'Completed', 'ObjectNotExistsInSource', + 'ObjectNotExistsInTarget', 'TargetObjectIsInaccessible', 'FatalError' + :vartype result_code: str or + ~azure.mgmt.datamigration.models.DataMigrationResultCode + :ivar source_name: Name of the source table + :vartype source_name: str + :ivar target_name: Name of the target table + :vartype target_name: str + :ivar source_row_count: Number of rows in the source table + :vartype source_row_count: long + :ivar target_row_count: Number of rows in the target table + :vartype target_row_count: long + :ivar elapsed_time_in_miliseconds: Time taken to migrate the data + :vartype elapsed_time_in_miliseconds: float + :ivar errors: List of errors, if any, during migration + :vartype errors: list[~azure.mgmt.datamigration.models.DataMigrationError] + """ + + _validation = { + 'result_code': {'readonly': True}, + 'source_name': {'readonly': True}, + 'target_name': {'readonly': True}, + 'source_row_count': {'readonly': True}, + 'target_row_count': {'readonly': True}, + 'elapsed_time_in_miliseconds': {'readonly': True}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'source_name': {'key': 'sourceName', 'type': 'str'}, + 'target_name': {'key': 'targetName', 'type': 'str'}, + 'source_row_count': {'key': 'sourceRowCount', 'type': 'long'}, + 'target_row_count': {'key': 'targetRowCount', 'type': 'long'}, + 'elapsed_time_in_miliseconds': {'key': 'elapsedTimeInMiliseconds', 'type': 'float'}, + 'errors': {'key': 'errors', 'type': '[DataMigrationError]'}, + } + + def __init__(self, **kwargs): + super(NonSqlDataMigrationTableResult, self).__init__(**kwargs) + self.result_code = None + self.source_name = None + self.target_name = None + self.source_row_count = None + self.target_row_count = None + self.elapsed_time_in_miliseconds = None + self.errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table_result_py3.py new file mode 100644 index 000000000000..5094fa96ee87 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_data_migration_table_result_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NonSqlDataMigrationTableResult(Model): + """Object used to report the data migration results of a table. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar result_code: Result code of the data migration. Possible values + include: 'Initial', 'Completed', 'ObjectNotExistsInSource', + 'ObjectNotExistsInTarget', 'TargetObjectIsInaccessible', 'FatalError' + :vartype result_code: str or + ~azure.mgmt.datamigration.models.DataMigrationResultCode + :ivar source_name: Name of the source table + :vartype source_name: str + :ivar target_name: Name of the target table + :vartype target_name: str + :ivar source_row_count: Number of rows in the source table + :vartype source_row_count: long + :ivar target_row_count: Number of rows in the target table + :vartype target_row_count: long + :ivar elapsed_time_in_miliseconds: Time taken to migrate the data + :vartype elapsed_time_in_miliseconds: float + :ivar errors: List of errors, if any, during migration + :vartype errors: list[~azure.mgmt.datamigration.models.DataMigrationError] + """ + + _validation = { + 'result_code': {'readonly': True}, + 'source_name': {'readonly': True}, + 'target_name': {'readonly': True}, + 'source_row_count': {'readonly': True}, + 'target_row_count': {'readonly': True}, + 'elapsed_time_in_miliseconds': {'readonly': True}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'source_name': {'key': 'sourceName', 'type': 'str'}, + 'target_name': {'key': 'targetName', 'type': 'str'}, + 'source_row_count': {'key': 'sourceRowCount', 'type': 'long'}, + 'target_row_count': {'key': 'targetRowCount', 'type': 'long'}, + 'elapsed_time_in_miliseconds': {'key': 'elapsedTimeInMiliseconds', 'type': 'float'}, + 'errors': {'key': 'errors', 'type': '[DataMigrationError]'}, + } + + def __init__(self, **kwargs) -> None: + super(NonSqlDataMigrationTableResult, self).__init__(**kwargs) + self.result_code = None + self.source_name = None + self.target_name = None + self.source_row_count = None + self.target_row_count = None + self.elapsed_time_in_miliseconds = None + self.errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_input.py new file mode 100644 index 000000000000..18779fc051d6 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_input.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NonSqlMigrationTaskInput(Model): + """Base class for non sql migration task input. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_database_name: Required. Target database name + :type target_database_name: str + :param project_name: Required. Name of the migration project + :type project_name: str + :param project_location: Required. A URL that points to the drop location + to access project artifacts + :type project_location: str + :param selected_tables: Required. Metadata of the tables selected for + migration + :type selected_tables: + list[~azure.mgmt.datamigration.models.NonSqlDataMigrationTable] + """ + + _validation = { + 'target_connection_info': {'required': True}, + 'target_database_name': {'required': True}, + 'project_name': {'required': True}, + 'project_location': {'required': True}, + 'selected_tables': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'project_location': {'key': 'projectLocation', 'type': 'str'}, + 'selected_tables': {'key': 'selectedTables', 'type': '[NonSqlDataMigrationTable]'}, + } + + def __init__(self, **kwargs): + super(NonSqlMigrationTaskInput, self).__init__(**kwargs) + self.target_connection_info = kwargs.get('target_connection_info', None) + self.target_database_name = kwargs.get('target_database_name', None) + self.project_name = kwargs.get('project_name', None) + self.project_location = kwargs.get('project_location', None) + self.selected_tables = kwargs.get('selected_tables', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_input_py3.py new file mode 100644 index 000000000000..71abb362f727 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_input_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NonSqlMigrationTaskInput(Model): + """Base class for non sql migration task input. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_database_name: Required. Target database name + :type target_database_name: str + :param project_name: Required. Name of the migration project + :type project_name: str + :param project_location: Required. A URL that points to the drop location + to access project artifacts + :type project_location: str + :param selected_tables: Required. Metadata of the tables selected for + migration + :type selected_tables: + list[~azure.mgmt.datamigration.models.NonSqlDataMigrationTable] + """ + + _validation = { + 'target_connection_info': {'required': True}, + 'target_database_name': {'required': True}, + 'project_name': {'required': True}, + 'project_location': {'required': True}, + 'selected_tables': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'project_location': {'key': 'projectLocation', 'type': 'str'}, + 'selected_tables': {'key': 'selectedTables', 'type': '[NonSqlDataMigrationTable]'}, + } + + def __init__(self, *, target_connection_info, target_database_name: str, project_name: str, project_location: str, selected_tables, **kwargs) -> None: + super(NonSqlMigrationTaskInput, self).__init__(**kwargs) + self.target_connection_info = target_connection_info + self.target_database_name = target_database_name + self.project_name = project_name + self.project_location = project_location + self.selected_tables = selected_tables diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_output.py new file mode 100644 index 000000000000..e87f50fa47ab --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_output.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NonSqlMigrationTaskOutput(Model): + """Base class for non sql migration task output. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar status: Current state of migration. Possible values include: + 'Default', 'Connecting', 'SourceAndTargetSelected', 'SelectLogins', + 'Configured', 'Running', 'Error', 'Stopped', 'Completed', + 'CompletedWithWarnings' + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar data_migration_table_results: Results of the migration. The key + contains the table name and the value the table result object + :vartype data_migration_table_results: dict[str, + ~azure.mgmt.datamigration.models.NonSqlDataMigrationTableResult] + :ivar progress_message: Message about the progress of the migration + :vartype progress_message: str + :ivar source_server_name: Name of source server + :vartype source_server_name: str + :ivar target_server_name: Name of target server + :vartype target_server_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + 'data_migration_table_results': {'readonly': True}, + 'progress_message': {'readonly': True}, + 'source_server_name': {'readonly': True}, + 'target_server_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'data_migration_table_results': {'key': 'dataMigrationTableResults', 'type': '{NonSqlDataMigrationTableResult}'}, + 'progress_message': {'key': 'progressMessage', 'type': 'str'}, + 'source_server_name': {'key': 'sourceServerName', 'type': 'str'}, + 'target_server_name': {'key': 'targetServerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NonSqlMigrationTaskOutput, self).__init__(**kwargs) + self.id = None + self.started_on = None + self.ended_on = None + self.status = None + self.data_migration_table_results = None + self.progress_message = None + self.source_server_name = None + self.target_server_name = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_output_py3.py new file mode 100644 index 000000000000..368bd6fddca2 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/non_sql_migration_task_output_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NonSqlMigrationTaskOutput(Model): + """Base class for non sql migration task output. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar status: Current state of migration. Possible values include: + 'Default', 'Connecting', 'SourceAndTargetSelected', 'SelectLogins', + 'Configured', 'Running', 'Error', 'Stopped', 'Completed', + 'CompletedWithWarnings' + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar data_migration_table_results: Results of the migration. The key + contains the table name and the value the table result object + :vartype data_migration_table_results: dict[str, + ~azure.mgmt.datamigration.models.NonSqlDataMigrationTableResult] + :ivar progress_message: Message about the progress of the migration + :vartype progress_message: str + :ivar source_server_name: Name of source server + :vartype source_server_name: str + :ivar target_server_name: Name of target server + :vartype target_server_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + 'data_migration_table_results': {'readonly': True}, + 'progress_message': {'readonly': True}, + 'source_server_name': {'readonly': True}, + 'target_server_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'data_migration_table_results': {'key': 'dataMigrationTableResults', 'type': '{NonSqlDataMigrationTableResult}'}, + 'progress_message': {'key': 'progressMessage', 'type': 'str'}, + 'source_server_name': {'key': 'sourceServerName', 'type': 'str'}, + 'target_server_name': {'key': 'targetServerName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(NonSqlMigrationTaskOutput, self).__init__(**kwargs) + self.id = None + self.started_on = None + self.ended_on = None + self.status = None + self.data_migration_table_results = None + self.progress_message = None + self.source_server_name = None + self.target_server_name = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error.py index 6a56c520f2bb..2a35761e0ea5 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error.py @@ -15,24 +15,15 @@ class ODataError(Model): """Error information in OData format. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The machine-readable description of the error, such as + :param code: The machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError' - :vartype code: str - :ivar message: The human-readable description of the error - :vartype message: str - :ivar details: Inner errors that caused this error - :vartype details: list[~azure.mgmt.datamigration.models.ODataError] + :type code: str + :param message: The human-readable description of the error + :type message: str + :param details: Inner errors that caused this error + :type details: list[~azure.mgmt.datamigration.models.ODataError] """ - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, - } - _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, @@ -41,6 +32,6 @@ class ODataError(Model): def __init__(self, **kwargs): super(ODataError, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error_py3.py index fa6ab9d577cf..c5cdfe626026 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/odata_error_py3.py @@ -15,32 +15,23 @@ class ODataError(Model): """Error information in OData format. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The machine-readable description of the error, such as + :param code: The machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError' - :vartype code: str - :ivar message: The human-readable description of the error - :vartype message: str - :ivar details: Inner errors that caused this error - :vartype details: list[~azure.mgmt.datamigration.models.ODataError] + :type code: str + :param message: The human-readable description of the error + :type message: str + :param details: Inner errors that caused this error + :type details: list[~azure.mgmt.datamigration.models.ODataError] """ - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, - } - _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'details': {'key': 'details', 'type': '[ODataError]'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: super(ODataError, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + self.code = code + self.message = message + self.details = details diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/postgre_sql_connection_info.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/postgre_sql_connection_info.py new file mode 100644 index 000000000000..0752415fddbf --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/postgre_sql_connection_info.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .connection_info import ConnectionInfo + + +class PostgreSqlConnectionInfo(ConnectionInfo): + """Information for connecting to PostgreSQL server. + + All required parameters must be populated in order to send to Azure. + + :param user_name: User name + :type user_name: str + :param password: Password credential. + :type password: str + :param type: Required. Constant filled by server. + :type type: str + :param server_name: Required. Name of the server + :type server_name: str + :param database_name: Name of the database + :type database_name: str + :param port: Required. Port for Server + :type port: int + """ + + _validation = { + 'type': {'required': True}, + 'server_name': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PostgreSqlConnectionInfo, self).__init__(**kwargs) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.port = kwargs.get('port', None) + self.type = 'PostgreSqlConnectionInfo' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/postgre_sql_connection_info_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/postgre_sql_connection_info_py3.py new file mode 100644 index 000000000000..d151e4a2a2aa --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/postgre_sql_connection_info_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .connection_info_py3 import ConnectionInfo + + +class PostgreSqlConnectionInfo(ConnectionInfo): + """Information for connecting to PostgreSQL server. + + All required parameters must be populated in order to send to Azure. + + :param user_name: User name + :type user_name: str + :param password: Password credential. + :type password: str + :param type: Required. Constant filled by server. + :type type: str + :param server_name: Required. Name of the server + :type server_name: str + :param database_name: Name of the database + :type database_name: str + :param port: Required. Port for Server + :type port: int + """ + + _validation = { + 'type': {'required': True}, + 'server_name': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, server_name: str, port: int, user_name: str=None, password: str=None, database_name: str=None, **kwargs) -> None: + super(PostgreSqlConnectionInfo, self).__init__(user_name=user_name, password=password, **kwargs) + self.server_name = server_name + self.database_name = database_name + self.port = port + self.type = 'PostgreSqlConnectionInfo' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project.py index ad75f31100eb..67d6c2c87466 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project.py @@ -31,11 +31,12 @@ class Project(TrackedResource): :param location: Required. Resource location. :type location: str :param source_platform: Required. Source platform for the project. - Possible values include: 'SQL', 'Unknown' + Possible values include: 'SQL', 'MySQL', 'PostgreSql', 'Unknown' :type source_platform: str or ~azure.mgmt.datamigration.models.ProjectSourcePlatform :param target_platform: Required. Target platform for the project. - Possible values include: 'SQLDB', 'Unknown' + Possible values include: 'SQLDB', 'SQLMI', 'AzureDbForMySql', + 'AzureDbForPostgreSql', 'Unknown' :type target_platform: str or ~azure.mgmt.datamigration.models.ProjectTargetPlatform :ivar creation_time: UTC Date and time when project was created diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_py3.py index 4c9ab4674b1d..e70f1fe8ff11 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_py3.py @@ -31,11 +31,12 @@ class Project(TrackedResource): :param location: Required. Resource location. :type location: str :param source_platform: Required. Source platform for the project. - Possible values include: 'SQL', 'Unknown' + Possible values include: 'SQL', 'MySQL', 'PostgreSql', 'Unknown' :type source_platform: str or ~azure.mgmt.datamigration.models.ProjectSourcePlatform :param target_platform: Required. Target platform for the project. - Possible values include: 'SQLDB', 'Unknown' + Possible values include: 'SQLDB', 'SQLMI', 'AzureDbForMySql', + 'AzureDbForPostgreSql', 'Unknown' :type target_platform: str or ~azure.mgmt.datamigration.models.ProjectTargetPlatform :ivar creation_time: UTC Date and time when project was created diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py index fc353d371570..bf9f28aafbfd 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties.py @@ -17,42 +17,60 @@ class ProjectTaskProperties(Model): by current client, this object is returned. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: MigrateSqlServerSqlDbTaskProperties, - GetUserTablesSqlTaskProperties, ConnectToTargetSqlDbTaskProperties, - ConnectToSourceSqlServerTaskProperties + sub-classes are: GetTdeCertificatesSqlTaskProperties, + ValidateMigrationInputSqlServerSqlMITaskProperties, + ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, + MigrateMySqlAzureDbForMySqlSyncTaskProperties, + MigrateSqlServerSqlDbSyncTaskProperties, + MigrateSqlServerSqlDbTaskProperties, MigrateSqlServerSqlMITaskProperties, + ConnectToTargetAzureDbForMySqlTaskProperties, + ConnectToTargetSqlMITaskProperties, GetUserTablesSqlSyncTaskProperties, + GetUserTablesSqlTaskProperties, ConnectToTargetSqlSqlDbSyncTaskProperties, + ConnectToTargetSqlDbTaskProperties, + ConnectToSourceSqlServerSyncTaskProperties, + ConnectToSourceSqlServerTaskProperties, ConnectToSourceMySqlTaskProperties, + MigrateSchemaSqlServerSqlDbTaskProperties Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param errors: Array of errors. This is ignored if submitted. - :type errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] :param task_type: Required. Constant filled by server. :type task_type: str """ _validation = { + 'errors': {'readonly': True}, 'state': {'readonly': True}, + 'commands': {'readonly': True}, 'task_type': {'required': True}, } _attribute_map = { 'errors': {'key': 'errors', 'type': '[ODataError]'}, 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'task_type': {'key': 'taskType', 'type': 'str'}, } _subtype_map = { - 'task_type': {'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties'} + 'task_type': {'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlSqlDbSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'MigrateSchemaSqlServerSqlDb': 'MigrateSchemaSqlServerSqlDbTaskProperties'} } def __init__(self, **kwargs): super(ProjectTaskProperties, self).__init__(**kwargs) - self.errors = kwargs.get('errors', None) + self.errors = None self.state = None + self.commands = None self.task_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties_py3.py index e9d89aa108ca..1bc6c86fec40 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/project_task_properties_py3.py @@ -17,42 +17,60 @@ class ProjectTaskProperties(Model): by current client, this object is returned. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: MigrateSqlServerSqlDbTaskProperties, - GetUserTablesSqlTaskProperties, ConnectToTargetSqlDbTaskProperties, - ConnectToSourceSqlServerTaskProperties + sub-classes are: GetTdeCertificatesSqlTaskProperties, + ValidateMigrationInputSqlServerSqlMITaskProperties, + ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, + MigrateMySqlAzureDbForMySqlSyncTaskProperties, + MigrateSqlServerSqlDbSyncTaskProperties, + MigrateSqlServerSqlDbTaskProperties, MigrateSqlServerSqlMITaskProperties, + ConnectToTargetAzureDbForMySqlTaskProperties, + ConnectToTargetSqlMITaskProperties, GetUserTablesSqlSyncTaskProperties, + GetUserTablesSqlTaskProperties, ConnectToTargetSqlSqlDbSyncTaskProperties, + ConnectToTargetSqlDbTaskProperties, + ConnectToSourceSqlServerSyncTaskProperties, + ConnectToSourceSqlServerTaskProperties, ConnectToSourceMySqlTaskProperties, + MigrateSchemaSqlServerSqlDbTaskProperties Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param errors: Array of errors. This is ignored if submitted. - :type errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] :ivar state: The state of the task. This is ignored if submitted. Possible values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', 'Failed', 'FailedInputValidation', 'Faulted' :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] :param task_type: Required. Constant filled by server. :type task_type: str """ _validation = { + 'errors': {'readonly': True}, 'state': {'readonly': True}, + 'commands': {'readonly': True}, 'task_type': {'required': True}, } _attribute_map = { 'errors': {'key': 'errors', 'type': '[ODataError]'}, 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, 'task_type': {'key': 'taskType', 'type': 'str'}, } _subtype_map = { - 'task_type': {'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties'} + 'task_type': {'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlSqlDbSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'MigrateSchemaSqlServerSqlDb': 'MigrateSchemaSqlServerSqlDbTaskProperties'} } - def __init__(self, *, errors=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(ProjectTaskProperties, self).__init__(**kwargs) - self.errors = errors + self.errors = None self.state = None + self.commands = None self.task_type = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result.py index d424fa61efbc..07b83e757fdc 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result.py @@ -15,23 +15,13 @@ class QueryAnalysisValidationResult(Model): """Results for query analysis comparison between the source and target. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar query_results: List of queries executed and it's execution results + :param query_results: List of queries executed and it's execution results in source and target - :vartype query_results: - ~azure.mgmt.datamigration.models.QueryExecutionResult - :ivar validation_errors: Errors that are part of the execution - :vartype validation_errors: - ~azure.mgmt.datamigration.models.ValidationError + :type query_results: ~azure.mgmt.datamigration.models.QueryExecutionResult + :param validation_errors: Errors that are part of the execution + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError """ - _validation = { - 'query_results': {'readonly': True}, - 'validation_errors': {'readonly': True}, - } - _attribute_map = { 'query_results': {'key': 'queryResults', 'type': 'QueryExecutionResult'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, @@ -39,5 +29,5 @@ class QueryAnalysisValidationResult(Model): def __init__(self, **kwargs): super(QueryAnalysisValidationResult, self).__init__(**kwargs) - self.query_results = None - self.validation_errors = None + self.query_results = kwargs.get('query_results', None) + self.validation_errors = kwargs.get('validation_errors', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result_py3.py index 6f259ed6f776..ba46bf53513b 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_analysis_validation_result_py3.py @@ -15,29 +15,19 @@ class QueryAnalysisValidationResult(Model): """Results for query analysis comparison between the source and target. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar query_results: List of queries executed and it's execution results + :param query_results: List of queries executed and it's execution results in source and target - :vartype query_results: - ~azure.mgmt.datamigration.models.QueryExecutionResult - :ivar validation_errors: Errors that are part of the execution - :vartype validation_errors: - ~azure.mgmt.datamigration.models.ValidationError + :type query_results: ~azure.mgmt.datamigration.models.QueryExecutionResult + :param validation_errors: Errors that are part of the execution + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError """ - _validation = { - 'query_results': {'readonly': True}, - 'validation_errors': {'readonly': True}, - } - _attribute_map = { 'query_results': {'key': 'queryResults', 'type': 'QueryExecutionResult'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, query_results=None, validation_errors=None, **kwargs) -> None: super(QueryAnalysisValidationResult, self).__init__(**kwargs) - self.query_results = None - self.validation_errors = None + self.query_results = query_results + self.validation_errors = validation_errors diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result.py index 726c9fc2a5c8..eb9d1f20ded4 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result.py @@ -15,28 +15,16 @@ class QueryExecutionResult(Model): """Describes query analysis results for execution in source and target. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar query_text: Query text retrieved from the source server - :vartype query_text: str - :ivar statements_in_batch: Total no. of statements in the batch - :vartype statements_in_batch: long - :ivar source_result: Query analysis result from the source - :vartype source_result: - ~azure.mgmt.datamigration.models.ExecutionStatistics - :ivar target_result: Query analysis result from the target - :vartype target_result: - ~azure.mgmt.datamigration.models.ExecutionStatistics + :param query_text: Query text retrieved from the source server + :type query_text: str + :param statements_in_batch: Total no. of statements in the batch + :type statements_in_batch: long + :param source_result: Query analysis result from the source + :type source_result: ~azure.mgmt.datamigration.models.ExecutionStatistics + :param target_result: Query analysis result from the target + :type target_result: ~azure.mgmt.datamigration.models.ExecutionStatistics """ - _validation = { - 'query_text': {'readonly': True}, - 'statements_in_batch': {'readonly': True}, - 'source_result': {'readonly': True}, - 'target_result': {'readonly': True}, - } - _attribute_map = { 'query_text': {'key': 'queryText', 'type': 'str'}, 'statements_in_batch': {'key': 'statementsInBatch', 'type': 'long'}, @@ -46,7 +34,7 @@ class QueryExecutionResult(Model): def __init__(self, **kwargs): super(QueryExecutionResult, self).__init__(**kwargs) - self.query_text = None - self.statements_in_batch = None - self.source_result = None - self.target_result = None + self.query_text = kwargs.get('query_text', None) + self.statements_in_batch = kwargs.get('statements_in_batch', None) + self.source_result = kwargs.get('source_result', None) + self.target_result = kwargs.get('target_result', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result_py3.py index 3e9bf67bf54c..129ddb35d62a 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/query_execution_result_py3.py @@ -15,28 +15,16 @@ class QueryExecutionResult(Model): """Describes query analysis results for execution in source and target. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar query_text: Query text retrieved from the source server - :vartype query_text: str - :ivar statements_in_batch: Total no. of statements in the batch - :vartype statements_in_batch: long - :ivar source_result: Query analysis result from the source - :vartype source_result: - ~azure.mgmt.datamigration.models.ExecutionStatistics - :ivar target_result: Query analysis result from the target - :vartype target_result: - ~azure.mgmt.datamigration.models.ExecutionStatistics + :param query_text: Query text retrieved from the source server + :type query_text: str + :param statements_in_batch: Total no. of statements in the batch + :type statements_in_batch: long + :param source_result: Query analysis result from the source + :type source_result: ~azure.mgmt.datamigration.models.ExecutionStatistics + :param target_result: Query analysis result from the target + :type target_result: ~azure.mgmt.datamigration.models.ExecutionStatistics """ - _validation = { - 'query_text': {'readonly': True}, - 'statements_in_batch': {'readonly': True}, - 'source_result': {'readonly': True}, - 'target_result': {'readonly': True}, - } - _attribute_map = { 'query_text': {'key': 'queryText', 'type': 'str'}, 'statements_in_batch': {'key': 'statementsInBatch', 'type': 'long'}, @@ -44,9 +32,9 @@ class QueryExecutionResult(Model): 'target_result': {'key': 'targetResult', 'type': 'ExecutionStatistics'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, query_text: str=None, statements_in_batch: int=None, source_result=None, target_result=None, **kwargs) -> None: super(QueryExecutionResult, self).__init__(**kwargs) - self.query_text = None - self.statements_in_batch = None - self.source_result = None - self.target_result = None + self.query_text = query_text + self.statements_in_batch = statements_in_batch + self.source_result = source_result + self.target_result = target_result diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception.py index f5d3b861de4c..2fd4ca85dc99 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception.py @@ -15,32 +15,24 @@ class ReportableException(Model): """Exception object for all custom exceptions. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar message: Error message - :vartype message: str - :ivar file_path: The path to the file where exception occurred - :vartype file_path: str - :ivar line_number: The line number where exception occurred - :vartype line_number: str - :ivar h_result: Coded numerical value that is assigned to a specific + :param message: Error message + :type message: str + :param actionable_message: Actionable steps for this exception + :type actionable_message: str + :param file_path: The path to the file where exception occurred + :type file_path: str + :param line_number: The line number where exception occurred + :type line_number: str + :param h_result: Coded numerical value that is assigned to a specific exception - :vartype h_result: int - :ivar stack_trace: Stack trace - :vartype stack_trace: str + :type h_result: int + :param stack_trace: Stack trace + :type stack_trace: str """ - _validation = { - 'message': {'readonly': True}, - 'file_path': {'readonly': True}, - 'line_number': {'readonly': True}, - 'h_result': {'readonly': True}, - 'stack_trace': {'readonly': True}, - } - _attribute_map = { 'message': {'key': 'message', 'type': 'str'}, + 'actionable_message': {'key': 'actionableMessage', 'type': 'str'}, 'file_path': {'key': 'filePath', 'type': 'str'}, 'line_number': {'key': 'lineNumber', 'type': 'str'}, 'h_result': {'key': 'hResult', 'type': 'int'}, @@ -49,8 +41,9 @@ class ReportableException(Model): def __init__(self, **kwargs): super(ReportableException, self).__init__(**kwargs) - self.message = None - self.file_path = None - self.line_number = None - self.h_result = None - self.stack_trace = None + self.message = kwargs.get('message', None) + self.actionable_message = kwargs.get('actionable_message', None) + self.file_path = kwargs.get('file_path', None) + self.line_number = kwargs.get('line_number', None) + self.h_result = kwargs.get('h_result', None) + self.stack_trace = kwargs.get('stack_trace', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception_py3.py index f42f505c63c4..3f97fbc03364 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/reportable_exception_py3.py @@ -15,42 +15,35 @@ class ReportableException(Model): """Exception object for all custom exceptions. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar message: Error message - :vartype message: str - :ivar file_path: The path to the file where exception occurred - :vartype file_path: str - :ivar line_number: The line number where exception occurred - :vartype line_number: str - :ivar h_result: Coded numerical value that is assigned to a specific + :param message: Error message + :type message: str + :param actionable_message: Actionable steps for this exception + :type actionable_message: str + :param file_path: The path to the file where exception occurred + :type file_path: str + :param line_number: The line number where exception occurred + :type line_number: str + :param h_result: Coded numerical value that is assigned to a specific exception - :vartype h_result: int - :ivar stack_trace: Stack trace - :vartype stack_trace: str + :type h_result: int + :param stack_trace: Stack trace + :type stack_trace: str """ - _validation = { - 'message': {'readonly': True}, - 'file_path': {'readonly': True}, - 'line_number': {'readonly': True}, - 'h_result': {'readonly': True}, - 'stack_trace': {'readonly': True}, - } - _attribute_map = { 'message': {'key': 'message', 'type': 'str'}, + 'actionable_message': {'key': 'actionableMessage', 'type': 'str'}, 'file_path': {'key': 'filePath', 'type': 'str'}, 'line_number': {'key': 'lineNumber', 'type': 'str'}, 'h_result': {'key': 'hResult', 'type': 'int'}, 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, message: str=None, actionable_message: str=None, file_path: str=None, line_number: str=None, h_result: int=None, stack_trace: str=None, **kwargs) -> None: super(ReportableException, self).__init__(**kwargs) - self.message = None - self.file_path = None - self.line_number = None - self.h_result = None - self.stack_trace = None + self.message = message + self.actionable_message = actionable_message + self.file_path = file_path + self.line_number = line_number + self.h_result = h_result + self.stack_trace = stack_trace diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result.py index fc3073048378..9cd9e4caf96e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result.py @@ -15,28 +15,19 @@ class SchemaComparisonValidationResult(Model): """Results for schema comparison between the source and target. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar schema_differences: List of schema differences between the source + :param schema_differences: List of schema differences between the source and target databases - :vartype schema_differences: + :type schema_differences: ~azure.mgmt.datamigration.models.SchemaComparisonValidationResultType - :ivar validation_errors: List of errors that happened while performing + :param validation_errors: List of errors that happened while performing schema compare validation - :vartype validation_errors: - ~azure.mgmt.datamigration.models.ValidationError + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError :param source_database_object_count: Count of source database objects :type source_database_object_count: dict[str, long] :param target_database_object_count: Count of target database objects :type target_database_object_count: dict[str, long] """ - _validation = { - 'schema_differences': {'readonly': True}, - 'validation_errors': {'readonly': True}, - } - _attribute_map = { 'schema_differences': {'key': 'schemaDifferences', 'type': 'SchemaComparisonValidationResultType'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, @@ -46,7 +37,7 @@ class SchemaComparisonValidationResult(Model): def __init__(self, **kwargs): super(SchemaComparisonValidationResult, self).__init__(**kwargs) - self.schema_differences = None - self.validation_errors = None + self.schema_differences = kwargs.get('schema_differences', None) + self.validation_errors = kwargs.get('validation_errors', None) self.source_database_object_count = kwargs.get('source_database_object_count', None) self.target_database_object_count = kwargs.get('target_database_object_count', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_py3.py index 1107b6b36d3f..80d4e9462b13 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_py3.py @@ -15,28 +15,19 @@ class SchemaComparisonValidationResult(Model): """Results for schema comparison between the source and target. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar schema_differences: List of schema differences between the source + :param schema_differences: List of schema differences between the source and target databases - :vartype schema_differences: + :type schema_differences: ~azure.mgmt.datamigration.models.SchemaComparisonValidationResultType - :ivar validation_errors: List of errors that happened while performing + :param validation_errors: List of errors that happened while performing schema compare validation - :vartype validation_errors: - ~azure.mgmt.datamigration.models.ValidationError + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError :param source_database_object_count: Count of source database objects :type source_database_object_count: dict[str, long] :param target_database_object_count: Count of target database objects :type target_database_object_count: dict[str, long] """ - _validation = { - 'schema_differences': {'readonly': True}, - 'validation_errors': {'readonly': True}, - } - _attribute_map = { 'schema_differences': {'key': 'schemaDifferences', 'type': 'SchemaComparisonValidationResultType'}, 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, @@ -44,9 +35,9 @@ class SchemaComparisonValidationResult(Model): 'target_database_object_count': {'key': 'targetDatabaseObjectCount', 'type': '{long}'}, } - def __init__(self, *, source_database_object_count=None, target_database_object_count=None, **kwargs) -> None: + def __init__(self, *, schema_differences=None, validation_errors=None, source_database_object_count=None, target_database_object_count=None, **kwargs) -> None: super(SchemaComparisonValidationResult, self).__init__(**kwargs) - self.schema_differences = None - self.validation_errors = None + self.schema_differences = schema_differences + self.validation_errors = validation_errors self.source_database_object_count = source_database_object_count self.target_database_object_count = target_database_object_count diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type.py index a8aa8c5abb7e..2a53cac4d764 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type.py @@ -15,27 +15,18 @@ class SchemaComparisonValidationResultType(Model): """Description about the errors happen while performing migration validation. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar object_name: Name of the object that has the difference - :vartype object_name: str - :ivar object_type: Type of the object that has the difference. e.g + :param object_name: Name of the object that has the difference + :type object_name: str + :param object_type: Type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function' - :vartype object_type: str or ~azure.mgmt.datamigration.models.ObjectType - :ivar update_action: Update action type with respect to target. Possible + :type object_type: str or ~azure.mgmt.datamigration.models.ObjectType + :param update_action: Update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget' - :vartype update_action: str or + :type update_action: str or ~azure.mgmt.datamigration.models.UpdateActionType """ - _validation = { - 'object_name': {'readonly': True}, - 'object_type': {'readonly': True}, - 'update_action': {'readonly': True}, - } - _attribute_map = { 'object_name': {'key': 'objectName', 'type': 'str'}, 'object_type': {'key': 'objectType', 'type': 'str'}, @@ -44,6 +35,6 @@ class SchemaComparisonValidationResultType(Model): def __init__(self, **kwargs): super(SchemaComparisonValidationResultType, self).__init__(**kwargs) - self.object_name = None - self.object_type = None - self.update_action = None + self.object_name = kwargs.get('object_name', None) + self.object_type = kwargs.get('object_type', None) + self.update_action = kwargs.get('update_action', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type_py3.py index 3967a083850a..e469340af8aa 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_comparison_validation_result_type_py3.py @@ -15,35 +15,26 @@ class SchemaComparisonValidationResultType(Model): """Description about the errors happen while performing migration validation. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar object_name: Name of the object that has the difference - :vartype object_name: str - :ivar object_type: Type of the object that has the difference. e.g + :param object_name: Name of the object that has the difference + :type object_name: str + :param object_type: Type of the object that has the difference. e.g (Table/View/StoredProcedure). Possible values include: 'StoredProcedures', 'Table', 'User', 'View', 'Function' - :vartype object_type: str or ~azure.mgmt.datamigration.models.ObjectType - :ivar update_action: Update action type with respect to target. Possible + :type object_type: str or ~azure.mgmt.datamigration.models.ObjectType + :param update_action: Update action type with respect to target. Possible values include: 'DeletedOnTarget', 'ChangedOnTarget', 'AddedOnTarget' - :vartype update_action: str or + :type update_action: str or ~azure.mgmt.datamigration.models.UpdateActionType """ - _validation = { - 'object_name': {'readonly': True}, - 'object_type': {'readonly': True}, - 'update_action': {'readonly': True}, - } - _attribute_map = { 'object_name': {'key': 'objectName', 'type': 'str'}, 'object_type': {'key': 'objectType', 'type': 'str'}, 'update_action': {'key': 'updateAction', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, object_name: str=None, object_type=None, update_action=None, **kwargs) -> None: super(SchemaComparisonValidationResultType, self).__init__(**kwargs) - self.object_name = None - self.object_type = None - self.update_action = None + self.object_name = object_name + self.object_type = object_type + self.update_action = update_action diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_migration_setting.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_migration_setting.py new file mode 100644 index 000000000000..f5aac00590d1 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_migration_setting.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SchemaMigrationSetting(Model): + """Settings for migrating schema from source to target. + + :param schema_option: Option on how to migrate the schema. Possible values + include: 'None', 'ExtractFromSource', 'UseStorageFile' + :type schema_option: str or + ~azure.mgmt.datamigration.models.SchemaMigrationOption + :param file_id: Resource Identifier of a file resource containing the + uploaded schema file + :type file_id: str + """ + + _attribute_map = { + 'schema_option': {'key': 'schemaOption', 'type': 'str'}, + 'file_id': {'key': 'fileId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SchemaMigrationSetting, self).__init__(**kwargs) + self.schema_option = kwargs.get('schema_option', None) + self.file_id = kwargs.get('file_id', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_migration_setting_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_migration_setting_py3.py new file mode 100644 index 000000000000..6b3ef327bd3a --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/schema_migration_setting_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SchemaMigrationSetting(Model): + """Settings for migrating schema from source to target. + + :param schema_option: Option on how to migrate the schema. Possible values + include: 'None', 'ExtractFromSource', 'UseStorageFile' + :type schema_option: str or + ~azure.mgmt.datamigration.models.SchemaMigrationOption + :param file_id: Resource Identifier of a file resource containing the + uploaded schema file + :type file_id: str + """ + + _attribute_map = { + 'schema_option': {'key': 'schemaOption', 'type': 'str'}, + 'file_id': {'key': 'fileId', 'type': 'str'}, + } + + def __init__(self, *, schema_option=None, file_id: str=None, **kwargs) -> None: + super(SchemaMigrationSetting, self).__init__(**kwargs) + self.schema_option = schema_option + self.file_id = file_id diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/selected_certificate_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/selected_certificate_input.py new file mode 100644 index 000000000000..46ffa7bfe55a --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/selected_certificate_input.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SelectedCertificateInput(Model): + """Info for ertificate to be exported for TDE enabled databases. + + All required parameters must be populated in order to send to Azure. + + :param certificate_name: Required. Name of certificate to be exported. + :type certificate_name: str + :param password: Required. Password to use for encrypting the exported + certificate. + :type password: str + """ + + _validation = { + 'certificate_name': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'certificate_name': {'key': 'certificateName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SelectedCertificateInput, self).__init__(**kwargs) + self.certificate_name = kwargs.get('certificate_name', None) + self.password = kwargs.get('password', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/selected_certificate_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/selected_certificate_input_py3.py new file mode 100644 index 000000000000..e07e18889a10 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/selected_certificate_input_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SelectedCertificateInput(Model): + """Info for ertificate to be exported for TDE enabled databases. + + All required parameters must be populated in order to send to Azure. + + :param certificate_name: Required. Name of certificate to be exported. + :type certificate_name: str + :param password: Required. Password to use for encrypting the exported + certificate. + :type password: str + """ + + _validation = { + 'certificate_name': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'certificate_name': {'key': 'certificateName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, certificate_name: str, password: str, **kwargs) -> None: + super(SelectedCertificateInput, self).__init__(**kwargs) + self.certificate_name = certificate_name + self.password = password diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/server_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/server_properties.py new file mode 100644 index 000000000000..8507c9404cee --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/server_properties.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServerProperties(Model): + """Server properties for Oracle, MySQL type source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar server_platform: Name of the server platform + :vartype server_platform: str + :ivar server_name: Name of the server + :vartype server_name: str + :ivar server_version: Version of the database server + :vartype server_version: str + :ivar server_edition: Edition of the database server + :vartype server_edition: str + :ivar server_operating_system_version: Version of the operating system + :vartype server_operating_system_version: str + :ivar server_database_count: Number of databases in the server + :vartype server_database_count: int + """ + + _validation = { + 'server_platform': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_version': {'readonly': True}, + 'server_edition': {'readonly': True}, + 'server_operating_system_version': {'readonly': True}, + 'server_database_count': {'readonly': True}, + } + + _attribute_map = { + 'server_platform': {'key': 'serverPlatform', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'server_edition': {'key': 'serverEdition', 'type': 'str'}, + 'server_operating_system_version': {'key': 'serverOperatingSystemVersion', 'type': 'str'}, + 'server_database_count': {'key': 'serverDatabaseCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ServerProperties, self).__init__(**kwargs) + self.server_platform = None + self.server_name = None + self.server_version = None + self.server_edition = None + self.server_operating_system_version = None + self.server_database_count = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/server_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/server_properties_py3.py new file mode 100644 index 000000000000..fbee0abcd1ab --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/server_properties_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServerProperties(Model): + """Server properties for Oracle, MySQL type source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar server_platform: Name of the server platform + :vartype server_platform: str + :ivar server_name: Name of the server + :vartype server_name: str + :ivar server_version: Version of the database server + :vartype server_version: str + :ivar server_edition: Edition of the database server + :vartype server_edition: str + :ivar server_operating_system_version: Version of the operating system + :vartype server_operating_system_version: str + :ivar server_database_count: Number of databases in the server + :vartype server_database_count: int + """ + + _validation = { + 'server_platform': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_version': {'readonly': True}, + 'server_edition': {'readonly': True}, + 'server_operating_system_version': {'readonly': True}, + 'server_database_count': {'readonly': True}, + } + + _attribute_map = { + 'server_platform': {'key': 'serverPlatform', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'server_edition': {'key': 'serverEdition', 'type': 'str'}, + 'server_operating_system_version': {'key': 'serverOperatingSystemVersion', 'type': 'str'}, + 'server_database_count': {'key': 'serverDatabaseCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerProperties, self).__init__(**kwargs) + self.server_platform = None + self.server_name = None + self.server_version = None + self.server_edition = None + self.server_operating_system_version = None + self.server_database_count = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_sku.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_sku.py index 3c0035f93d89..4858e045788b 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_sku.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_sku.py @@ -17,8 +17,8 @@ class ServiceSku(Model): :param name: The unique name of the SKU, such as 'P3' :type name: str - :param tier: The tier of the SKU, such as 'Free', 'Basic', 'Standard', or - 'Premium' + :param tier: The tier of the SKU, such as 'Basic', 'General Purpose', or + 'Business Critical' :type tier: str :param family: The SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_sku_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_sku_py3.py index 72e796ed24ac..871514d39280 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_sku_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/service_sku_py3.py @@ -17,8 +17,8 @@ class ServiceSku(Model): :param name: The unique name of the SKU, such as 'P3' :type name: str - :param tier: The tier of the SKU, such as 'Free', 'Basic', 'Standard', or - 'Premium' + :param tier: The tier of the SKU, such as 'Basic', 'General Purpose', or + 'Business Critical' :type tier: str :param family: The SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info.py index 546a8bfb2cc7..49bde37ed708 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info.py @@ -39,6 +39,9 @@ class SqlConnectionInfo(ConnectionInfo): :param trust_server_certificate: Whether to trust the server certificate. Default value: False . :type trust_server_certificate: bool + :param platform: Server platform type for connection. Possible values + include: 'SqlOnPrem' + :type platform: str or ~azure.mgmt.datamigration.models.SqlSourcePlatform """ _validation = { @@ -55,6 +58,7 @@ class SqlConnectionInfo(ConnectionInfo): 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, 'additional_settings': {'key': 'additionalSettings', 'type': 'str'}, 'trust_server_certificate': {'key': 'trustServerCertificate', 'type': 'bool'}, + 'platform': {'key': 'platform', 'type': 'str'}, } def __init__(self, **kwargs): @@ -64,4 +68,5 @@ def __init__(self, **kwargs): self.encrypt_connection = kwargs.get('encrypt_connection', True) self.additional_settings = kwargs.get('additional_settings', None) self.trust_server_certificate = kwargs.get('trust_server_certificate', False) + self.platform = kwargs.get('platform', None) self.type = 'SqlConnectionInfo' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info_py3.py index 1227cde800a1..51d3a219a987 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sql_connection_info_py3.py @@ -39,6 +39,9 @@ class SqlConnectionInfo(ConnectionInfo): :param trust_server_certificate: Whether to trust the server certificate. Default value: False . :type trust_server_certificate: bool + :param platform: Server platform type for connection. Possible values + include: 'SqlOnPrem' + :type platform: str or ~azure.mgmt.datamigration.models.SqlSourcePlatform """ _validation = { @@ -55,13 +58,15 @@ class SqlConnectionInfo(ConnectionInfo): 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, 'additional_settings': {'key': 'additionalSettings', 'type': 'str'}, 'trust_server_certificate': {'key': 'trustServerCertificate', 'type': 'bool'}, + 'platform': {'key': 'platform', 'type': 'str'}, } - def __init__(self, *, data_source: str, user_name: str=None, password: str=None, authentication=None, encrypt_connection: bool=True, additional_settings: str=None, trust_server_certificate: bool=False, **kwargs) -> None: + def __init__(self, *, data_source: str, user_name: str=None, password: str=None, authentication=None, encrypt_connection: bool=True, additional_settings: str=None, trust_server_certificate: bool=False, platform=None, **kwargs) -> None: super(SqlConnectionInfo, self).__init__(user_name=user_name, password=password, **kwargs) self.data_source = data_source self.authentication = authentication self.encrypt_connection = encrypt_connection self.additional_settings = additional_settings self.trust_server_certificate = trust_server_certificate + self.platform = platform self.type = 'SqlConnectionInfo' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result.py index a14f6e618b1e..9af6df887bf7 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result.py @@ -13,7 +13,7 @@ class StartMigrationScenarioServerRoleResult(Model): - """Migration results from a server role. + """Server role migration result. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result_py3.py index e351b2d780cb..4ba0d708f5b8 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/start_migration_scenario_server_role_result_py3.py @@ -13,7 +13,7 @@ class StartMigrationScenarioServerRoleResult(Model): - """Migration results from a server role. + """Server role migration result. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sync_migration_database_error_event.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sync_migration_database_error_event.py new file mode 100644 index 000000000000..872df745784c --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sync_migration_database_error_event.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SyncMigrationDatabaseErrorEvent(Model): + """Database migration errors for online migration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp_string: String value of timestamp. + :vartype timestamp_string: str + :ivar event_type_string: Event type. + :vartype event_type_string: str + :ivar event_text: Event text. + :vartype event_text: str + """ + + _validation = { + 'timestamp_string': {'readonly': True}, + 'event_type_string': {'readonly': True}, + 'event_text': {'readonly': True}, + } + + _attribute_map = { + 'timestamp_string': {'key': 'timestampString', 'type': 'str'}, + 'event_type_string': {'key': 'eventTypeString', 'type': 'str'}, + 'event_text': {'key': 'eventText', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SyncMigrationDatabaseErrorEvent, self).__init__(**kwargs) + self.timestamp_string = None + self.event_type_string = None + self.event_text = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sync_migration_database_error_event_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sync_migration_database_error_event_py3.py new file mode 100644 index 000000000000..a75f3006aebe --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/sync_migration_database_error_event_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SyncMigrationDatabaseErrorEvent(Model): + """Database migration errors for online migration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp_string: String value of timestamp. + :vartype timestamp_string: str + :ivar event_type_string: Event type. + :vartype event_type_string: str + :ivar event_text: Event text. + :vartype event_text: str + """ + + _validation = { + 'timestamp_string': {'readonly': True}, + 'event_type_string': {'readonly': True}, + 'event_text': {'readonly': True}, + } + + _attribute_map = { + 'timestamp_string': {'key': 'timestampString', 'type': 'str'}, + 'event_type_string': {'key': 'eventTypeString', 'type': 'str'}, + 'event_text': {'key': 'eventText', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SyncMigrationDatabaseErrorEvent, self).__init__(**kwargs) + self.timestamp_string = None + self.event_type_string = None + self.event_text = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_db_sync_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_db_sync_task_properties.py new file mode 100644 index 000000000000..7ffaa63a4439 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_db_sync_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class ValidateMigrationInputSqlServerSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to Azure SQL DB + sync migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ValidateSyncMigrationInputSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateSyncMigrationInputSqlServerTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ValidateSyncMigrationInputSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateSyncMigrationInputSqlServerTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'ValidateMigrationInput.SqlServer.SqlDb.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_db_sync_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_db_sync_task_properties_py3.py new file mode 100644 index 000000000000..e11f201feed2 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_db_sync_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class ValidateMigrationInputSqlServerSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to Azure SQL DB + sync migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ValidateSyncMigrationInputSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateSyncMigrationInputSqlServerTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ValidateSyncMigrationInputSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateSyncMigrationInputSqlServerTaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'ValidateMigrationInput.SqlServer.SqlDb.Sync' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py new file mode 100644 index 000000000000..574508b89d5f --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateMigrationInputSqlServerSqlMITaskInput(Model): + """Input for task that validates migration input for SQL to Azure SQL Managed + Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMIDatabaseInput] + :param selected_logins: Logins to migrate + :type selected_logins: list[str] + :param backup_file_share: Backup file share information for all selected + databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_blob_share: Required. SAS URI of Azure Storage Account + Container to be used for storing backup files. + :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare + :param backup_mode: Backup Mode to specify whether to use existing backup + or create new backup. Possible values include: 'CreateBackup', + 'ExistingBackup' + :type backup_mode: str or ~azure.mgmt.datamigration.models.BackupMode + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + 'backup_blob_share': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMIDatabaseInput]'}, + 'selected_logins': {'key': 'selectedLogins', 'type': '[str]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, + 'backup_mode': {'key': 'backupMode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ValidateMigrationInputSqlServerSqlMITaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs.get('source_connection_info', None) + self.target_connection_info = kwargs.get('target_connection_info', None) + self.selected_databases = kwargs.get('selected_databases', None) + self.selected_logins = kwargs.get('selected_logins', None) + self.backup_file_share = kwargs.get('backup_file_share', None) + self.backup_blob_share = kwargs.get('backup_blob_share', None) + self.backup_mode = kwargs.get('backup_mode', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input_py3.py new file mode 100644 index 000000000000..6c1f309299ca --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateMigrationInputSqlServerSqlMITaskInput(Model): + """Input for task that validates migration input for SQL to Azure SQL Managed + Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMIDatabaseInput] + :param selected_logins: Logins to migrate + :type selected_logins: list[str] + :param backup_file_share: Backup file share information for all selected + databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_blob_share: Required. SAS URI of Azure Storage Account + Container to be used for storing backup files. + :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare + :param backup_mode: Backup Mode to specify whether to use existing backup + or create new backup. Possible values include: 'CreateBackup', + 'ExistingBackup' + :type backup_mode: str or ~azure.mgmt.datamigration.models.BackupMode + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + 'backup_blob_share': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMIDatabaseInput]'}, + 'selected_logins': {'key': 'selectedLogins', 'type': '[str]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, + 'backup_mode': {'key': 'backupMode', 'type': 'str'}, + } + + def __init__(self, *, source_connection_info, target_connection_info, selected_databases, backup_blob_share, selected_logins=None, backup_file_share=None, backup_mode=None, **kwargs) -> None: + super(ValidateMigrationInputSqlServerSqlMITaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.selected_databases = selected_databases + self.selected_logins = selected_logins + self.backup_file_share = backup_file_share + self.backup_blob_share = backup_blob_share + self.backup_mode = backup_mode diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py new file mode 100644 index 000000000000..41b0019618e7 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateMigrationInputSqlServerSqlMITaskOutput(Model): + """Output for task that validates migration input for SQL to Azure SQL Managed + Instance migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar name: Name of database + :vartype name: str + :ivar restore_database_name_errors: Errors associated with the + RestoreDatabaseName + :vartype restore_database_name_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_folder_errors: Errors associated with the BackupFolder path + :vartype backup_folder_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_share_credentials_errors: Errors associated with backup share + user name and password credentials + :vartype backup_share_credentials_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_storage_account_errors: Errors associated with the storage + account provided. + :vartype backup_storage_account_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar existing_backup_errors: Errors associated with existing backup + files. + :vartype existing_backup_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :param database_backup_info: Information about backup files when existing + backup mode is used. + :type database_backup_info: + ~azure.mgmt.datamigration.models.DatabaseBackupInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'restore_database_name_errors': {'readonly': True}, + 'backup_folder_errors': {'readonly': True}, + 'backup_share_credentials_errors': {'readonly': True}, + 'backup_storage_account_errors': {'readonly': True}, + 'existing_backup_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name_errors': {'key': 'restoreDatabaseNameErrors', 'type': '[ReportableException]'}, + 'backup_folder_errors': {'key': 'backupFolderErrors', 'type': '[ReportableException]'}, + 'backup_share_credentials_errors': {'key': 'backupShareCredentialsErrors', 'type': '[ReportableException]'}, + 'backup_storage_account_errors': {'key': 'backupStorageAccountErrors', 'type': '[ReportableException]'}, + 'existing_backup_errors': {'key': 'existingBackupErrors', 'type': '[ReportableException]'}, + 'database_backup_info': {'key': 'databaseBackupInfo', 'type': 'DatabaseBackupInfo'}, + } + + def __init__(self, **kwargs): + super(ValidateMigrationInputSqlServerSqlMITaskOutput, self).__init__(**kwargs) + self.id = None + self.name = None + self.restore_database_name_errors = None + self.backup_folder_errors = None + self.backup_share_credentials_errors = None + self.backup_storage_account_errors = None + self.existing_backup_errors = None + self.database_backup_info = kwargs.get('database_backup_info', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output_py3.py new file mode 100644 index 000000000000..f5004632764c --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateMigrationInputSqlServerSqlMITaskOutput(Model): + """Output for task that validates migration input for SQL to Azure SQL Managed + Instance migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar name: Name of database + :vartype name: str + :ivar restore_database_name_errors: Errors associated with the + RestoreDatabaseName + :vartype restore_database_name_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_folder_errors: Errors associated with the BackupFolder path + :vartype backup_folder_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_share_credentials_errors: Errors associated with backup share + user name and password credentials + :vartype backup_share_credentials_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_storage_account_errors: Errors associated with the storage + account provided. + :vartype backup_storage_account_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar existing_backup_errors: Errors associated with existing backup + files. + :vartype existing_backup_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :param database_backup_info: Information about backup files when existing + backup mode is used. + :type database_backup_info: + ~azure.mgmt.datamigration.models.DatabaseBackupInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'restore_database_name_errors': {'readonly': True}, + 'backup_folder_errors': {'readonly': True}, + 'backup_share_credentials_errors': {'readonly': True}, + 'backup_storage_account_errors': {'readonly': True}, + 'existing_backup_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name_errors': {'key': 'restoreDatabaseNameErrors', 'type': '[ReportableException]'}, + 'backup_folder_errors': {'key': 'backupFolderErrors', 'type': '[ReportableException]'}, + 'backup_share_credentials_errors': {'key': 'backupShareCredentialsErrors', 'type': '[ReportableException]'}, + 'backup_storage_account_errors': {'key': 'backupStorageAccountErrors', 'type': '[ReportableException]'}, + 'existing_backup_errors': {'key': 'existingBackupErrors', 'type': '[ReportableException]'}, + 'database_backup_info': {'key': 'databaseBackupInfo', 'type': 'DatabaseBackupInfo'}, + } + + def __init__(self, *, database_backup_info=None, **kwargs) -> None: + super(ValidateMigrationInputSqlServerSqlMITaskOutput, self).__init__(**kwargs) + self.id = None + self.name = None + self.restore_database_name_errors = None + self.backup_folder_errors = None + self.backup_share_credentials_errors = None + self.backup_storage_account_errors = None + self.existing_backup_errors = None + self.database_backup_info = database_backup_info diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py new file mode 100644 index 000000000000..30670fb2b62b --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties import ProjectTaskProperties + + +class ValidateMigrationInputSqlServerSqlMITaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to Azure SQL + Database Managed Instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMITaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMITaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ValidateMigrationInputSqlServerSqlMITaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMITaskOutput]'}, + } + + def __init__(self, **kwargs): + super(ValidateMigrationInputSqlServerSqlMITaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'ValidateMigrationInput.SqlServer.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties_py3.py new file mode 100644 index 000000000000..7150ee39c187 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .project_task_properties_py3 import ProjectTaskProperties + + +class ValidateMigrationInputSqlServerSqlMITaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to Azure SQL + Database Managed Instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMITaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMITaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ValidateMigrationInputSqlServerSqlMITaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMITaskOutput]'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(ValidateMigrationInputSqlServerSqlMITaskProperties, self).__init__(**kwargs) + self.input = input + self.output = None + self.task_type = 'ValidateMigrationInput.SqlServer.AzureSqlDbMI' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_input.py new file mode 100644 index 000000000000..e3ef6578bb7f --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_input.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateSyncMigrationInputSqlServerTaskInput(Model): + """Input for task that validates migration input for SQL sync migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + source SQL server + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncDatabaseInput] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlDbSyncDatabaseInput]'}, + } + + def __init__(self, **kwargs): + super(ValidateSyncMigrationInputSqlServerTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs.get('source_connection_info', None) + self.target_connection_info = kwargs.get('target_connection_info', None) + self.selected_databases = kwargs.get('selected_databases', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_input_py3.py new file mode 100644 index 000000000000..03eb1295e946 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_input_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateSyncMigrationInputSqlServerTaskInput(Model): + """Input for task that validates migration input for SQL sync migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to + source SQL server + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to + target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncDatabaseInput] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlDbSyncDatabaseInput]'}, + } + + def __init__(self, *, source_connection_info, target_connection_info, selected_databases, **kwargs) -> None: + super(ValidateSyncMigrationInputSqlServerTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.selected_databases = selected_databases diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_output.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_output.py new file mode 100644 index 000000000000..acf72153e195 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_output.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateSyncMigrationInputSqlServerTaskOutput(Model): + """Output for task that validates migration input for SQL sync migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Database identifier + :vartype id: str + :ivar name: Name of database + :vartype name: str + :ivar validation_errors: Errors associated with a selected database object + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(ValidateSyncMigrationInputSqlServerTaskOutput, self).__init__(**kwargs) + self.id = None + self.name = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_output_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_output_py3.py new file mode 100644 index 000000000000..8b7181f5333a --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validate_sync_migration_input_sql_server_task_output_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateSyncMigrationInputSqlServerTaskOutput(Model): + """Output for task that validates migration input for SQL sync migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Database identifier + :vartype id: str + :ivar name: Name of database + :vartype name: str + :ivar validation_errors: Errors associated with a selected database object + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(ValidateSyncMigrationInputSqlServerTaskOutput, self).__init__(**kwargs) + self.id = None + self.name = None + self.validation_errors = None diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error.py index 7879e2effa78..2dcb6d4fdf0c 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error.py @@ -15,21 +15,13 @@ class ValidationError(Model): """Description about the errors happen while performing migration validation. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar text: Error Text - :vartype text: str - :ivar severity: Severity of the error. Possible values include: 'Message', - 'Warning', 'Error' - :vartype severity: str or ~azure.mgmt.datamigration.models.Severity + :param text: Error Text + :type text: str + :param severity: Severity of the error. Possible values include: + 'Message', 'Warning', 'Error' + :type severity: str or ~azure.mgmt.datamigration.models.Severity """ - _validation = { - 'text': {'readonly': True}, - 'severity': {'readonly': True}, - } - _attribute_map = { 'text': {'key': 'text', 'type': 'str'}, 'severity': {'key': 'severity', 'type': 'str'}, @@ -37,5 +29,5 @@ class ValidationError(Model): def __init__(self, **kwargs): super(ValidationError, self).__init__(**kwargs) - self.text = None - self.severity = None + self.text = kwargs.get('text', None) + self.severity = kwargs.get('severity', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error_py3.py index cb8f150455cf..6e7ce050ff4e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/validation_error_py3.py @@ -15,27 +15,19 @@ class ValidationError(Model): """Description about the errors happen while performing migration validation. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar text: Error Text - :vartype text: str - :ivar severity: Severity of the error. Possible values include: 'Message', - 'Warning', 'Error' - :vartype severity: str or ~azure.mgmt.datamigration.models.Severity + :param text: Error Text + :type text: str + :param severity: Severity of the error. Possible values include: + 'Message', 'Warning', 'Error' + :type severity: str or ~azure.mgmt.datamigration.models.Severity """ - _validation = { - 'text': {'readonly': True}, - 'severity': {'readonly': True}, - } - _attribute_map = { 'text': {'key': 'text', 'type': 'str'}, 'severity': {'key': 'severity', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, text: str=None, severity=None, **kwargs) -> None: super(ValidationError, self).__init__(**kwargs) - self.text = None - self.severity = None + self.text = text + self.severity = severity diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics.py index 9db8f0f3334c..2e1b9a76d7fc 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics.py @@ -15,23 +15,15 @@ class WaitStatistics(Model): """Wait statistics gathered during query batch execution. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar wait_type: Type of the Wait - :vartype wait_type: str - :ivar wait_time_ms: Total wait time in millisecond(s). Default value: 0 . - :vartype wait_time_ms: float - :ivar wait_count: Total no. of waits - :vartype wait_count: long + :param wait_type: Type of the Wait + :type wait_type: str + :param wait_time_ms: Total wait time in millisecond(s) . Default value: 0 + . + :type wait_time_ms: float + :param wait_count: Total no. of waits + :type wait_count: long """ - _validation = { - 'wait_type': {'readonly': True}, - 'wait_time_ms': {'readonly': True}, - 'wait_count': {'readonly': True}, - } - _attribute_map = { 'wait_type': {'key': 'waitType', 'type': 'str'}, 'wait_time_ms': {'key': 'waitTimeMs', 'type': 'float'}, @@ -40,6 +32,6 @@ class WaitStatistics(Model): def __init__(self, **kwargs): super(WaitStatistics, self).__init__(**kwargs) - self.wait_type = None - self.wait_time_ms = None - self.wait_count = None + self.wait_type = kwargs.get('wait_type', None) + self.wait_time_ms = kwargs.get('wait_time_ms', 0) + self.wait_count = kwargs.get('wait_count', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics_py3.py index ae6f3ccdcb29..4ac3fbbb9247 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/wait_statistics_py3.py @@ -15,31 +15,23 @@ class WaitStatistics(Model): """Wait statistics gathered during query batch execution. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar wait_type: Type of the Wait - :vartype wait_type: str - :ivar wait_time_ms: Total wait time in millisecond(s). Default value: 0 . - :vartype wait_time_ms: float - :ivar wait_count: Total no. of waits - :vartype wait_count: long + :param wait_type: Type of the Wait + :type wait_type: str + :param wait_time_ms: Total wait time in millisecond(s) . Default value: 0 + . + :type wait_time_ms: float + :param wait_count: Total no. of waits + :type wait_count: long """ - _validation = { - 'wait_type': {'readonly': True}, - 'wait_time_ms': {'readonly': True}, - 'wait_count': {'readonly': True}, - } - _attribute_map = { 'wait_type': {'key': 'waitType', 'type': 'str'}, 'wait_time_ms': {'key': 'waitTimeMs', 'type': 'float'}, 'wait_count': {'key': 'waitCount', 'type': 'long'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, wait_type: str=None, wait_time_ms: float=0, wait_count: int=None, **kwargs) -> None: super(WaitStatistics, self).__init__(**kwargs) - self.wait_type = None - self.wait_time_ms = None - self.wait_count = None + self.wait_type = wait_type + self.wait_time_ms = wait_time_ms + self.wait_count = wait_count diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/operations.py index 541b10fbca20..6249ae2fa208 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-04-19". + :ivar api_version: Version of the API. Constant value: "2018-07-15-preview". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-19" + self.api_version = "2018-07-15-preview" self.config = config @@ -70,7 +70,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -79,9 +79,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/projects_operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/projects_operations.py index 9e071cc44f02..07c814971fb0 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/projects_operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/projects_operations.py @@ -22,7 +22,7 @@ class ProjectsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-04-19". + :ivar api_version: Version of the API. Constant value: "2018-07-15-preview". """ models = models @@ -32,11 +32,11 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-19" + self.api_version = "2018-07-15-preview" self.config = config - def list_by_resource_group( + def list( self, group_name, service_name, custom_headers=None, raw=False, **operation_config): """Get projects in a service. @@ -63,7 +63,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'groupName': self._serialize.url("group_name", group_name, 'str'), @@ -81,7 +81,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -90,9 +90,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -108,7 +107,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects'} def create_or_update( self, parameters, group_name, service_name, project_name, custom_headers=None, raw=False, **operation_config): @@ -153,6 +152,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -165,9 +165,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'Project') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ApiErrorException(self._deserialize, response) @@ -227,7 +226,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -236,8 +235,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -298,7 +297,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -307,8 +305,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ApiErrorException(self._deserialize, response) @@ -360,6 +358,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -372,9 +371,8 @@ def update( body_content = self._serialize.body(parameters, 'Project') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/resource_skus_operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/resource_skus_operations.py index a089b020981f..903994cd6ef8 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/resource_skus_operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/resource_skus_operations.py @@ -22,7 +22,7 @@ class ResourceSkusOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-04-19". + :ivar api_version: Version of the API. Constant value: "2018-07-15-preview". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-19" + self.api_version = "2018-07-15-preview" self.config = config @@ -73,7 +73,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -82,9 +82,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/services_operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/services_operations.py index 4fd7a95abe38..fd994f8fa23a 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/services_operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/services_operations.py @@ -24,7 +24,7 @@ class ServicesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-04-19". + :ivar api_version: Version of the API. Constant value: "2018-07-15-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-19" + self.api_version = "2018-07-15-preview" self.config = config @@ -56,6 +56,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -68,9 +69,8 @@ def _create_or_update_initial( body_content = self._serialize.body(parameters, 'DataMigrationService') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -190,7 +190,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -199,8 +199,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -237,7 +237,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -246,8 +245,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: raise models.ApiErrorException(self._deserialize, response) @@ -324,6 +323,7 @@ def _update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -336,9 +336,8 @@ def _update_initial( body_content = self._serialize.body(parameters, 'DataMigrationService') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -452,7 +451,7 @@ def check_status( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -461,8 +460,8 @@ def check_status( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -497,7 +496,6 @@ def _start_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -506,8 +504,8 @@ def _start_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -580,7 +578,6 @@ def _stop_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -589,8 +586,8 @@ def _stop_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ApiErrorException(self._deserialize, response) @@ -691,7 +688,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -700,9 +697,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -720,7 +716,7 @@ def internal_paging(next_link=None, raw=False): return deserialized list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus'} - def nested_check_name_availability( + def check_children_name_availability( self, group_name, service_name, name=None, type=None, custom_headers=None, raw=False, **operation_config): """Check nested resource name validity and availability. @@ -749,7 +745,7 @@ def nested_check_name_availability( parameters = models.NameAvailabilityRequest(name=name, type=type) # Construct URL - url = self.nested_check_name_availability.metadata['url'] + url = self.check_children_name_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'groupName': self._serialize.url("group_name", group_name, 'str'), @@ -763,6 +759,7 @@ def nested_check_name_availability( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -775,9 +772,8 @@ def nested_check_name_availability( body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -792,7 +788,7 @@ def nested_check_name_availability( return client_raw_response return deserialized - nested_check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability'} + check_children_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability'} def list_by_resource_group( self, group_name, custom_headers=None, raw=False, **operation_config): @@ -836,7 +832,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -845,9 +841,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -904,7 +899,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -913,9 +908,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -973,6 +967,7 @@ def check_name_availability( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -985,9 +980,8 @@ def check_name_availability( body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/tasks_operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/tasks_operations.py index 5f5d65d9eacc..18b08b2dadd0 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/tasks_operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/tasks_operations.py @@ -22,7 +22,7 @@ class TasksOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-04-19". + :ivar api_version: Version of the API. Constant value: "2018-07-15-preview". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-19" + self.api_version = "2018-07-15-preview" self.config = config @@ -90,7 +90,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -99,9 +99,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -172,6 +171,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -184,9 +184,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'ProjectTask') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ApiErrorException(self._deserialize, response) @@ -253,7 +252,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -262,8 +261,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -328,7 +327,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -337,8 +335,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ApiErrorException(self._deserialize, response) @@ -401,6 +399,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -413,9 +412,8 @@ def update( body_content = self._serialize.body(parameters, 'ProjectTask') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -476,7 +474,7 @@ def cancel( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -485,8 +483,8 @@ def cancel( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) @@ -502,3 +500,80 @@ def cancel( return deserialized cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel'} + + def command( + self, group_name, service_name, project_name, task_name, parameters, custom_headers=None, raw=False, **operation_config): + """Execute a command on a task. + + The tasks resource is a nested, proxy-only resource representing work + performed by a DMS instance. This method executes a command on a + running task. + + :param group_name: Name of the resource group + :type group_name: str + :param service_name: Name of the service + :type service_name: str + :param project_name: Name of the project + :type project_name: str + :param task_name: Name of the Task + :type task_name: str + :param parameters: Command to execute + :type parameters: ~azure.mgmt.datamigration.models.CommandProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CommandProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.CommandProperties or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.command.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CommandProperties') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CommandProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/command'} diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/usages_operations.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/usages_operations.py index 502c3ea22afe..35255c37dbbc 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/usages_operations.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/operations/usages_operations.py @@ -22,7 +22,7 @@ class UsagesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API. Constant value: "2018-04-19". + :ivar api_version: Version of the API. Constant value: "2018-07-15-preview". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-19" + self.api_version = "2018-07-15-preview" self.config = config @@ -77,7 +77,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -86,9 +86,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ApiErrorException(self._deserialize, response) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/version.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/version.py index a39916c162ce..e0ec669828cb 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/version.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "0.1.0"