diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py index c4d6afeb19c5..4c2058abc869 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py @@ -183,6 +183,11 @@ 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 .mongo_db_command_input_py3 import MongoDbCommandInput + from .mongo_db_cancel_command_py3 import MongoDbCancelCommand + from .mongo_db_finish_command_input_py3 import MongoDbFinishCommandInput + from .mongo_db_finish_command_py3 import MongoDbFinishCommand + from .mongo_db_restart_command_py3 import MongoDbRestartCommand from .database_py3 import Database from .database_object_name_py3 import DatabaseObjectName from .migration_table_metadata_py3 import MigrationTableMetadata @@ -369,6 +374,11 @@ 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 .mongo_db_command_input import MongoDbCommandInput + from .mongo_db_cancel_command import MongoDbCancelCommand + from .mongo_db_finish_command_input import MongoDbFinishCommandInput + from .mongo_db_finish_command import MongoDbFinishCommand + from .mongo_db_restart_command import MongoDbRestartCommand from .database import Database from .database_object_name import DatabaseObjectName from .migration_table_metadata import MigrationTableMetadata @@ -606,6 +616,11 @@ 'MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel', 'MigrateSchemaSqlServerSqlDbTaskOutputError', 'MigrateSchemaSqlTaskOutputError', + 'MongoDbCommandInput', + 'MongoDbCancelCommand', + 'MongoDbFinishCommandInput', + 'MongoDbFinishCommand', + 'MongoDbRestartCommand', 'Database', 'DatabaseObjectName', 'MigrationTableMetadata', diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties.py index 74947a116cde..098e974de48e 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties.py @@ -17,7 +17,8 @@ class CommandProperties(Model): 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 + sub-classes are: MigrateSyncCompleteCommandProperties, + MongoDbCancelCommand, MongoDbFinishCommand, MongoDbRestartCommand Variables are only populated by the server, and will be ignored when sending a request. @@ -47,7 +48,7 @@ class CommandProperties(Model): } _subtype_map = { - 'command_type': {'Migrate.Sync.Complete.Database': 'MigrateSyncCompleteCommandProperties'} + 'command_type': {'Migrate.Sync.Complete.Database': 'MigrateSyncCompleteCommandProperties', 'cancel': 'MongoDbCancelCommand', 'finish': 'MongoDbFinishCommand', 'restart': 'MongoDbRestartCommand'} } def __init__(self, **kwargs): 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 index 1e050060e555..cda890206d25 100644 --- a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties_py3.py +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/command_properties_py3.py @@ -17,7 +17,8 @@ class CommandProperties(Model): 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 + sub-classes are: MigrateSyncCompleteCommandProperties, + MongoDbCancelCommand, MongoDbFinishCommand, MongoDbRestartCommand Variables are only populated by the server, and will be ignored when sending a request. @@ -47,7 +48,7 @@ class CommandProperties(Model): } _subtype_map = { - 'command_type': {'Migrate.Sync.Complete.Database': 'MigrateSyncCompleteCommandProperties'} + 'command_type': {'Migrate.Sync.Complete.Database': 'MigrateSyncCompleteCommandProperties', 'cancel': 'MongoDbCancelCommand', 'finish': 'MongoDbFinishCommand', 'restart': 'MongoDbRestartCommand'} } def __init__(self, **kwargs) -> None: diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_cancel_command.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_cancel_command.py new file mode 100644 index 000000000000..4643f63dcacc --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_cancel_command.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 .command_properties import CommandProperties + + +class MongoDbCancelCommand(CommandProperties): + """Properties for the command that cancels a migration in whole or in part. + + 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.MongoDbCommandInput + """ + + _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'}, + 'input': {'key': 'input', 'type': 'MongoDbCommandInput'}, + } + + def __init__(self, **kwargs): + super(MongoDbCancelCommand, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.command_type = 'cancel' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_cancel_command_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_cancel_command_py3.py new file mode 100644 index 000000000000..83971c52855f --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_cancel_command_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 .command_properties_py3 import CommandProperties + + +class MongoDbCancelCommand(CommandProperties): + """Properties for the command that cancels a migration in whole or in part. + + 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.MongoDbCommandInput + """ + + _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'}, + 'input': {'key': 'input', 'type': 'MongoDbCommandInput'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(MongoDbCancelCommand, self).__init__(**kwargs) + self.input = input + self.command_type = 'cancel' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_command_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_command_input.py new file mode 100644 index 000000000000..62ee1e513304 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_command_input.py @@ -0,0 +1,30 @@ +# 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 MongoDbCommandInput(Model): + """Describes the input to the 'cancel' and 'restart' MongoDB migration + commands. + + :param object_name: The qualified name of a database or collection to act + upon, or null to act upon the entire migration + :type object_name: str + """ + + _attribute_map = { + 'object_name': {'key': 'objectName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MongoDbCommandInput, self).__init__(**kwargs) + self.object_name = kwargs.get('object_name', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_command_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_command_input_py3.py new file mode 100644 index 000000000000..4581858b8e1a --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_command_input_py3.py @@ -0,0 +1,30 @@ +# 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 MongoDbCommandInput(Model): + """Describes the input to the 'cancel' and 'restart' MongoDB migration + commands. + + :param object_name: The qualified name of a database or collection to act + upon, or null to act upon the entire migration + :type object_name: str + """ + + _attribute_map = { + 'object_name': {'key': 'objectName', 'type': 'str'}, + } + + def __init__(self, *, object_name: str=None, **kwargs) -> None: + super(MongoDbCommandInput, self).__init__(**kwargs) + self.object_name = object_name diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command.py new file mode 100644 index 000000000000..6b6c4ba6de5c --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command.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 .command_properties import CommandProperties + + +class MongoDbFinishCommand(CommandProperties): + """Properties for the command that finishes a migration in whole or in part. + + 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.MongoDbFinishCommandInput + """ + + _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'}, + 'input': {'key': 'input', 'type': 'MongoDbFinishCommandInput'}, + } + + def __init__(self, **kwargs): + super(MongoDbFinishCommand, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.command_type = 'finish' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command_input.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command_input.py new file mode 100644 index 000000000000..e8c14aee170f --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command_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 .mongo_db_command_input import MongoDbCommandInput + + +class MongoDbFinishCommandInput(MongoDbCommandInput): + """Describes the input to the 'finish' MongoDB migration command. + + All required parameters must be populated in order to send to Azure. + + :param object_name: The qualified name of a database or collection to act + upon, or null to act upon the entire migration + :type object_name: str + :param immediate: Required. If true, replication for the affected objects + will be stopped immediately. If false, the migrator will finish replaying + queued events before finishing the replication. + :type immediate: bool + """ + + _validation = { + 'immediate': {'required': True}, + } + + _attribute_map = { + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'immediate': {'key': 'immediate', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MongoDbFinishCommandInput, self).__init__(**kwargs) + self.immediate = kwargs.get('immediate', None) diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command_input_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command_input_py3.py new file mode 100644 index 000000000000..49e561fc90fa --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command_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 .mongo_db_command_input_py3 import MongoDbCommandInput + + +class MongoDbFinishCommandInput(MongoDbCommandInput): + """Describes the input to the 'finish' MongoDB migration command. + + All required parameters must be populated in order to send to Azure. + + :param object_name: The qualified name of a database or collection to act + upon, or null to act upon the entire migration + :type object_name: str + :param immediate: Required. If true, replication for the affected objects + will be stopped immediately. If false, the migrator will finish replaying + queued events before finishing the replication. + :type immediate: bool + """ + + _validation = { + 'immediate': {'required': True}, + } + + _attribute_map = { + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'immediate': {'key': 'immediate', 'type': 'bool'}, + } + + def __init__(self, *, immediate: bool, object_name: str=None, **kwargs) -> None: + super(MongoDbFinishCommandInput, self).__init__(object_name=object_name, **kwargs) + self.immediate = immediate diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command_py3.py new file mode 100644 index 000000000000..6c52da153511 --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_finish_command_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 .command_properties_py3 import CommandProperties + + +class MongoDbFinishCommand(CommandProperties): + """Properties for the command that finishes a migration in whole or in part. + + 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.MongoDbFinishCommandInput + """ + + _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'}, + 'input': {'key': 'input', 'type': 'MongoDbFinishCommandInput'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(MongoDbFinishCommand, self).__init__(**kwargs) + self.input = input + self.command_type = 'finish' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_restart_command.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_restart_command.py new file mode 100644 index 000000000000..bdd9ffd455fb --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_restart_command.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 .command_properties import CommandProperties + + +class MongoDbRestartCommand(CommandProperties): + """Properties for the command that restarts a migration in whole or in part. + + 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.MongoDbCommandInput + """ + + _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'}, + 'input': {'key': 'input', 'type': 'MongoDbCommandInput'}, + } + + def __init__(self, **kwargs): + super(MongoDbRestartCommand, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.command_type = 'restart' diff --git a/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_restart_command_py3.py b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_restart_command_py3.py new file mode 100644 index 000000000000..4f61d3606e8e --- /dev/null +++ b/azure-mgmt-datamigration/azure/mgmt/datamigration/models/mongo_db_restart_command_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 .command_properties_py3 import CommandProperties + + +class MongoDbRestartCommand(CommandProperties): + """Properties for the command that restarts a migration in whole or in part. + + 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.MongoDbCommandInput + """ + + _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'}, + 'input': {'key': 'input', 'type': 'MongoDbCommandInput'}, + } + + def __init__(self, *, input=None, **kwargs) -> None: + super(MongoDbRestartCommand, self).__init__(**kwargs) + self.input = input + self.command_type = 'restart'