Skip to content
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

[AutoPR azure-mgmt-sql] Changing readme.md file to initiate .Net client generation #509

Closed
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 @@ -103,6 +103,7 @@
from .operations import ManagedDatabaseRestoreDetailsOperations
from .operations import ManagedDatabasesOperations
from .operations import ServerAzureADAdministratorsOperations
from .operations import ManagedInstanceOperations
from . import models


Expand Down Expand Up @@ -292,6 +293,8 @@ class SqlManagementClient(SDKClient):
:vartype managed_databases: azure.mgmt.sql.operations.ManagedDatabasesOperations
:ivar server_azure_ad_administrators: ServerAzureADAdministrators operations
:vartype server_azure_ad_administrators: azure.mgmt.sql.operations.ServerAzureADAdministratorsOperations
:ivar managed_instance_operations: ManagedInstanceOperations operations
:vartype managed_instance_operations: azure.mgmt.sql.operations.ManagedInstanceOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -492,3 +495,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.server_azure_ad_administrators = ServerAzureADAdministratorsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.managed_instance_operations = ManagedInstanceOperations(
self._client, self.config, self._serialize, self._deserialize)
5 changes: 5 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
from ._models_py3 import ManagedInstanceKey
from ._models_py3 import ManagedInstanceLongTermRetentionBackup
from ._models_py3 import ManagedInstanceLongTermRetentionPolicy
from ._models_py3 import ManagedInstanceOperation
from ._models_py3 import ManagedInstancePairInfo
from ._models_py3 import ManagedInstanceUpdate
from ._models_py3 import ManagedInstanceVcoresCapability
Expand Down Expand Up @@ -271,6 +272,7 @@
from ._models import ManagedInstanceKey
from ._models import ManagedInstanceLongTermRetentionBackup
from ._models import ManagedInstanceLongTermRetentionPolicy
from ._models import ManagedInstanceOperation
from ._models import ManagedInstancePairInfo
from ._models import ManagedInstanceUpdate
from ._models import ManagedInstanceVcoresCapability
Expand Down Expand Up @@ -394,6 +396,7 @@
from ._paged_models import ManagedInstanceKeyPaged
from ._paged_models import ManagedInstanceLongTermRetentionBackupPaged
from ._paged_models import ManagedInstanceLongTermRetentionPolicyPaged
from ._paged_models import ManagedInstanceOperationPaged
from ._paged_models import ManagedInstancePaged
from ._paged_models import ManagedInstanceVulnerabilityAssessmentPaged
from ._paged_models import ManagedServerSecurityAlertPolicyPaged
Expand Down Expand Up @@ -620,6 +623,7 @@
'ManagedInstanceKey',
'ManagedInstanceLongTermRetentionBackup',
'ManagedInstanceLongTermRetentionPolicy',
'ManagedInstanceOperation',
'ManagedInstancePairInfo',
'ManagedInstanceUpdate',
'ManagedInstanceVcoresCapability',
Expand Down Expand Up @@ -786,6 +790,7 @@
'WorkloadClassifierPaged',
'ManagedDatabasePaged',
'ServerAzureADAdministratorPaged',
'ManagedInstanceOperationPaged',
'ServerConnectionType',
'SecurityAlertPolicyState',
'SecurityAlertPolicyEmailAccountAdmins',
Expand Down
98 changes: 98 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5568,6 +5568,104 @@ def __init__(self, **kwargs):
self.week_of_year = kwargs.get('week_of_year', None)


class ManagedInstanceOperation(ProxyResource):
"""A managed instance operation.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar managed_instance_name: The name of the managed instance the
operation is being performed on.
:vartype managed_instance_name: str
:ivar operation: The name of operation.
:vartype operation: str
:ivar operation_friendly_name: The friendly name of operation.
:vartype operation_friendly_name: str
:ivar percent_complete: The percentage of the operation completed.
:vartype percent_complete: int
:ivar start_time: The operation start time.
:vartype start_time: datetime
:ivar state: The operation state. Possible values include: 'Pending',
'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled'
:vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState
:ivar error_code: The operation error code.
:vartype error_code: int
:ivar error_description: The operation error description.
:vartype error_description: str
:ivar error_severity: The operation error severity.
:vartype error_severity: int
:ivar is_user_error: Whether or not the error is a user error.
:vartype is_user_error: bool
:ivar estimated_completion_time: The estimated completion time of the
operation.
:vartype estimated_completion_time: datetime
:ivar description: The operation description.
:vartype description: str
:ivar is_cancellable: Whether the operation can be cancelled.
:vartype is_cancellable: bool
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'managed_instance_name': {'readonly': True},
'operation': {'readonly': True},
'operation_friendly_name': {'readonly': True},
'percent_complete': {'readonly': True},
'start_time': {'readonly': True},
'state': {'readonly': True},
'error_code': {'readonly': True},
'error_description': {'readonly': True},
'error_severity': {'readonly': True},
'is_user_error': {'readonly': True},
'estimated_completion_time': {'readonly': True},
'description': {'readonly': True},
'is_cancellable': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'managed_instance_name': {'key': 'properties.managedInstanceName', 'type': 'str'},
'operation': {'key': 'properties.operation', 'type': 'str'},
'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'},
'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'},
'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'},
'state': {'key': 'properties.state', 'type': 'str'},
'error_code': {'key': 'properties.errorCode', 'type': 'int'},
'error_description': {'key': 'properties.errorDescription', 'type': 'str'},
'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'},
'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'},
'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'},
'description': {'key': 'properties.description', 'type': 'str'},
'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(ManagedInstanceOperation, self).__init__(**kwargs)
self.managed_instance_name = None
self.operation = None
self.operation_friendly_name = None
self.percent_complete = None
self.start_time = None
self.state = None
self.error_code = None
self.error_description = None
self.error_severity = None
self.is_user_error = None
self.estimated_completion_time = None
self.description = None
self.is_cancellable = None


class ManagedInstancePairInfo(Model):
"""Pairs of Managed Instances in the failover group.

