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 sql/resource-manager] [DO NOT MERGE] Sql job agent #2138

Merged
merged 2 commits into from
Mar 21, 2018
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
38 changes: 20 additions & 18 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
# --------------------------------------------------------------------------

from .resource import Resource
from .proxy_resource import ProxyResource
from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy
from .backup_long_term_retention_vault import BackupLongTermRetentionVault
from .tracked_resource import TrackedResource
from .proxy_resource import ProxyResource
from .recoverable_database import RecoverableDatabase
from .restorable_dropped_database import RestorableDroppedDatabase
from .max_size_capability import MaxSizeCapability
Expand Down Expand Up @@ -92,16 +90,17 @@
from .sync_member import SyncMember
from .subscription_usage import SubscriptionUsage
from .virtual_network_rule import VirtualNetworkRule
from .database_operation import DatabaseOperation
from .long_term_retention_backup import LongTermRetentionBackup
from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy
from .resource_move_definition import ResourceMoveDefinition
from .automatic_tuning_server_options import AutomaticTuningServerOptions
from .server_automatic_tuning import ServerAutomaticTuning
from .server_dns_alias import ServerDnsAlias
from .server_dns_alias_acquisition import ServerDnsAliasAcquisition
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
from .database_operation import DatabaseOperation
from .elastic_pool_operation import ElasticPoolOperation
from .recoverable_database_paged import RecoverableDatabasePaged
from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged
from .server_paged import ServerPaged
Expand Down Expand Up @@ -137,11 +136,12 @@
from .sync_member_paged import SyncMemberPaged
from .subscription_usage_paged import SubscriptionUsagePaged
from .virtual_network_rule_paged import VirtualNetworkRulePaged
from .database_operation_paged import DatabaseOperationPaged
from .long_term_retention_backup_paged import LongTermRetentionBackupPaged
from .server_dns_alias_paged import ServerDnsAliasPaged
from .restore_point_paged import RestorePointPaged
from .database_operation_paged import DatabaseOperationPaged
from .elastic_pool_operation_paged import ElasticPoolOperationPaged
from .sql_management_client_enums import (
BackupLongTermRetentionPolicyState,
CapabilityStatus,
MaxSizeUnits,
PerformanceLevelUnit,
Expand Down Expand Up @@ -192,18 +192,17 @@
SyncDirection,
SyncMemberState,
VirtualNetworkRuleState,
ManagementOperationState,
AutomaticTuningServerMode,
AutomaticTuningServerReason,
RestorePointType,
ManagementOperationState,
DatabaseState,
)

