Skip to content

Commit

Permalink
CodeGen from PR 12107 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 2d0688c7abe652a64ea73bd735d102a8a3b0d079 into 5a6276c
  • Loading branch information
SDKAuto committed Dec 21, 2020
1 parent b94fb2d commit edefabb
Show file tree
Hide file tree
Showing 7 changed files with 176 additions and 155 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
from .operations import SyncGroupsOperations
from .operations import SyncMembersOperations
from .operations import ManagedDatabasesOperations
from .operations import ManagedDatabaseRestoreDetailsOperations
from .operations import ServerAzureADOnlyAuthenticationsOperations
from .operations import ManagedInstancesOperations
from .operations import ManagedInstanceAzureADOnlyAuthenticationsOperations
Expand Down Expand Up @@ -294,6 +295,8 @@ class SqlManagementClient(SDKClient):
:vartype sync_members: azure.mgmt.sql.operations.SyncMembersOperations
:ivar managed_databases: ManagedDatabases operations
:vartype managed_databases: azure.mgmt.sql.operations.ManagedDatabasesOperations
:ivar managed_database_restore_details: ManagedDatabaseRestoreDetails operations
:vartype managed_database_restore_details: azure.mgmt.sql.operations.ManagedDatabaseRestoreDetailsOperations
:ivar server_azure_ad_only_authentications: ServerAzureADOnlyAuthentications operations
:vartype server_azure_ad_only_authentications: azure.mgmt.sql.operations.ServerAzureADOnlyAuthenticationsOperations
:ivar managed_instances: ManagedInstances operations
Expand Down Expand Up @@ -502,6 +505,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.managed_databases = ManagedDatabasesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.managed_database_restore_details = ManagedDatabaseRestoreDetailsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.server_azure_ad_only_authentications = ServerAzureADOnlyAuthenticationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.managed_instances = ManagedInstancesOperations(
Expand Down
3 changes: 3 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 @@ -84,6 +84,7 @@
from ._models_py3 import LongTermRetentionBackup
from ._models_py3 import ManagedBackupShortTermRetentionPolicy
from ._models_py3 import ManagedDatabase
from ._models_py3 import ManagedDatabaseRestoreDetailsResult
from ._models_py3 import ManagedDatabaseSecurityAlertPolicy
from ._models_py3 import ManagedDatabaseUpdate
from ._models_py3 import ManagedInstance
Expand Down Expand Up @@ -281,6 +282,7 @@
from ._models import LongTermRetentionBackup
from ._models import ManagedBackupShortTermRetentionPolicy
from ._models import ManagedDatabase
from ._models import ManagedDatabaseRestoreDetailsResult
from ._models import ManagedDatabaseSecurityAlertPolicy
from ._models import ManagedDatabaseUpdate
from ._models import ManagedInstance
Expand Down Expand Up @@ -664,6 +666,7 @@
'LongTermRetentionBackup',
'ManagedBackupShortTermRetentionPolicy',
'ManagedDatabase',
'ManagedDatabaseRestoreDetailsResult',
'ManagedDatabaseSecurityAlertPolicy',
'ManagedDatabaseUpdate',
'ManagedInstance',
Expand Down
80 changes: 80 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 @@ -4826,6 +4826,86 @@ def __init__(self, **kwargs):
self.last_backup_name = kwargs.get('last_backup_name', None)


class ManagedDatabaseRestoreDetailsResult(ProxyResource):
"""A managed database restore details.
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 status: Restore status.
:vartype status: str
:ivar current_restoring_file_name: Current restoring file name.
:vartype current_restoring_file_name: str
:ivar last_restored_file_name: Last restored file name.
:vartype last_restored_file_name: str
:ivar last_restored_file_time: Last restored file time.
:vartype last_restored_file_time: datetime
:ivar percent_completed: Percent completed.
:vartype percent_completed: float
:ivar unrestorable_files: List of unrestorable files.
:vartype unrestorable_files: list[str]
:ivar number_of_files_detected: Number of files detected.
:vartype number_of_files_detected: long
:ivar last_uploaded_file_name: Last uploaded file name.
:vartype last_uploaded_file_name: str
:ivar last_uploaded_file_time: Last uploaded file time.
:vartype last_uploaded_file_time: datetime
:ivar block_reason: The reason why restore is in Blocked state.
:vartype block_reason: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'status': {'readonly': True},
'current_restoring_file_name': {'readonly': True},
'last_restored_file_name': {'readonly': True},
'last_restored_file_time': {'readonly': True},
'percent_completed': {'readonly': True},
'unrestorable_files': {'readonly': True},
'number_of_files_detected': {'readonly': True},
'last_uploaded_file_name': {'readonly': True},
'last_uploaded_file_time': {'readonly': True},
'block_reason': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'str'},
'current_restoring_file_name': {'key': 'properties.currentRestoringFileName', 'type': 'str'},
'last_restored_file_name': {'key': 'properties.lastRestoredFileName', 'type': 'str'},
'last_restored_file_time': {'key': 'properties.lastRestoredFileTime', 'type': 'iso-8601'},
'percent_completed': {'key': 'properties.percentCompleted', 'type': 'float'},
'unrestorable_files': {'key': 'properties.unrestorableFiles', 'type': '[str]'},
'number_of_files_detected': {'key': 'properties.numberOfFilesDetected', 'type': 'long'},
'last_uploaded_file_name': {'key': 'properties.lastUploadedFileName', 'type': 'str'},
'last_uploaded_file_time': {'key': 'properties.lastUploadedFileTime', 'type': 'iso-8601'},
'block_reason': {'key': 'properties.blockReason', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ManagedDatabaseRestoreDetailsResult, self).__init__(**kwargs)
self.status = None
self.current_restoring_file_name = None
self.last_restored_file_name = None
self.last_restored_file_time = None
self.percent_completed = None
self.unrestorable_files = None
self.number_of_files_detected = None
self.last_uploaded_file_name = None
self.last_uploaded_file_time = None
self.block_reason = None


class ManagedDatabaseSecurityAlertPolicy(ProxyResource):
"""A managed database security alert policy.
Expand Down
80 changes: 80 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 @@ -4826,6 +4826,86 @@ def __init__(self, *, location: str, tags=None, collation: str=None, restore_poi
self.last_backup_name = last_backup_name


class ManagedDatabaseRestoreDetailsResult(ProxyResource):
"""A managed database restore details.
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 status: Restore status.
:vartype status: str
:ivar current_restoring_file_name: Current restoring file name.
:vartype current_restoring_file_name: str
:ivar last_restored_file_name: Last restored file name.
:vartype last_restored_file_name: str
:ivar last_restored_file_time: Last restored file time.
:vartype last_restored_file_time: datetime
:ivar percent_completed: Percent completed.
:vartype percent_completed: float
:ivar unrestorable_files: List of unrestorable files.
:vartype unrestorable_files: list[str]
:ivar number_of_files_detected: Number of files detected.
:vartype number_of_files_detected: long
:ivar last_uploaded_file_name: Last uploaded file name.
:vartype last_uploaded_file_name: str
:ivar last_uploaded_file_time: Last uploaded file time.
:vartype last_uploaded_file_time: datetime
:ivar block_reason: The reason why restore is in Blocked state.
:vartype block_reason: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'status': {'readonly': True},
'current_restoring_file_name': {'readonly': True},
'last_restored_file_name': {'readonly': True},
'last_restored_file_time': {'readonly': True},
'percent_completed': {'readonly': True},
'unrestorable_files': {'readonly': True},
'number_of_files_detected': {'readonly': True},
'last_uploaded_file_name': {'readonly': True},
'last_uploaded_file_time': {'readonly': True},
'block_reason': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'str'},
'current_restoring_file_name': {'key': 'properties.currentRestoringFileName', 'type': 'str'},
'last_restored_file_name': {'key': 'properties.lastRestoredFileName', 'type': 'str'},
'last_restored_file_time': {'key': 'properties.lastRestoredFileTime', 'type': 'iso-8601'},
'percent_completed': {'key': 'properties.percentCompleted', 'type': 'float'},
'unrestorable_files': {'key': 'properties.unrestorableFiles', 'type': '[str]'},
'number_of_files_detected': {'key': 'properties.numberOfFilesDetected', 'type': 'long'},
'last_uploaded_file_name': {'key': 'properties.lastUploadedFileName', 'type': 'str'},
'last_uploaded_file_time': {'key': 'properties.lastUploadedFileTime', 'type': 'iso-8601'},
'block_reason': {'key': 'properties.blockReason', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(ManagedDatabaseRestoreDetailsResult, self).__init__(**kwargs)
self.status = None
self.current_restoring_file_name = None
self.last_restored_file_name = None
self.last_restored_file_time = None
self.percent_completed = None
self.unrestorable_files = None
self.number_of_files_detected = None
self.last_uploaded_file_name = None
self.last_uploaded_file_time = None
self.block_reason = None


class ManagedDatabaseSecurityAlertPolicy(ProxyResource):
"""A managed database security alert policy.
Expand Down
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 @@ -98,6 +98,7 @@
from ._sync_groups_operations import SyncGroupsOperations
from ._sync_members_operations import SyncMembersOperations
from ._managed_databases_operations import ManagedDatabasesOperations
from ._managed_database_restore_details_operations import ManagedDatabaseRestoreDetailsOperations
from ._server_azure_ad_only_authentications_operations import ServerAzureADOnlyAuthenticationsOperations
from ._managed_instances_operations import ManagedInstancesOperations
from ._managed_instance_azure_ad_only_authentications_operations import ManagedInstanceAzureADOnlyAuthenticationsOperations
Expand Down Expand Up @@ -194,6 +195,7 @@
'SyncGroupsOperations',
'SyncMembersOperations',
'ManagedDatabasesOperations',
'ManagedDatabaseRestoreDetailsOperations',
'ServerAzureADOnlyAuthenticationsOperations',
'ManagedInstancesOperations',
'ManagedInstanceAzureADOnlyAuthenticationsOperations',
Expand Down

This file was deleted.

Loading

0 comments on commit edefabb

Please sign in to comment.