Expand Down
98 changes: 98 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -5568,6 +5568,104 @@ def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, y
self.week_of_year = week_of_year


class ManagedInstanceOperation(ProxyResource):
"""A managed instance operation.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar managed_instance_name: The name of the managed instance the
operation is being performed on.
:vartype managed_instance_name: str
:ivar operation: The name of operation.
:vartype operation: str
:ivar operation_friendly_name: The friendly name of operation.
:vartype operation_friendly_name: str
:ivar percent_complete: The percentage of the operation completed.
:vartype percent_complete: int
:ivar start_time: The operation start time.
:vartype start_time: datetime
:ivar state: The operation state. Possible values include: 'Pending',
'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled'
:vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState
:ivar error_code: The operation error code.
:vartype error_code: int
:ivar error_description: The operation error description.
:vartype error_description: str
:ivar error_severity: The operation error severity.
:vartype error_severity: int
:ivar is_user_error: Whether or not the error is a user error.
:vartype is_user_error: bool
:ivar estimated_completion_time: The estimated completion time of the
operation.
:vartype estimated_completion_time: datetime
:ivar description: The operation description.
:vartype description: str
:ivar is_cancellable: Whether the operation can be cancelled.
:vartype is_cancellable: bool
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'managed_instance_name': {'readonly': True},
'operation': {'readonly': True},
'operation_friendly_name': {'readonly': True},
'percent_complete': {'readonly': True},
'start_time': {'readonly': True},
'state': {'readonly': True},
'error_code': {'readonly': True},
'error_description': {'readonly': True},
'error_severity': {'readonly': True},
'is_user_error': {'readonly': True},
'estimated_completion_time': {'readonly': True},
'description': {'readonly': True},
'is_cancellable': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'managed_instance_name': {'key': 'properties.managedInstanceName', 'type': 'str'},
'operation': {'key': 'properties.operation', 'type': 'str'},
'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'},
'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'},
'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'},
'state': {'key': 'properties.state', 'type': 'str'},
'error_code': {'key': 'properties.errorCode', 'type': 'int'},
'error_description': {'key': 'properties.errorDescription', 'type': 'str'},
'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'},
'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'},
'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'},
'description': {'key': 'properties.description', 'type': 'str'},
'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'},
}

def __init__(self, **kwargs) -> None:
super(ManagedInstanceOperation, self).__init__(**kwargs)
self.managed_instance_name = None
self.operation = None
self.operation_friendly_name = None
self.percent_complete = None
self.start_time = None
self.state = None
self.error_code = None
self.error_description = None
self.error_severity = None
self.is_user_error = None
self.estimated_completion_time = None
self.description = None
self.is_cancellable = None


class ManagedInstancePairInfo(Model):
"""Pairs of Managed Instances in the failover group.

Expand Down
13 changes: 13 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_paged_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,3 +1000,16 @@ class ServerAzureADAdministratorPaged(Paged):
def __init__(self, *args, **kwargs):

super(ServerAzureADAdministratorPaged, self).__init__(*args, **kwargs)
class ManagedInstanceOperationPaged(Paged):
"""
A paging container for iterating over a list of :class:`ManagedInstanceOperation <azure.mgmt.sql.models.ManagedInstanceOperation>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[ManagedInstanceOperation]'}
}

def __init__(self, *args, **kwargs):

super(ManagedInstanceOperationPaged, self).__init__(*args, **kwargs)
2 changes: 2 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
from ._managed_database_restore_details_operations import ManagedDatabaseRestoreDetailsOperations
from ._managed_databases_operations import ManagedDatabasesOperations
from ._server_azure_ad_administrators_operations import ServerAzureADAdministratorsOperations
from ._managed_instance_operations import ManagedInstanceOperations

__all__ = [
'RecoverableDatabasesOperations',
Expand Down Expand Up @@ -191,4 +192,5 @@
'ManagedDatabaseRestoreDetailsOperations',
'ManagedDatabasesOperations',
'ServerAzureADAdministratorsOperations',
'ManagedInstanceOperations',
]
Loading