Skip to content

Commit

Permalink
[AutoPR sql/resource-manager] SQL database, elastic pool, and capabil…
Browse files Browse the repository at this point in the history
…ities 2017-10-01-preview (#2272)

* Generated from 60866124ae22fe440362fd0cd1faf52c55431b2b

Fixed model validation errors by making minor example edits

* Generated from 2f4cf0e92bc3e78cc62b4fac91e5b7ac4c6408cb

Renamed Databases_Rename to Databases_Move

* Generated from 5b2ebc1c2bacf73e322054a61806ff12f2fe4eee

Fixed CapabilitiesList example param name
  • Loading branch information
AutorestCI authored Mar 27, 2018
1 parent 86a9107 commit d457647
Show file tree
Hide file tree
Showing 231 changed files with 11,009 additions and 4,154 deletions.
468 changes: 301 additions & 167 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class AutomaticTuningOptions(Model):
'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'},
}

def __init__(self, desired_state=None):
super(AutomaticTuningOptions, self).__init__()
self.desired_state = desired_state
def __init__(self, **kwargs):
super(AutomaticTuningOptions, self).__init__(**kwargs)
self.desired_state = kwargs.get('desired_state', None)
self.actual_state = None
self.reason_code = None
self.reason_desc = 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 AutomaticTuningOptions(Model):
"""Automatic tuning properties for individual advisors.
Variables are only populated by the server, and will be ignored when
sending a request.
:param desired_state: Automatic tuning option desired state. Possible
values include: 'Off', 'On', 'Default'
:type desired_state: str or
~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired
:ivar actual_state: Automatic tuning option actual state. Possible values
include: 'Off', 'On'
:vartype actual_state: str or
~azure.mgmt.sql.models.AutomaticTuningOptionModeActual
:ivar reason_code: Reason code if desired and actual state are different.
:vartype reason_code: int
:ivar reason_desc: Reason description if desired and actual state are
different. Possible values include: 'Default', 'Disabled',
'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff',
'QueryStoreReadOnly', 'NotSupported'
:vartype reason_desc: str or
~azure.mgmt.sql.models.AutomaticTuningDisabledReason
"""

_validation = {
'actual_state': {'readonly': True},
'reason_code': {'readonly': True},
'reason_desc': {'readonly': True},
}

_attribute_map = {
'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'},
'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'},
'reason_code': {'key': 'reasonCode', 'type': 'int'},
'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'},
}

def __init__(self, *, desired_state=None, **kwargs) -> None:
super(AutomaticTuningOptions, self).__init__(**kwargs)
self.desired_state = desired_state
self.actual_state = None
self.reason_code = None
self.reason_desc = None
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class AutomaticTuningServerOptions(Model):
'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'},
}

def __init__(self, desired_state=None):
super(AutomaticTuningServerOptions, self).__init__()
self.desired_state = desired_state
def __init__(self, **kwargs):
super(AutomaticTuningServerOptions, self).__init__(**kwargs)
self.desired_state = kwargs.get('desired_state', None)
self.actual_state = None
self.reason_code = None
self.reason_desc = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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 AutomaticTuningServerOptions(Model):
"""Automatic tuning properties for individual advisors.
Variables are only populated by the server, and will be ignored when
sending a request.
:param desired_state: Automatic tuning option desired state. Possible
values include: 'Off', 'On', 'Default'
:type desired_state: str or
~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired
:ivar actual_state: Automatic tuning option actual state. Possible values
include: 'Off', 'On'
:vartype actual_state: str or
~azure.mgmt.sql.models.AutomaticTuningOptionModeActual
:ivar reason_code: Reason code if desired and actual state are different.
:vartype reason_code: int
:ivar reason_desc: Reason description if desired and actual state are
different. Possible values include: 'Default', 'Disabled',
'AutoConfigured'
:vartype reason_desc: str or
~azure.mgmt.sql.models.AutomaticTuningServerReason
"""

_validation = {
'actual_state': {'readonly': True},
'reason_code': {'readonly': True},
'reason_desc': {'readonly': True},
}

_attribute_map = {
'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'},
'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'},
'reason_code': {'key': 'reasonCode', 'type': 'int'},
'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'},
}

def __init__(self, *, desired_state=None, **kwargs) -> None:
super(AutomaticTuningServerOptions, self).__init__(**kwargs)
self.desired_state = desired_state
self.actual_state = None
self.reason_code = None
self.reason_desc = None
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):
super(BackupLongTermRetentionPolicy, self).__init__()
self.location = None
self.state = state
self.recovery_services_backup_policy_resource_id = recovery_services_backup_policy_resource_id
def __init__(self, **kwargs):
super(BackupLongTermRetentionPolicy, self).__init__(**kwargs)
self.weekly_retention = kwargs.get('weekly_retention', None)
self.monthly_retention = kwargs.get('monthly_retention', None)
self.yearly_retention = kwargs.get('yearly_retention', None)
self.week_of_year = kwargs.get('week_of_year', None)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 BackupLongTermRetentionPolicy(ProxyResource):
"""A long term retention policy.
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
: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},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', '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, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None:
super(BackupLongTermRetentionPolicy, self).__init__(, **kwargs)
self.weekly_retention = weekly_retention
self.monthly_retention = monthly_retention
self.yearly_retention = yearly_retention
self.week_of_year = week_of_year
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ class CheckNameAvailabilityRequest(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
:param name: The name whose availability is to be checked.
All required parameters must be populated in order to send to Azure.
:param name: Required. The name whose availability is to be checked.
:type name: str
:ivar type: The type of resource that is used as the scope of the
availability check. Default value: "Microsoft.Sql/servers" .
:ivar type: Required. The type of resource that is used as the scope of
the availability check. Default value: "Microsoft.Sql/servers" .
:vartype type: str
"""

Expand All @@ -37,6 +39,6 @@ class CheckNameAvailabilityRequest(Model):

type = "Microsoft.Sql/servers"

def __init__(self, name):
super(CheckNameAvailabilityRequest, self).__init__()
self.name = name
def __init__(self, **kwargs):
super(CheckNameAvailabilityRequest, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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 CheckNameAvailabilityRequest(Model):
"""A request to check whether the specified name for a resource is available.
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.
:param name: Required. The name whose availability is to be checked.
:type name: str
:ivar type: Required. The type of resource that is used as the scope of
the availability check. Default value: "Microsoft.Sql/servers" .
:vartype type: str
"""

_validation = {
'name': {'required': True},
'type': {'required': True, 'constant': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

type = "Microsoft.Sql/servers"

def __init__(self, *, name: str, **kwargs) -> None:
super(CheckNameAvailabilityRequest, self).__init__(**kwargs)
self.name = name
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class CheckNameAvailabilityResponse(Model):
'reason': {'key': 'reason', 'type': 'CheckNameAvailabilityReason'},
}

def __init__(self):
super(CheckNameAvailabilityResponse, self).__init__()
def __init__(self, **kwargs):
super(CheckNameAvailabilityResponse, self).__init__(**kwargs)
self.available = None
self.message = None
self.name = None
Expand Down
Loading

0 comments on commit d457647

Please sign in to comment.