Skip to content

[AutoPR datamigration/resource-manager] Syncpublicpreview #3066

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
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
334 changes: 303 additions & 31 deletions azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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'
Loading