Skip to content

Commit

Permalink
Generated from f4de45b64671c46afe8ce792c163c2dcc92f9988 (#2353)
Browse files Browse the repository at this point in the history
Undo Test
  • Loading branch information
AutorestCI authored Apr 12, 2018
1 parent 99f0b7f commit ad3279a
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 2 deletions.
3 changes: 3 additions & 0 deletions azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from .capability_py3 import Capability
from .location_py3 import Location
from .failover_policy_py3 import FailoverPolicy
from .virtual_network_rule_py3 import VirtualNetworkRule
from .database_account_py3 import DatabaseAccount
from .failover_policies_py3 import FailoverPolicies
from .resource_py3 import Resource
Expand Down Expand Up @@ -41,6 +42,7 @@
from .capability import Capability
from .location import Location
from .failover_policy import FailoverPolicy
from .virtual_network_rule import VirtualNetworkRule
from .database_account import DatabaseAccount
from .failover_policies import FailoverPolicies
from .resource import Resource
Expand Down Expand Up @@ -85,6 +87,7 @@
'Capability',
'Location',
'FailoverPolicy',
'VirtualNetworkRule',
'DatabaseAccount',
'FailoverPolicies',
'Resource',
Expand Down
11 changes: 11 additions & 0 deletions azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class DatabaseAccount(Resource):
as the allowed list of client IPs for a given database account. IP
addresses/ranges must be comma separated and must not contain any spaces.
:type ip_range_filter: str
:param is_virtual_network_filter_enabled: Flag to indicate whether to
enable/disable Virtual Network ACL rules.
:type is_virtual_network_filter_enabled: bool
:param enable_automatic_failover: Enables automatic failover of the write
region in the rare event that the region is unavailable due to an outage.
Automatic failover will result in a new write region for the account and
Expand All @@ -70,6 +73,10 @@ class DatabaseAccount(Resource):
their failover priorities.
:vartype failover_policies:
list[~azure.mgmt.cosmosdb.models.FailoverPolicy]
:param virtual_network_rules: List of Virtual Network ACL rules configured
for the Cosmos DB account.
:type virtual_network_rules:
list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule]
"""

_validation = {
Expand All @@ -95,12 +102,14 @@ class DatabaseAccount(Resource):
'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'},
'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'},
'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'},
'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'},
'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'},
'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'},
'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'},
'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'},
'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'},
'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
}

def __init__(self, **kwargs):
Expand All @@ -110,9 +119,11 @@ def __init__(self, **kwargs):
self.document_endpoint = None
self.database_account_offer_type = None
self.ip_range_filter = kwargs.get('ip_range_filter', None)
self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None)
self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None)
self.consistency_policy = kwargs.get('consistency_policy', None)
self.capabilities = kwargs.get('capabilities', None)
self.write_locations = None
self.read_locations = None
self.failover_policies = None
self.virtual_network_rules = kwargs.get('virtual_network_rules', None)
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,20 @@ class DatabaseAccountCreateUpdateParameters(Resource):
as the allowed list of client IPs for a given database account. IP
addresses/ranges must be comma separated and must not contain any spaces.
:type ip_range_filter: str
:param is_virtual_network_filter_enabled: Flag to indicate whether to
enable/disable Virtual Network ACL rules.
:type is_virtual_network_filter_enabled: bool
:param enable_automatic_failover: Enables automatic failover of the write
region in the rare event that the region is unavailable due to an outage.
Automatic failover will result in a new write region for the account and
is chosen based on the failover priorities configured for the account.
:type enable_automatic_failover: bool
:param capabilities: List of Cosmos DB capabilities for the account
:type capabilities: list[~azure.mgmt.cosmosdb.models.Capability]
:param virtual_network_rules: List of Virtual Network ACL rules configured
for the Cosmos DB account.
:type virtual_network_rules:
list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule]
"""

_validation = {
Expand All @@ -77,8 +84,10 @@ class DatabaseAccountCreateUpdateParameters(Resource):
'locations': {'key': 'properties.locations', 'type': '[Location]'},
'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'},
'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'},
'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'},
'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'},
'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
}

