Skip to content

Commit

Permalink
Rebuild by #1950
Browse files Browse the repository at this point in the history
  • Loading branch information
AutorestCI committed Feb 21, 2018
1 parent fdf5a43 commit 1d42073
Show file tree
Hide file tree
Showing 46 changed files with 364 additions and 219 deletions.
8 changes: 4 additions & 4 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
from .server_automatic_tuning import ServerAutomaticTuning
from .server_dns_alias import ServerDnsAlias
from .server_dns_alias_acquisition import ServerDnsAliasAcquisition
from .database_restore_point import DatabaseRestorePoint
from .restore_point import RestorePoint
from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition
from .backup_long_term_retention_policy_paged import BackupLongTermRetentionPolicyPaged
from .backup_long_term_retention_vault_paged import BackupLongTermRetentionVaultPaged
Expand Down Expand Up @@ -139,7 +139,7 @@
from .virtual_network_rule_paged import VirtualNetworkRulePaged
from .database_operation_paged import DatabaseOperationPaged
from .server_dns_alias_paged import ServerDnsAliasPaged
from .database_restore_point_paged import DatabaseRestorePointPaged
from .restore_point_paged import RestorePointPaged
from .sql_management_client_enums import (
BackupLongTermRetentionPolicyState,
CapabilityStatus,
Expand Down Expand Up @@ -288,7 +288,7 @@
'ServerAutomaticTuning',
'ServerDnsAlias',
'ServerDnsAliasAcquisition',
'DatabaseRestorePoint',
'RestorePoint',
'CreateDatabaseRestorePointDefinition',
'BackupLongTermRetentionPolicyPaged',
'BackupLongTermRetentionVaultPaged',
Expand Down Expand Up @@ -329,7 +329,7 @@
'VirtualNetworkRulePaged',
'DatabaseOperationPaged',
'ServerDnsAliasPaged',
'DatabaseRestorePointPaged',
'RestorePointPaged',
'BackupLongTermRetentionPolicyState',
'CapabilityStatus',
'MaxSizeUnits',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .proxy_resource import ProxyResource


class DatabaseRestorePoint(ProxyResource):
class RestorePoint(ProxyResource):
"""Database restore points.
Variables are only populated by the server, and will be ignored when
Expand Down Expand Up @@ -56,14 +56,14 @@ class DatabaseRestorePoint(ProxyResource):
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'restore_point_type': {'key': 'properties.restorePointType', 'type': 'str'},
'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'},
'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'},
'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'},
'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'},
}

def __init__(self):
super(DatabaseRestorePoint, self).__init__()
super(RestorePoint, self).__init__()
self.location = None
self.restore_point_type = None
self.earliest_restore_date = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
from msrest.paging import Paged


class DatabaseRestorePointPaged(Paged):
class RestorePointPaged(Paged):
"""
A paging container for iterating over a list of :class:`DatabaseRestorePoint <azure.mgmt.sql.models.DatabaseRestorePoint>` object
A paging container for iterating over a list of :class:`RestorePoint <azure.mgmt.sql.models.RestorePoint>` object
"""

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

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

super(DatabaseRestorePointPaged, self).__init__(*args, **kwargs)
super(RestorePointPaged, self).__init__(*args, **kwargs)
4 changes: 2 additions & 2 deletions azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from .database_operations import DatabaseOperations
from .server_automatic_tuning_operations import ServerAutomaticTuningOperations
from .server_dns_aliases_operations import ServerDnsAliasesOperations
from .database_restore_points_operations import DatabaseRestorePointsOperations
from .restore_points_operations import RestorePointsOperations

__all__ = [
'BackupLongTermRetentionPoliciesOperations',
Expand Down Expand Up @@ -92,5 +92,5 @@
'DatabaseOperations',
'ServerAutomaticTuningOperations',
'ServerDnsAliasesOperations',
'DatabaseRestorePointsOperations',
'RestorePointsOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BackupLongTermRetentionPoliciesOperations(object):
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:param deserializer: An object model deserializer.
:ivar api_version: The API version to use for the request. Constant value: "2014-04-01".
:ivar backup_long_term_retention_policy_name: The name of the backup long term retention policy. Constant value: "Default".
"""
Expand Down Expand Up @@ -65,7 +65,7 @@ def get(
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}'
url = self.get.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -108,14 +108,15 @@ def get(
return client_raw_response

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}'}


def _create_or_update_initial(
self, resource_group_name, server_name, database_name, state, recovery_services_backup_policy_resource_id, custom_headers=None, raw=False, **operation_config):
parameters = models.BackupLongTermRetentionPolicy(state=state, recovery_services_backup_policy_resource_id=recovery_services_backup_policy_resource_id)

# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}'
url = self.create_or_update.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -242,6 +243,7 @@ def get_long_running_output(response):
return AzureOperationPoller(
long_running_send, get_long_running_output,
get_long_running_status, long_running_operation_timeout)
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}'}