__all__ = [
'Resource',
'ProxyResource',
'BackupLongTermRetentionPolicy',
'BackupLongTermRetentionVault',
'TrackedResource',
'ProxyResource',
'RecoverableDatabase',
'RestorableDroppedDatabase',
'MaxSizeCapability',
Expand Down Expand Up @@ -282,16 +281,17 @@
'SyncMember',
'SubscriptionUsage',
'VirtualNetworkRule',
'DatabaseOperation',
'LongTermRetentionBackup',
'BackupLongTermRetentionPolicy',
'ResourceMoveDefinition',
'AutomaticTuningServerOptions',
'ServerAutomaticTuning',
'ServerDnsAlias',
'ServerDnsAliasAcquisition',
'RestorePoint',
'CreateDatabaseRestorePointDefinition',
'BackupLongTermRetentionPolicyPaged',
'BackupLongTermRetentionVaultPaged',
'DatabaseOperation',
'ElasticPoolOperation',
'RecoverableDatabasePaged',
'RestorableDroppedDatabasePaged',
'ServerPaged',
Expand Down Expand Up @@ -327,10 +327,11 @@
'SyncMemberPaged',
'SubscriptionUsagePaged',
'VirtualNetworkRulePaged',
'DatabaseOperationPaged',
'LongTermRetentionBackupPaged',
'ServerDnsAliasPaged',
'RestorePointPaged',
'BackupLongTermRetentionPolicyState',
'DatabaseOperationPaged',
'ElasticPoolOperationPaged',
'CapabilityStatus',
'MaxSizeUnits',
'PerformanceLevelUnit',
Expand Down Expand Up @@ -381,8 +382,9 @@
'SyncDirection',
'SyncMemberState',
'VirtualNetworkRuleState',
'ManagementOperationState',
'AutomaticTuningServerMode',
'AutomaticTuningServerReason',
'RestorePointType',
'ManagementOperationState',
'DatabaseState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class BackupLongTermRetentionPolicy(ProxyResource):
"""A backup long term retention policy.
"""A long term retention policy.

Variables are only populated by the server, and will be ignored when
sending a request.
Expand All @@ -24,37 +24,39 @@ class BackupLongTermRetentionPolicy(ProxyResource):
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar location: The geo-location where the resource lives
:vartype location: str
:param state: The status of the backup long term retention policy.
Possible values include: 'Disabled', 'Enabled'
:type state: str or
~azure.mgmt.sql.models.BackupLongTermRetentionPolicyState
:param recovery_services_backup_policy_resource_id: The azure recovery
services backup protection policy resource id
:type recovery_services_backup_policy_resource_id: str
:param weekly_retention: The weekly retention policy for an LTR backup in
an ISO 8601 format.
:type weekly_retention: str
:param monthly_retention: The montly retention policy for an LTR backup in
an ISO 8601 format.
:type monthly_retention: str
:param yearly_retention: The yearly retention policy for an LTR backup in
an ISO 8601 format.
:type yearly_retention: str
:param week_of_year: The week of year to take the yearly backup in an ISO
8601 format.
:type week_of_year: int
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'readonly': True},
'state': {'required': True},
'recovery_services_backup_policy_resource_id': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'state': {'key': 'properties.state', 'type': 'BackupLongTermRetentionPolicyState'},
'recovery_services_backup_policy_resource_id': {'key': 'properties.recoveryServicesBackupPolicyResourceId', 'type': 'str'},
'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'},
'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'},
'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'},
'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'},
}

def __init__(self, state, recovery_services_backup_policy_resource_id):
def __init__(self, weekly_retention=None, monthly_retention=None, yearly_retention=None, week_of_year=None):
super(BackupLongTermRetentionPolicy, self).__init__()
self.location = None
self.state = state
self.recovery_services_backup_policy_resource_id = recovery_services_backup_policy_resource_id
self.weekly_retention = weekly_retention
self.monthly_retention = monthly_retention
self.yearly_retention = yearly_retention
self.week_of_year = week_of_year

This file was deleted.

114 changes: 114 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# 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 .proxy_resource import ProxyResource


class ElasticPoolOperation(ProxyResource):
"""A elastic pool 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 elastic_pool_name: The name of the elastic pool the operation is
being performed on.
:vartype elastic_pool_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 server_name: The name of the server.
:vartype server_name: str
:ivar start_time: The operation start time.
:vartype start_time: datetime
:ivar state: The operation state.
:vartype state: str
: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},
'elastic_pool_name': {'readonly': True},
'operation': {'readonly': True},
'operation_friendly_name': {'readonly': True},
'percent_complete': {'readonly': True},
'server_name': {'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'},
'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'},
'operation': {'key': 'properties.operation', 'type': 'str'},
'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'},
'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'},
'server_name': {'key': 'properties.serverName', 'type': 'str'},
'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):
super(ElasticPoolOperation, self).__init__()
self.elastic_pool_name = None
self.operation = None
self.operation_friendly_name = None
self.percent_complete = None
self.server_name = 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
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
from msrest.paging import Paged


class BackupLongTermRetentionVaultPaged(Paged):
class ElasticPoolOperationPaged(Paged):
"""
A paging container for iterating over a list of :class:`BackupLongTermRetentionVault <azure.mgmt.sql.models.BackupLongTermRetentionVault>` object
A paging container for iterating over a list of :class:`ElasticPoolOperation <azure.mgmt.sql.models.ElasticPoolOperation>` object
"""

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

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

super(BackupLongTermRetentionVaultPaged, self).__init__(*args, **kwargs)
super(ElasticPoolOperationPaged, self).__init__(*args, **kwargs)
Loading