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] Add managed instances swagger to 2018-06-01-preview #6075

Merged
merged 2 commits into from
Jun 25, 2019
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
52 changes: 30 additions & 22 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,10 @@
from .partner_info_py3 import PartnerInfo
from .failover_group_py3 import FailoverGroup
from .failover_group_update_py3 import FailoverGroupUpdate
from .resource_identity_py3 import ResourceIdentity
from .sku_py3 import Sku
from .managed_instance_py3 import ManagedInstance
from .managed_instance_update_py3 import ManagedInstanceUpdate
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .server_key_py3 import ServerKey
from .resource_identity_py3 import ResourceIdentity
from .server_py3 import Server
from .server_update_py3 import ServerUpdate
from .sync_agent_py3 import SyncAgent
Expand Down Expand Up @@ -90,6 +87,7 @@
from .database_vulnerability_assessment_rule_baseline_py3 import DatabaseVulnerabilityAssessmentRuleBaseline
from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties
from .database_vulnerability_assessment_py3 import DatabaseVulnerabilityAssessment
from .sku_py3 import Sku
from .job_agent_py3 import JobAgent
from .job_agent_update_py3 import JobAgentUpdate
from .job_credential_py3 import JobCredential
Expand Down Expand Up @@ -163,6 +161,10 @@
from .server_vulnerability_assessment_py3 import ServerVulnerabilityAssessment
from .instance_pool_py3 import InstancePool
from .instance_pool_update_py3 import InstancePoolUpdate
from .name_py3 import Name
from .usage_py3 import Usage
from .managed_instance_py3 import ManagedInstance
from .managed_instance_update_py3 import ManagedInstanceUpdate
except (SyntaxError, ImportError):
from .recoverable_database import RecoverableDatabase
from .restorable_dropped_database import RestorableDroppedDatabase
Expand Down Expand Up @@ -210,13 +212,10 @@
from .partner_info import PartnerInfo
from .failover_group import FailoverGroup
from .failover_group_update import FailoverGroupUpdate
from .resource_identity import ResourceIdentity
from .sku import Sku
from .managed_instance import ManagedInstance
from .managed_instance_update import ManagedInstanceUpdate
from .operation_display import OperationDisplay
from .operation import Operation
from .server_key import ServerKey
from .resource_identity import ResourceIdentity
from .server import Server
from .server_update import ServerUpdate
from .sync_agent import SyncAgent
Expand Down Expand Up @@ -244,6 +243,7 @@
from .database_vulnerability_assessment_rule_baseline import DatabaseVulnerabilityAssessmentRuleBaseline
from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties
from .database_vulnerability_assessment import DatabaseVulnerabilityAssessment
from .sku import Sku
from .job_agent import JobAgent
from .job_agent_update import JobAgentUpdate
from .job_credential import JobCredential
Expand Down Expand Up @@ -317,6 +317,10 @@
from .server_vulnerability_assessment import ServerVulnerabilityAssessment
from .instance_pool import InstancePool
from .instance_pool_update import InstancePoolUpdate
from .name import Name
from .usage import Usage
from .managed_instance import ManagedInstance
from .managed_instance_update import ManagedInstanceUpdate
from .recoverable_database_paged import RecoverableDatabasePaged
from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged
from .server_paged import ServerPaged
Expand All @@ -341,7 +345,6 @@
from .database_usage_paged import DatabaseUsagePaged
from .encryption_protector_paged import EncryptionProtectorPaged
from .failover_group_paged import FailoverGroupPaged
from .managed_instance_paged import ManagedInstancePaged
from .operation_paged import OperationPaged
from .server_key_paged import ServerKeyPaged
from .sync_agent_paged import SyncAgentPaged
Expand Down Expand Up @@ -383,6 +386,8 @@
from .managed_instance_vulnerability_assessment_paged import ManagedInstanceVulnerabilityAssessmentPaged
from .server_vulnerability_assessment_paged import ServerVulnerabilityAssessmentPaged
from .instance_pool_paged import InstancePoolPaged
from .usage_paged import UsagePaged
from .managed_instance_paged import ManagedInstancePaged
from .sql_management_client_enums import (
CheckNameAvailabilityReason,
ServerConnectionType,
Expand Down Expand Up @@ -416,11 +421,8 @@
ReadWriteEndpointFailoverPolicy,
ReadOnlyEndpointFailoverPolicy,
FailoverGroupReplicationRole,
IdentityType,
ManagedServerCreateMode,
ManagedInstanceLicenseType,
ManagedInstanceProxyOverride,
OperationOrigin,
IdentityType,
SyncAgentState,
SyncMemberDbType,
SyncGroupLogType,
Expand Down Expand Up @@ -461,6 +463,9 @@
VulnerabilityAssessmentScanState,
InstanceFailoverGroupReplicationRole,
InstancePoolLicenseType,
ManagedServerCreateMode,
ManagedInstanceLicenseType,
ManagedInstanceProxyOverride,
LongTermRetentionDatabaseState,
VulnerabilityAssessmentPolicyBaselineName,
SensitivityLabelSource,
Expand Down Expand Up @@ -514,13 +519,10 @@
'PartnerInfo',
'FailoverGroup',
'FailoverGroupUpdate',
'ResourceIdentity',
'Sku',
'ManagedInstance',
'ManagedInstanceUpdate',
'OperationDisplay',
'Operation',
'ServerKey',
'ResourceIdentity',
'Server',
'ServerUpdate',
'SyncAgent',
Expand Down Expand Up @@ -548,6 +550,7 @@
'DatabaseVulnerabilityAssessmentRuleBaseline',
'VulnerabilityAssessmentRecurringScansProperties',
'DatabaseVulnerabilityAssessment',
'Sku',
'JobAgent',
'JobAgentUpdate',
'JobCredential',
Expand Down Expand Up @@ -621,6 +624,10 @@
'ServerVulnerabilityAssessment',
'InstancePool',
'InstancePoolUpdate',
'Name',
'Usage',
'ManagedInstance',
'ManagedInstanceUpdate',
'RecoverableDatabasePaged',
'RestorableDroppedDatabasePaged',
'ServerPaged',
Expand All @@ -645,7 +652,6 @@
'DatabaseUsagePaged',
'EncryptionProtectorPaged',
'FailoverGroupPaged',
'ManagedInstancePaged',
'OperationPaged',
'ServerKeyPaged',
'SyncAgentPaged',
Expand Down Expand Up @@ -687,6 +693,8 @@
'ManagedInstanceVulnerabilityAssessmentPaged',
'ServerVulnerabilityAssessmentPaged',
'InstancePoolPaged',
'UsagePaged',
'ManagedInstancePaged',
'CheckNameAvailabilityReason',
'ServerConnectionType',
'SecurityAlertPolicyState',
Expand Down Expand Up @@ -719,11 +727,8 @@
'ReadWriteEndpointFailoverPolicy',
'ReadOnlyEndpointFailoverPolicy',
'FailoverGroupReplicationRole',
'IdentityType',
'ManagedServerCreateMode',
'ManagedInstanceLicenseType',
'ManagedInstanceProxyOverride',
'OperationOrigin',
'IdentityType',
'SyncAgentState',
'SyncMemberDbType',
'SyncGroupLogType',
Expand Down Expand Up @@ -764,6 +769,9 @@
'VulnerabilityAssessmentScanState',
'InstanceFailoverGroupReplicationRole',
'InstancePoolLicenseType',
'ManagedServerCreateMode',
'ManagedInstanceLicenseType',
'ManagedInstanceProxyOverride',
'LongTermRetentionDatabaseState',
'VulnerabilityAssessmentPolicyBaselineName',
'SensitivityLabelSource',
Expand Down
32 changes: 32 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 Name(Model):
"""ARM Usage Name.

:param value: Usage name value
:type value: str
:param localized_value: Usage name localized value.
:type localized_value: str
"""

_attribute_map = {
'value': {'key': 'value', 'type': 'str'},
'localized_value': {'key': 'localizedValue', 'type': 'str'},
}

def __init__(self, **kwargs):
super(Name, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.localized_value = kwargs.get('localized_value', None)
32 changes: 32 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/name_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 Name(Model):
"""ARM Usage Name.

:param value: Usage name value
:type value: str
:param localized_value: Usage name localized value.
:type localized_value: str
"""

_attribute_map = {
'value': {'key': 'value', 'type': 'str'},
'localized_value': {'key': 'localizedValue', 'type': 'str'},
}

def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None:
super(Name, self).__init__(**kwargs)
self.value = value
self.localized_value = localized_value
Original file line number Diff line number Diff line change
Expand Up @@ -325,36 +325,17 @@ class FailoverGroupReplicationRole(str, Enum):
secondary = "Secondary"


class IdentityType(str, Enum):

system_assigned = "SystemAssigned"


class ManagedServerCreateMode(str, Enum):

default = "Default"
point_in_time_restore = "PointInTimeRestore"


class ManagedInstanceLicenseType(str, Enum):

license_included = "LicenseIncluded"
base_price = "BasePrice"


class ManagedInstanceProxyOverride(str, Enum):

proxy = "Proxy"
redirect = "Redirect"
default = "Default"


class OperationOrigin(str, Enum):

user = "user"
system = "system"


class IdentityType(str, Enum):

system_assigned = "SystemAssigned"


class SyncAgentState(str, Enum):

online = "Online"
Expand Down Expand Up @@ -684,6 +665,25 @@ class InstancePoolLicenseType(str, Enum):
base_price = "BasePrice"


class ManagedServerCreateMode(str, Enum):

default = "Default"
point_in_time_restore = "PointInTimeRestore"


class ManagedInstanceLicenseType(str, Enum):

license_included = "LicenseIncluded"
base_price = "BasePrice"


class ManagedInstanceProxyOverride(str, Enum):

proxy = "Proxy"
redirect = "Redirect"
default = "Default"


class LongTermRetentionDatabaseState(str, Enum):

all = "All"
Expand Down
65 changes: 65 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/usage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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 Usage(Model):
"""ARM usage.

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: ~azure.mgmt.sql.models.Name
:ivar type: Resource type.
:vartype type: str
:ivar unit: Usage unit.
:vartype unit: str
:ivar current_value: Usage current value.
:vartype current_value: int
:ivar limit: Usage limit.
:vartype limit: int
:ivar requested_limit: Usage requested limit.
:vartype requested_limit: int
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'unit': {'readonly': True},
'current_value': {'readonly': True},
'limit': {'readonly': True},
'requested_limit': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'Name'},
'type': {'key': 'type', 'type': 'str'},
'unit': {'key': 'unit', 'type': 'str'},
'current_value': {'key': 'currentValue', 'type': 'int'},
'limit': {'key': 'limit', 'type': 'int'},
'requested_limit': {'key': 'requestedLimit', 'type': 'int'},
}

def __init__(self, **kwargs):
super(Usage, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.unit = None
self.current_value = None
self.limit = None
self.requested_limit = None
Loading