Skip to content

[AutoPR datamigration/resource-manager] Explicitly add MongoDbTasks.json to 2018-07-15 #3716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -606,6 +616,11 @@
'MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel',
'MigrateSchemaSqlServerSqlDbTaskOutputError',
'MigrateSchemaSqlTaskOutputError',
'MongoDbCommandInput',
'MongoDbCancelCommand',
'MongoDbFinishCommandInput',
'MongoDbFinishCommand',
'MongoDbRestartCommand',
'Database',
'DatabaseObjectName',
'MigrationTableMetadata',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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
Loading