database_account_offer_type = "Standard"
Expand All @@ -89,5 +98,7 @@ def __init__(self, **kwargs):
self.consistency_policy = kwargs.get('consistency_policy', None)
self.locations = kwargs.get('locations', None)
self.ip_range_filter = kwargs.get('ip_range_filter', None)
self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None)
self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None)
self.capabilities = kwargs.get('capabilities', None)
self.virtual_network_rules = kwargs.get('virtual_network_rules', None)
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,20 @@ class DatabaseAccountCreateUpdateParameters(Resource):
as the allowed list of client IPs for a given database account. IP
addresses/ranges must be comma separated and must not contain any spaces.
:type ip_range_filter: str
:param is_virtual_network_filter_enabled: Flag to indicate whether to
enable/disable Virtual Network ACL rules.
:type is_virtual_network_filter_enabled: bool
:param enable_automatic_failover: Enables automatic failover of the write
region in the rare event that the region is unavailable due to an outage.
Automatic failover will result in a new write region for the account and
is chosen based on the failover priorities configured for the account.
:type enable_automatic_failover: bool
:param capabilities: List of Cosmos DB capabilities for the account
:type capabilities: list[~azure.mgmt.cosmosdb.models.Capability]
:param virtual_network_rules: List of Virtual Network ACL rules configured
for the Cosmos DB account.
:type virtual_network_rules:
list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule]
"""

_validation = {
Expand All @@ -77,17 +84,21 @@ class DatabaseAccountCreateUpdateParameters(Resource):
'locations': {'key': 'properties.locations', 'type': '[Location]'},
'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'},
'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'},
'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'},
'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'},
'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
}

database_account_offer_type = "Standard"

def __init__(self, *, location: str, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter: str=None, enable_automatic_failover: bool=None, capabilities=None, **kwargs) -> None:
def __init__(self, *, location: str, locations, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, capabilities=None, virtual_network_rules=None, **kwargs) -> None:
super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs)
self.kind = kind
self.consistency_policy = consistency_policy
self.locations = locations
self.ip_range_filter = ip_range_filter
self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled
self.enable_automatic_failover = enable_automatic_failover
self.capabilities = capabilities
self.virtual_network_rules = virtual_network_rules
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class DatabaseAccount(Resource):
as the allowed list of client IPs for a given database account. IP
addresses/ranges must be comma separated and must not contain any spaces.
:type ip_range_filter: str
:param is_virtual_network_filter_enabled: Flag to indicate whether to
enable/disable Virtual Network ACL rules.
:type is_virtual_network_filter_enabled: bool
:param enable_automatic_failover: Enables automatic failover of the write
region in the rare event that the region is unavailable due to an outage.
Automatic failover will result in a new write region for the account and
Expand All @@ -70,6 +73,10 @@ class DatabaseAccount(Resource):
their failover priorities.
:vartype failover_policies:
list[~azure.mgmt.cosmosdb.models.FailoverPolicy]
:param virtual_network_rules: List of Virtual Network ACL rules configured
for the Cosmos DB account.
:type virtual_network_rules:
list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule]
"""

_validation = {
Expand All @@ -95,24 +102,28 @@ class DatabaseAccount(Resource):
'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'},
'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'},
'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'},
'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'},
'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'},
'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'},
'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'},
'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'},
'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'},
'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
}

def __init__(self, *, location: str, tags=None, kind="GlobalDocumentDB", provisioning_state: str=None, ip_range_filter: str=None, enable_automatic_failover: bool=None, consistency_policy=None, capabilities=None, **kwargs) -> None:
def __init__(self, *, location: str, tags=None, kind="GlobalDocumentDB", provisioning_state: str=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, consistency_policy=None, capabilities=None, virtual_network_rules=None, **kwargs) -> None:
super(DatabaseAccount, self).__init__(location=location, tags=tags, **kwargs)
self.kind = kind
self.provisioning_state = provisioning_state
self.document_endpoint = None
self.database_account_offer_type = None
self.ip_range_filter = ip_range_filter
self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled
self.enable_automatic_failover = enable_automatic_failover
self.consistency_policy = consistency_policy
self.capabilities = capabilities
self.write_locations = None
self.read_locations = None
self.failover_policies = None
self.virtual_network_rules = virtual_network_rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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 VirtualNetworkRule(Model):
"""Virtual Network ACL Rule object.
:param id: Resource ID of a subnet, for example:
/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
:type id: str
"""

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

def __init__(self, **kwargs):
super(VirtualNetworkRule, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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 VirtualNetworkRule(Model):
"""Virtual Network ACL Rule object.
:param id: Resource ID of a subnet, for example:
/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
:type id: str
"""

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

def __init__(self, *, id: str=None, **kwargs) -> None:
super(VirtualNetworkRule, self).__init__(**kwargs)
self.id = id

0 comments on commit ad3279a

Please sign in to comment.