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] Adding Swagger and examples for VirtualClusters operation group #4424

Merged
merged 1 commit into from
Feb 28, 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
8 changes: 8 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
from .sync_group_py3 import SyncGroup
from .sync_member_py3 import SyncMember
from .subscription_usage_py3 import SubscriptionUsage
from .virtual_cluster_py3 import VirtualCluster
from .virtual_cluster_update_py3 import VirtualClusterUpdate
from .virtual_network_rule_py3 import VirtualNetworkRule
from .extended_database_blob_auditing_policy_py3 import ExtendedDatabaseBlobAuditingPolicy
from .extended_server_blob_auditing_policy_py3 import ExtendedServerBlobAuditingPolicy
Expand Down Expand Up @@ -229,6 +231,8 @@
from .sync_group import SyncGroup
from .sync_member import SyncMember
from .subscription_usage import SubscriptionUsage
from .virtual_cluster import VirtualCluster
from .virtual_cluster_update import VirtualClusterUpdate
from .virtual_network_rule import VirtualNetworkRule
from .extended_database_blob_auditing_policy import ExtendedDatabaseBlobAuditingPolicy
from .extended_server_blob_auditing_policy import ExtendedServerBlobAuditingPolicy
Expand Down Expand Up @@ -344,6 +348,7 @@
from .sync_group_paged import SyncGroupPaged
from .sync_member_paged import SyncMemberPaged
from .subscription_usage_paged import SubscriptionUsagePaged
from .virtual_cluster_paged import VirtualClusterPaged
from .virtual_network_rule_paged import VirtualNetworkRulePaged
from .database_vulnerability_assessment_paged import DatabaseVulnerabilityAssessmentPaged
from .job_agent_paged import JobAgentPaged
Expand Down Expand Up @@ -521,6 +526,8 @@
'SyncGroup',
'SyncMember',
'SubscriptionUsage',
'VirtualCluster',
'VirtualClusterUpdate',
'VirtualNetworkRule',
'ExtendedDatabaseBlobAuditingPolicy',
'ExtendedServerBlobAuditingPolicy',
Expand Down Expand Up @@ -636,6 +643,7 @@
'SyncGroupPaged',
'SyncMemberPaged',
'SubscriptionUsagePaged',
'VirtualClusterPaged',
'VirtualNetworkRulePaged',
'DatabaseVulnerabilityAssessmentPaged',
'JobAgentPaged',
Expand Down
66 changes: 66 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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 .tracked_resource import TrackedResource


class VirtualCluster(TrackedResource):
"""An Azure SQL virtual cluster.

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.

:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Required. Resource location.
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:ivar subnet_id: Subnet resource ID for the virtual cluster.
:vartype subnet_id: str
:param family: If the service has different generations of hardware, for
the same SKU, then that can be captured here.
:type family: str
:ivar child_resources: List of resources in this virtual cluster.
:vartype child_resources: list[str]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'subnet_id': {'readonly': True},
'child_resources': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'subnet_id': {'key': 'properties.subnetId', 'type': 'str'},
'family': {'key': 'properties.family', 'type': 'str'},
'child_resources': {'key': 'properties.childResources', 'type': '[str]'},
}

def __init__(self, **kwargs):
super(VirtualCluster, self).__init__(**kwargs)
self.subnet_id = None
self.family = kwargs.get('family', None)
self.child_resources = None
27 changes: 27 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_paged.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


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

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

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

super(VirtualClusterPaged, self).__init__(*args, **kwargs)
66 changes: 66 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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 .tracked_resource_py3 import TrackedResource


class VirtualCluster(TrackedResource):
"""An Azure SQL virtual cluster.

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.

:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Required. Resource location.
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:ivar subnet_id: Subnet resource ID for the virtual cluster.
:vartype subnet_id: str
:param family: If the service has different generations of hardware, for
the same SKU, then that can be captured here.
:type family: str
:ivar child_resources: List of resources in this virtual cluster.
:vartype child_resources: list[str]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'subnet_id': {'readonly': True},
'child_resources': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'subnet_id': {'key': 'properties.subnetId', 'type': 'str'},
'family': {'key': 'properties.family', 'type': 'str'},
'child_resources': {'key': 'properties.childResources', 'type': '[str]'},
}

def __init__(self, *, location: str, tags=None, family: str=None, **kwargs) -> None:
super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs)
self.subnet_id = None
self.family = family
self.child_resources = None
49 changes: 49 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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 VirtualClusterUpdate(Model):
"""An update request for an Azure SQL Database virtual cluster.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar subnet_id: Subnet resource ID for the virtual cluster.
:vartype subnet_id: str
:param family: If the service has different generations of hardware, for
the same SKU, then that can be captured here.
:type family: str
:ivar child_resources: List of resources in this virtual cluster.
:vartype child_resources: list[str]
:param tags: Resource tags.
:type tags: dict[str, str]
"""

_validation = {
'subnet_id': {'readonly': True},
'child_resources': {'readonly': True},
}

_attribute_map = {
'subnet_id': {'key': 'properties.subnetId', 'type': 'str'},
'family': {'key': 'properties.family', 'type': 'str'},
'child_resources': {'key': 'properties.childResources', 'type': '[str]'},
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, **kwargs):
super(VirtualClusterUpdate, self).__init__(**kwargs)
self.subnet_id = None
self.family = kwargs.get('family', None)
self.child_resources = None
self.tags = kwargs.get('tags', None)
49 changes: 49 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/virtual_cluster_update_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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 VirtualClusterUpdate(Model):
"""An update request for an Azure SQL Database virtual cluster.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar subnet_id: Subnet resource ID for the virtual cluster.
:vartype subnet_id: str
:param family: If the service has different generations of hardware, for
the same SKU, then that can be captured here.
:type family: str
:ivar child_resources: List of resources in this virtual cluster.
:vartype child_resources: list[str]
:param tags: Resource tags.
:type tags: dict[str, str]
"""

_validation = {
'subnet_id': {'readonly': True},
'child_resources': {'readonly': True},
}

_attribute_map = {
'subnet_id': {'key': 'properties.subnetId', 'type': 'str'},
'family': {'key': 'properties.family', 'type': 'str'},
'child_resources': {'key': 'properties.childResources', 'type': '[str]'},
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, *, family: str=None, tags=None, **kwargs) -> None:
super(VirtualClusterUpdate, self).__init__(**kwargs)
self.subnet_id = None
self.family = family
self.child_resources = None
self.tags = tags
2 changes: 2 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from .sync_groups_operations import SyncGroupsOperations
from .sync_members_operations import SyncMembersOperations
from .subscription_usages_operations import SubscriptionUsagesOperations
from .virtual_clusters_operations import VirtualClustersOperations
from .virtual_network_rules_operations import VirtualNetworkRulesOperations
from .extended_database_blob_auditing_policies_operations import ExtendedDatabaseBlobAuditingPoliciesOperations
from .extended_server_blob_auditing_policies_operations import ExtendedServerBlobAuditingPoliciesOperations
Expand Down Expand Up @@ -123,6 +124,7 @@
'SyncGroupsOperations',
'SyncMembersOperations',
'SubscriptionUsagesOperations',
'VirtualClustersOperations',
'VirtualNetworkRulesOperations',
'ExtendedDatabaseBlobAuditingPoliciesOperations',
'ExtendedServerBlobAuditingPoliciesOperations',
Expand Down
Loading