def list_by_database(
self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -269,7 +271,7 @@ def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies'
url = self.list_by_database.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -317,3 +319,4 @@ def internal_paging(next_link=None, raw=False):
return client_raw_response

return deserialized
list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies'}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BackupLongTermRetentionVaultsOperations(object):
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:param deserializer: An object model deserializer.
:ivar api_version: The API version to use for the request. Constant value: "2014-04-01".
:ivar backup_long_term_retention_vault_name: The name of the Azure SQL Server backup LongTermRetention vault. Constant value: "RegisteredVault".
"""
Expand Down Expand Up @@ -62,7 +62,7 @@ def get(
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}'
url = self.get.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -104,14 +104,15 @@ def get(
return client_raw_response

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}'}


def _create_or_update_initial(
self, resource_group_name, server_name, recovery_services_vault_resource_id, custom_headers=None, raw=False, **operation_config):
parameters = models.BackupLongTermRetentionVault(recovery_services_vault_resource_id=recovery_services_vault_resource_id)

# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}'
url = self.create_or_update.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -229,6 +230,7 @@ def get_long_running_output(response):
return AzureOperationPoller(
long_running_send, get_long_running_output,
get_long_running_status, long_running_operation_timeout)
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}'}

def list_by_server(
self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -254,7 +256,7 @@ def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults'
url = self.list_by_server.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -301,3 +303,4 @@ def internal_paging(next_link=None, raw=False):
return client_raw_response

return deserialized
list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults'}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CapabilitiesOperations(object):
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:param deserializer: An object model deserializer.
:ivar api_version: The API version to use for the request. Constant value: "2014-04-01".
"""

Expand Down Expand Up @@ -54,7 +54,7 @@ def list_by_location(
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationId}/capabilities'
url = self.list_by_location.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'locationId': self._serialize.url("location_id", location_id, 'str')
Expand Down Expand Up @@ -94,3 +94,4 @@ def list_by_location(
return client_raw_response

return deserialized
list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationId}/capabilities'}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DataMaskingPoliciesOperations(object):
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:param deserializer: An object model deserializer.
:ivar api_version: The API version to use for the request. Constant value: "2014-04-01".
:ivar data_masking_policy_name: The name of the database for which the data masking rule applies. Constant value: "Default".
"""
Expand Down Expand Up @@ -73,7 +73,7 @@ def create_or_update(
parameters = models.DataMaskingPolicy(data_masking_state=data_masking_state, exempt_principals=exempt_principals)

# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}'
url = self.create_or_update.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -120,6 +120,7 @@ def create_or_update(
return client_raw_response

return deserialized
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}'}

def get(
self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -144,7 +145,7 @@ def get(
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}'
url = self.get.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -187,3 +188,4 @@ def get(
return client_raw_response

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}'}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DataMaskingRulesOperations(object):
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:param deserializer: An object model deserializer.
:ivar api_version: The API version to use for the request. Constant value: "2014-04-01".
:ivar data_masking_policy_name: The name of the database for which the data masking rule applies. Constant value: "Default".
"""
Expand Down Expand Up @@ -67,7 +67,7 @@ def create_or_update(
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}'
url = self.create_or_update.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -117,6 +117,7 @@ def create_or_update(
return client_raw_response

return deserialized
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}'}

def list_by_database(
self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -144,7 +145,7 @@ def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules'
url = self.list_by_database.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
Expand Down Expand Up @@ -193,3 +194,4 @@ def internal_paging(next_link=None, raw=False):
return client_raw_response

return deserialized
list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules'}
Loading

0 comments on commit 1d42073

Please sign in to comment.