diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-cosmosdb/HISTORY.rst index 584cff5df350..acba458173bd 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/HISTORY.rst +++ b/sdk/cosmos/azure-mgmt-cosmosdb/HISTORY.rst @@ -3,6 +3,28 @@ Release History =============== +0.8.0 (2019-08-15) +++++++++++++++++++ + +**Features** + +- Model DatabaseAccount has a new parameter enable_cassandra_connector +- Model DatabaseAccount has a new parameter connector_offer +- Model DatabaseAccountCreateUpdateParameters has a new parameter enable_cassandra_connector +- Model DatabaseAccountCreateUpdateParameters has a new parameter connector_offer + +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- CosmosDB cannot be imported from `azure.mgmt.cosmosdb.cosmos_db` anymore (import from `azure.mgmt.cosmosdb` works like before) +- CosmosDBConfiguration import has been moved from `azure.mgmt.cosmosdb.cosmos_db` to `azure.mgmt.cosmosdb` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.cosmosdb.models.my_class` (import from `azure.mgmt.cosmosdb.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.cosmosdb.operations.my_class_operations` (import from `azure.mgmt.cosmosdb.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 0.7.0 (2019-06-07) ++++++++++++++++++ diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/README.rst b/sdk/cosmos/azure-mgmt-cosmosdb/README.rst index c693b9a86fbe..dbb1a219f8d0 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/README.rst +++ b/sdk/cosmos/azure-mgmt-cosmosdb/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Cosmos DB Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/__init__.py index d2464d868dc2..9edd8273e121 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .cosmos_db import CosmosDB -from .version import VERSION +from ._configuration import CosmosDBConfiguration +from ._cosmos_db import CosmosDB +__all__ = ['CosmosDB', 'CosmosDBConfiguration'] -__all__ = ['CosmosDB'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py new file mode 100644 index 000000000000..f1a57c614ec1 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py @@ -0,0 +1,48 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class CosmosDBConfiguration(AzureConfiguration): + """Configuration for CosmosDB + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(CosmosDBConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-cosmosdb/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/cosmos_db.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db.py similarity index 70% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/cosmos_db.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db.py index 0658cd74e981..eea6f9184e6d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/cosmos_db.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db.py @@ -11,54 +11,22 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.database_accounts_operations import DatabaseAccountsOperations -from .operations.operations import Operations -from .operations.database_operations import DatabaseOperations -from .operations.collection_operations import CollectionOperations -from .operations.collection_region_operations import CollectionRegionOperations -from .operations.database_account_region_operations import DatabaseAccountRegionOperations -from .operations.percentile_source_target_operations import PercentileSourceTargetOperations -from .operations.percentile_target_operations import PercentileTargetOperations -from .operations.percentile_operations import PercentileOperations -from .operations.collection_partition_region_operations import CollectionPartitionRegionOperations -from .operations.collection_partition_operations import CollectionPartitionOperations -from .operations.partition_key_range_id_operations import PartitionKeyRangeIdOperations -from .operations.partition_key_range_id_region_operations import PartitionKeyRangeIdRegionOperations -from . import models - - -class CosmosDBConfiguration(AzureConfiguration): - """Configuration for CosmosDB - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(CosmosDBConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-cosmosdb/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import CosmosDBConfiguration +from .operations import DatabaseAccountsOperations +from .operations import Operations +from .operations import DatabaseOperations +from .operations import CollectionOperations +from .operations import CollectionRegionOperations +from .operations import DatabaseAccountRegionOperations +from .operations import PercentileSourceTargetOperations +from .operations import PercentileTargetOperations +from .operations import PercentileOperations +from .operations import CollectionPartitionRegionOperations +from .operations import CollectionPartitionOperations +from .operations import PartitionKeyRangeIdOperations +from .operations import PartitionKeyRangeIdRegionOperations +from . import models class CosmosDB(SDKClient): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py index a3cc095a4f19..a7f22fd3cc55 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py @@ -10,178 +10,179 @@ # -------------------------------------------------------------------------- try: - from .consistency_policy_py3 import ConsistencyPolicy - 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 .sql_database_py3 import SqlDatabase - from .indexes_py3 import Indexes - from .included_path_py3 import IncludedPath - from .excluded_path_py3 import ExcludedPath - from .indexing_policy_py3 import IndexingPolicy - from .container_partition_key_py3 import ContainerPartitionKey - from .unique_key_py3 import UniqueKey - from .unique_key_policy_py3 import UniqueKeyPolicy - from .conflict_resolution_policy_py3 import ConflictResolutionPolicy - from .sql_container_py3 import SqlContainer - from .mongo_db_database_py3 import MongoDBDatabase - from .mongo_db_collection_py3 import MongoDBCollection - from .table_py3 import Table - from .cassandra_keyspace_py3 import CassandraKeyspace - from .cassandra_table_py3 import CassandraTable - from .gremlin_database_py3 import GremlinDatabase - from .gremlin_graph_py3 import GremlinGraph - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .failover_policies_py3 import FailoverPolicies - from .region_for_online_offline_py3 import RegionForOnlineOffline - from .resource_py3 import Resource - from .extended_resource_properties_py3 import ExtendedResourceProperties - from .throughput_py3 import Throughput - from .database_account_create_update_parameters_py3 import DatabaseAccountCreateUpdateParameters - from .database_account_patch_parameters_py3 import DatabaseAccountPatchParameters - from .database_account_list_read_only_keys_result_py3 import DatabaseAccountListReadOnlyKeysResult - from .database_account_list_keys_result_py3 import DatabaseAccountListKeysResult - from .database_account_connection_string_py3 import DatabaseAccountConnectionString - from .database_account_list_connection_strings_result_py3 import DatabaseAccountListConnectionStringsResult - from .database_account_regenerate_key_parameters_py3 import DatabaseAccountRegenerateKeyParameters - from .throughput_resource_py3 import ThroughputResource - from .throughput_update_parameters_py3 import ThroughputUpdateParameters - from .sql_database_resource_py3 import SqlDatabaseResource - from .sql_database_create_update_parameters_py3 import SqlDatabaseCreateUpdateParameters - from .sql_container_resource_py3 import SqlContainerResource - from .sql_container_create_update_parameters_py3 import SqlContainerCreateUpdateParameters - from .mongo_db_database_resource_py3 import MongoDBDatabaseResource - from .mongo_db_database_create_update_parameters_py3 import MongoDBDatabaseCreateUpdateParameters - from .mongo_index_keys_py3 import MongoIndexKeys - from .mongo_index_options_py3 import MongoIndexOptions - from .mongo_index_py3 import MongoIndex - from .mongo_db_collection_resource_py3 import MongoDBCollectionResource - from .mongo_db_collection_create_update_parameters_py3 import MongoDBCollectionCreateUpdateParameters - from .table_resource_py3 import TableResource - from .table_create_update_parameters_py3 import TableCreateUpdateParameters - from .cassandra_keyspace_resource_py3 import CassandraKeyspaceResource - from .cassandra_keyspace_create_update_parameters_py3 import CassandraKeyspaceCreateUpdateParameters - from .column_py3 import Column - from .cassandra_partition_key_py3 import CassandraPartitionKey - from .cluster_key_py3 import ClusterKey - from .cassandra_schema_py3 import CassandraSchema - from .cassandra_table_resource_py3 import CassandraTableResource - from .cassandra_table_create_update_parameters_py3 import CassandraTableCreateUpdateParameters - from .gremlin_database_resource_py3 import GremlinDatabaseResource - from .gremlin_database_create_update_parameters_py3 import GremlinDatabaseCreateUpdateParameters - from .gremlin_graph_resource_py3 import GremlinGraphResource - from .gremlin_graph_create_update_parameters_py3 import GremlinGraphCreateUpdateParameters - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .metric_name_py3 import MetricName - from .usage_py3 import Usage - from .partition_usage_py3 import PartitionUsage - from .metric_availability_py3 import MetricAvailability - from .metric_definition_py3 import MetricDefinition - from .metric_value_py3 import MetricValue - from .metric_py3 import Metric - from .percentile_metric_value_py3 import PercentileMetricValue - from .percentile_metric_py3 import PercentileMetric - from .partition_metric_py3 import PartitionMetric + from ._models_py3 import Capability + from ._models_py3 import CassandraKeyspace + from ._models_py3 import CassandraKeyspaceCreateUpdateParameters + from ._models_py3 import CassandraKeyspaceResource + from ._models_py3 import CassandraPartitionKey + from ._models_py3 import CassandraSchema + from ._models_py3 import CassandraTable + from ._models_py3 import CassandraTableCreateUpdateParameters + from ._models_py3 import CassandraTableResource + from ._models_py3 import ClusterKey + from ._models_py3 import Column + from ._models_py3 import ConflictResolutionPolicy + from ._models_py3 import ConsistencyPolicy + from ._models_py3 import ContainerPartitionKey + from ._models_py3 import DatabaseAccount + from ._models_py3 import DatabaseAccountConnectionString + from ._models_py3 import DatabaseAccountCreateUpdateParameters + from ._models_py3 import DatabaseAccountListConnectionStringsResult + from ._models_py3 import DatabaseAccountListKeysResult + from ._models_py3 import DatabaseAccountListReadOnlyKeysResult + from ._models_py3 import DatabaseAccountPatchParameters + from ._models_py3 import DatabaseAccountRegenerateKeyParameters + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ExcludedPath + from ._models_py3 import ExtendedResourceProperties + from ._models_py3 import FailoverPolicies + from ._models_py3 import FailoverPolicy + from ._models_py3 import GremlinDatabase + from ._models_py3 import GremlinDatabaseCreateUpdateParameters + from ._models_py3 import GremlinDatabaseResource + from ._models_py3 import GremlinGraph + from ._models_py3 import GremlinGraphCreateUpdateParameters + from ._models_py3 import GremlinGraphResource + from ._models_py3 import IncludedPath + from ._models_py3 import Indexes + from ._models_py3 import IndexingPolicy + from ._models_py3 import Location + from ._models_py3 import Metric + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricDefinition + from ._models_py3 import MetricName + from ._models_py3 import MetricValue + from ._models_py3 import MongoDBCollection + from ._models_py3 import MongoDBCollectionCreateUpdateParameters + from ._models_py3 import MongoDBCollectionResource + from ._models_py3 import MongoDBDatabase + from ._models_py3 import MongoDBDatabaseCreateUpdateParameters + from ._models_py3 import MongoDBDatabaseResource + from ._models_py3 import MongoIndex + from ._models_py3 import MongoIndexKeys + from ._models_py3 import MongoIndexOptions + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PartitionMetric + from ._models_py3 import PartitionUsage + from ._models_py3 import PercentileMetric + from ._models_py3 import PercentileMetricValue + from ._models_py3 import RegionForOnlineOffline + from ._models_py3 import Resource + from ._models_py3 import SqlContainer + from ._models_py3 import SqlContainerCreateUpdateParameters + from ._models_py3 import SqlContainerResource + from ._models_py3 import SqlDatabase + from ._models_py3 import SqlDatabaseCreateUpdateParameters + from ._models_py3 import SqlDatabaseResource + from ._models_py3 import Table + from ._models_py3 import TableCreateUpdateParameters + from ._models_py3 import TableResource + from ._models_py3 import Throughput + from ._models_py3 import ThroughputResource + from ._models_py3 import ThroughputUpdateParameters + from ._models_py3 import UniqueKey + from ._models_py3 import UniqueKeyPolicy + from ._models_py3 import Usage + from ._models_py3 import VirtualNetworkRule except (SyntaxError, ImportError): - from .consistency_policy import ConsistencyPolicy - 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 .sql_database import SqlDatabase - from .indexes import Indexes - from .included_path import IncludedPath - from .excluded_path import ExcludedPath - from .indexing_policy import IndexingPolicy - from .container_partition_key import ContainerPartitionKey - from .unique_key import UniqueKey - from .unique_key_policy import UniqueKeyPolicy - from .conflict_resolution_policy import ConflictResolutionPolicy - from .sql_container import SqlContainer - from .mongo_db_database import MongoDBDatabase - from .mongo_db_collection import MongoDBCollection - from .table import Table - from .cassandra_keyspace import CassandraKeyspace - from .cassandra_table import CassandraTable - from .gremlin_database import GremlinDatabase - from .gremlin_graph import GremlinGraph - from .error_response import ErrorResponse, ErrorResponseException - from .failover_policies import FailoverPolicies - from .region_for_online_offline import RegionForOnlineOffline - from .resource import Resource - from .extended_resource_properties import ExtendedResourceProperties - from .throughput import Throughput - from .database_account_create_update_parameters import DatabaseAccountCreateUpdateParameters - from .database_account_patch_parameters import DatabaseAccountPatchParameters - from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult - from .database_account_list_keys_result import DatabaseAccountListKeysResult - from .database_account_connection_string import DatabaseAccountConnectionString - from .database_account_list_connection_strings_result import DatabaseAccountListConnectionStringsResult - from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters - from .throughput_resource import ThroughputResource - from .throughput_update_parameters import ThroughputUpdateParameters - from .sql_database_resource import SqlDatabaseResource - from .sql_database_create_update_parameters import SqlDatabaseCreateUpdateParameters - from .sql_container_resource import SqlContainerResource - from .sql_container_create_update_parameters import SqlContainerCreateUpdateParameters - from .mongo_db_database_resource import MongoDBDatabaseResource - from .mongo_db_database_create_update_parameters import MongoDBDatabaseCreateUpdateParameters - from .mongo_index_keys import MongoIndexKeys - from .mongo_index_options import MongoIndexOptions - from .mongo_index import MongoIndex - from .mongo_db_collection_resource import MongoDBCollectionResource - from .mongo_db_collection_create_update_parameters import MongoDBCollectionCreateUpdateParameters - from .table_resource import TableResource - from .table_create_update_parameters import TableCreateUpdateParameters - from .cassandra_keyspace_resource import CassandraKeyspaceResource - from .cassandra_keyspace_create_update_parameters import CassandraKeyspaceCreateUpdateParameters - from .column import Column - from .cassandra_partition_key import CassandraPartitionKey - from .cluster_key import ClusterKey - from .cassandra_schema import CassandraSchema - from .cassandra_table_resource import CassandraTableResource - from .cassandra_table_create_update_parameters import CassandraTableCreateUpdateParameters - from .gremlin_database_resource import GremlinDatabaseResource - from .gremlin_database_create_update_parameters import GremlinDatabaseCreateUpdateParameters - from .gremlin_graph_resource import GremlinGraphResource - from .gremlin_graph_create_update_parameters import GremlinGraphCreateUpdateParameters - from .operation_display import OperationDisplay - from .operation import Operation - from .metric_name import MetricName - from .usage import Usage - from .partition_usage import PartitionUsage - from .metric_availability import MetricAvailability - from .metric_definition import MetricDefinition - from .metric_value import MetricValue - from .metric import Metric - from .percentile_metric_value import PercentileMetricValue - from .percentile_metric import PercentileMetric - from .partition_metric import PartitionMetric -from .database_account_paged import DatabaseAccountPaged -from .metric_paged import MetricPaged -from .usage_paged import UsagePaged -from .metric_definition_paged import MetricDefinitionPaged -from .sql_database_paged import SqlDatabasePaged -from .sql_container_paged import SqlContainerPaged -from .mongo_db_database_paged import MongoDBDatabasePaged -from .mongo_db_collection_paged import MongoDBCollectionPaged -from .table_paged import TablePaged -from .cassandra_keyspace_paged import CassandraKeyspacePaged -from .cassandra_table_paged import CassandraTablePaged -from .gremlin_database_paged import GremlinDatabasePaged -from .gremlin_graph_paged import GremlinGraphPaged -from .operation_paged import OperationPaged -from .percentile_metric_paged import PercentileMetricPaged -from .partition_metric_paged import PartitionMetricPaged -from .partition_usage_paged import PartitionUsagePaged -from .cosmos_db_enums import ( + from ._models import Capability + from ._models import CassandraKeyspace + from ._models import CassandraKeyspaceCreateUpdateParameters + from ._models import CassandraKeyspaceResource + from ._models import CassandraPartitionKey + from ._models import CassandraSchema + from ._models import CassandraTable + from ._models import CassandraTableCreateUpdateParameters + from ._models import CassandraTableResource + from ._models import ClusterKey + from ._models import Column + from ._models import ConflictResolutionPolicy + from ._models import ConsistencyPolicy + from ._models import ContainerPartitionKey + from ._models import DatabaseAccount + from ._models import DatabaseAccountConnectionString + from ._models import DatabaseAccountCreateUpdateParameters + from ._models import DatabaseAccountListConnectionStringsResult + from ._models import DatabaseAccountListKeysResult + from ._models import DatabaseAccountListReadOnlyKeysResult + from ._models import DatabaseAccountPatchParameters + from ._models import DatabaseAccountRegenerateKeyParameters + from ._models import ErrorResponse, ErrorResponseException + from ._models import ExcludedPath + from ._models import ExtendedResourceProperties + from ._models import FailoverPolicies + from ._models import FailoverPolicy + from ._models import GremlinDatabase + from ._models import GremlinDatabaseCreateUpdateParameters + from ._models import GremlinDatabaseResource + from ._models import GremlinGraph + from ._models import GremlinGraphCreateUpdateParameters + from ._models import GremlinGraphResource + from ._models import IncludedPath + from ._models import Indexes + from ._models import IndexingPolicy + from ._models import Location + from ._models import Metric + from ._models import MetricAvailability + from ._models import MetricDefinition + from ._models import MetricName + from ._models import MetricValue + from ._models import MongoDBCollection + from ._models import MongoDBCollectionCreateUpdateParameters + from ._models import MongoDBCollectionResource + from ._models import MongoDBDatabase + from ._models import MongoDBDatabaseCreateUpdateParameters + from ._models import MongoDBDatabaseResource + from ._models import MongoIndex + from ._models import MongoIndexKeys + from ._models import MongoIndexOptions + from ._models import Operation + from ._models import OperationDisplay + from ._models import PartitionMetric + from ._models import PartitionUsage + from ._models import PercentileMetric + from ._models import PercentileMetricValue + from ._models import RegionForOnlineOffline + from ._models import Resource + from ._models import SqlContainer + from ._models import SqlContainerCreateUpdateParameters + from ._models import SqlContainerResource + from ._models import SqlDatabase + from ._models import SqlDatabaseCreateUpdateParameters + from ._models import SqlDatabaseResource + from ._models import Table + from ._models import TableCreateUpdateParameters + from ._models import TableResource + from ._models import Throughput + from ._models import ThroughputResource + from ._models import ThroughputUpdateParameters + from ._models import UniqueKey + from ._models import UniqueKeyPolicy + from ._models import Usage + from ._models import VirtualNetworkRule +from ._paged_models import CassandraKeyspacePaged +from ._paged_models import CassandraTablePaged +from ._paged_models import DatabaseAccountPaged +from ._paged_models import GremlinDatabasePaged +from ._paged_models import GremlinGraphPaged +from ._paged_models import MetricDefinitionPaged +from ._paged_models import MetricPaged +from ._paged_models import MongoDBCollectionPaged +from ._paged_models import MongoDBDatabasePaged +from ._paged_models import OperationPaged +from ._paged_models import PartitionMetricPaged +from ._paged_models import PartitionUsagePaged +from ._paged_models import PercentileMetricPaged +from ._paged_models import SqlContainerPaged +from ._paged_models import SqlDatabasePaged +from ._paged_models import TablePaged +from ._paged_models import UsagePaged +from ._cosmos_db_enums import ( DatabaseAccountKind, DatabaseAccountOfferType, DefaultConsistencyLevel, + ConnectorOffer, IndexingMode, DataType, IndexKind, @@ -193,81 +194,81 @@ ) __all__ = [ - 'ConsistencyPolicy', 'Capability', - 'Location', - 'FailoverPolicy', - 'VirtualNetworkRule', - 'DatabaseAccount', - 'SqlDatabase', - 'Indexes', - 'IncludedPath', - 'ExcludedPath', - 'IndexingPolicy', - 'ContainerPartitionKey', - 'UniqueKey', - 'UniqueKeyPolicy', - 'ConflictResolutionPolicy', - 'SqlContainer', - 'MongoDBDatabase', - 'MongoDBCollection', - 'Table', 'CassandraKeyspace', - 'CassandraTable', - 'GremlinDatabase', - 'GremlinGraph', - 'ErrorResponse', 'ErrorResponseException', - 'FailoverPolicies', - 'RegionForOnlineOffline', - 'Resource', - 'ExtendedResourceProperties', - 'Throughput', - 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountPatchParameters', - 'DatabaseAccountListReadOnlyKeysResult', - 'DatabaseAccountListKeysResult', - 'DatabaseAccountConnectionString', - 'DatabaseAccountListConnectionStringsResult', - 'DatabaseAccountRegenerateKeyParameters', - 'ThroughputResource', - 'ThroughputUpdateParameters', - 'SqlDatabaseResource', - 'SqlDatabaseCreateUpdateParameters', - 'SqlContainerResource', - 'SqlContainerCreateUpdateParameters', - 'MongoDBDatabaseResource', - 'MongoDBDatabaseCreateUpdateParameters', - 'MongoIndexKeys', - 'MongoIndexOptions', - 'MongoIndex', - 'MongoDBCollectionResource', - 'MongoDBCollectionCreateUpdateParameters', - 'TableResource', - 'TableCreateUpdateParameters', - 'CassandraKeyspaceResource', 'CassandraKeyspaceCreateUpdateParameters', - 'Column', + 'CassandraKeyspaceResource', 'CassandraPartitionKey', - 'ClusterKey', 'CassandraSchema', - 'CassandraTableResource', + 'CassandraTable', 'CassandraTableCreateUpdateParameters', - 'GremlinDatabaseResource', + 'CassandraTableResource', + 'ClusterKey', + 'Column', + 'ConflictResolutionPolicy', + 'ConsistencyPolicy', + 'ContainerPartitionKey', + 'DatabaseAccount', + 'DatabaseAccountConnectionString', + 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountListConnectionStringsResult', + 'DatabaseAccountListKeysResult', + 'DatabaseAccountListReadOnlyKeysResult', + 'DatabaseAccountPatchParameters', + 'DatabaseAccountRegenerateKeyParameters', + 'ErrorResponse', 'ErrorResponseException', + 'ExcludedPath', + 'ExtendedResourceProperties', + 'FailoverPolicies', + 'FailoverPolicy', + 'GremlinDatabase', 'GremlinDatabaseCreateUpdateParameters', - 'GremlinGraphResource', + 'GremlinDatabaseResource', + 'GremlinGraph', 'GremlinGraphCreateUpdateParameters', - 'OperationDisplay', - 'Operation', - 'MetricName', - 'Usage', - 'PartitionUsage', + 'GremlinGraphResource', + 'IncludedPath', + 'Indexes', + 'IndexingPolicy', + 'Location', + 'Metric', 'MetricAvailability', 'MetricDefinition', + 'MetricName', 'MetricValue', - 'Metric', - 'PercentileMetricValue', - 'PercentileMetric', + 'MongoDBCollection', + 'MongoDBCollectionCreateUpdateParameters', + 'MongoDBCollectionResource', + 'MongoDBDatabase', + 'MongoDBDatabaseCreateUpdateParameters', + 'MongoDBDatabaseResource', + 'MongoIndex', + 'MongoIndexKeys', + 'MongoIndexOptions', + 'Operation', + 'OperationDisplay', 'PartitionMetric', + 'PartitionUsage', + 'PercentileMetric', + 'PercentileMetricValue', + 'RegionForOnlineOffline', + 'Resource', + 'SqlContainer', + 'SqlContainerCreateUpdateParameters', + 'SqlContainerResource', + 'SqlDatabase', + 'SqlDatabaseCreateUpdateParameters', + 'SqlDatabaseResource', + 'Table', + 'TableCreateUpdateParameters', + 'TableResource', + 'Throughput', + 'ThroughputResource', + 'ThroughputUpdateParameters', + 'UniqueKey', + 'UniqueKeyPolicy', + 'Usage', + 'VirtualNetworkRule', 'DatabaseAccountPaged', 'MetricPaged', 'UsagePaged', @@ -288,6 +289,7 @@ 'DatabaseAccountKind', 'DatabaseAccountOfferType', 'DefaultConsistencyLevel', + 'ConnectorOffer', 'IndexingMode', 'DataType', 'IndexKind', diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cosmos_db_enums.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_enums.py similarity index 97% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cosmos_db_enums.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_enums.py index 869a1d07777f..ae8c501d4108 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cosmos_db_enums.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_enums.py @@ -33,6 +33,11 @@ class DefaultConsistencyLevel(str, Enum): consistent_prefix = "ConsistentPrefix" +class ConnectorOffer(str, Enum): + + small = "Small" + + class IndexingMode(str, Enum): consistent = "Consistent" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py new file mode 100644 index 000000000000..62d5d9dea87f --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py @@ -0,0 +1,2733 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class Capability(Model): + """Cosmos DB capability object. + + :param name: Name of the Cosmos DB capability. For example, "name": + "EnableCassandra". Current values also include "EnableTable" and + "EnableGremlin". + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Capability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + """ + + _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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class CassandraKeyspace(Resource): + """An Azure Cosmos DB Cassandra keyspace. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param cassandra_keyspace_id: Required. Name of the Cosmos DB Cassandra + keyspace + :type cassandra_keyspace_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'cassandra_keyspace_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'cassandra_keyspace_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CassandraKeyspace, self).__init__(**kwargs) + self.cassandra_keyspace_id = kwargs.get('cassandra_keyspace_id', None) + + +class CassandraKeyspaceCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Cassandra keyspace. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Cassandra + keyspace + :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(CassandraKeyspaceCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class CassandraKeyspaceResource(Model): + """Cosmos DB Cassandra keyspace id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Cassandra keyspace + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CassandraKeyspaceResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class CassandraPartitionKey(Model): + """Cosmos DB Cassandra table partition key. + + :param name: Name of the Cosmos DB Cassandra table partition key + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CassandraPartitionKey, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CassandraSchema(Model): + """Cosmos DB Cassandra table schema. + + :param columns: List of Cassandra table columns. + :type columns: list[~azure.mgmt.cosmosdb.models.Column] + :param partition_keys: List of partition key. + :type partition_keys: + list[~azure.mgmt.cosmosdb.models.CassandraPartitionKey] + :param cluster_keys: List of cluster key. + :type cluster_keys: list[~azure.mgmt.cosmosdb.models.ClusterKey] + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[Column]'}, + 'partition_keys': {'key': 'partitionKeys', 'type': '[CassandraPartitionKey]'}, + 'cluster_keys': {'key': 'clusterKeys', 'type': '[ClusterKey]'}, + } + + def __init__(self, **kwargs): + super(CassandraSchema, self).__init__(**kwargs) + self.columns = kwargs.get('columns', None) + self.partition_keys = kwargs.get('partition_keys', None) + self.cluster_keys = kwargs.get('cluster_keys', None) + + +class CassandraTable(Resource): + """An Azure Cosmos DB Cassandra table. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param cassandra_table_id: Required. Name of the Cosmos DB Cassandra table + :type cassandra_table_id: str + :param default_ttl: Time to live of the Cosmos DB Cassandra table + :type default_ttl: int + :param schema: Schema of the Cosmos DB Cassandra table + :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'cassandra_table_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'cassandra_table_id': {'key': 'properties.id', 'type': 'str'}, + 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, + 'schema': {'key': 'properties.schema', 'type': 'CassandraSchema'}, + } + + def __init__(self, **kwargs): + super(CassandraTable, self).__init__(**kwargs) + self.cassandra_table_id = kwargs.get('cassandra_table_id', None) + self.default_ttl = kwargs.get('default_ttl', None) + self.schema = kwargs.get('schema', None) + + +class CassandraTableCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Cassandra table. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Cassandra table + :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(CassandraTableCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class CassandraTableResource(Model): + """Cosmos DB Cassandra table id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Cassandra table + :type id: str + :param default_ttl: Time to live of the Cosmos DB Cassandra table + :type default_ttl: int + :param schema: Schema of the Cosmos DB Cassandra table + :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, + 'schema': {'key': 'schema', 'type': 'CassandraSchema'}, + } + + def __init__(self, **kwargs): + super(CassandraTableResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.default_ttl = kwargs.get('default_ttl', None) + self.schema = kwargs.get('schema', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ClusterKey(Model): + """Cosmos DB Cassandra table cluster key. + + :param name: Name of the Cosmos DB Cassandra table cluster key + :type name: str + :param order_by: Order of the Cosmos DB Cassandra table cluster key, only + support "Asc" and "Desc" + :type order_by: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterKey, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.order_by = kwargs.get('order_by', None) + + +class Column(Model): + """Cosmos DB Cassandra table column. + + :param name: Name of the Cosmos DB Cassandra table column + :type name: str + :param type: Type of the Cosmos DB Cassandra table column + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Column, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class ConflictResolutionPolicy(Model): + """The conflict resolution policy for the container. + + :param mode: Indicates the conflict resolution mode. Possible values + include: 'LastWriterWins', 'Custom'. Default value: "LastWriterWins" . + :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode + :param conflict_resolution_path: The conflict resolution path in the case + of LastWriterWins mode. + :type conflict_resolution_path: str + :param conflict_resolution_procedure: The procedure to resolve conflicts + in the case of custom mode. + :type conflict_resolution_procedure: str + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, + 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConflictResolutionPolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', "LastWriterWins") + self.conflict_resolution_path = kwargs.get('conflict_resolution_path', None) + self.conflict_resolution_procedure = kwargs.get('conflict_resolution_procedure', None) + + +class ConsistencyPolicy(Model): + """The consistency policy for the Cosmos DB database account. + + All required parameters must be populated in order to send to Azure. + + :param default_consistency_level: Required. The default consistency level + and configuration settings of the Cosmos DB account. Possible values + include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', + 'ConsistentPrefix' + :type default_consistency_level: str or + ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 5 - 86400. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ConsistencyPolicy, self).__init__(**kwargs) + self.default_consistency_level = kwargs.get('default_consistency_level', None) + self.max_staleness_prefix = kwargs.get('max_staleness_prefix', None) + self.max_interval_in_seconds = kwargs.get('max_interval_in_seconds', None) + + +class ContainerPartitionKey(Model): + """The configuration of the partition key to be used for partitioning data + into multiple partitions. + + :param paths: List of paths using which data within the container can be + partitioned + :type paths: list[str] + :param kind: Indicates the kind of algorithm used for partitioning. + Possible values include: 'Hash', 'Range'. Default value: "Hash" . + :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind + """ + + _attribute_map = { + 'paths': {'key': 'paths', 'type': '[str]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerPartitionKey, self).__init__(**kwargs) + self.paths = kwargs.get('paths', None) + self.kind = kwargs.get('kind', "Hash") + + +class DatabaseAccount(Resource): + """An Azure Cosmos DB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the Cosmos DB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the Cosmos DB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + ~azure.mgmt.cosmosdb.models.DatabaseAccountOfferType + :param ip_range_filter: Cosmos DB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + 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 consistency_policy: The consistency policy for the Cosmos DB + database account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param capabilities: List of Cosmos DB capabilities for the account + :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :ivar write_locations: An array that contains the write location for the + Cosmos DB account. + :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar read_locations: An array that contains of the read locations enabled + for the Cosmos DB account. + :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar failover_policies: An array that contains the regions ordered by + 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] + :param enable_multiple_write_locations: Enables the account to write in + multiple locations + :type enable_multiple_write_locations: bool + :param enable_cassandra_connector: Enables the cassandra connector on the + Cosmos DB C* account + :type enable_cassandra_connector: bool + :param connector_offer: The cassandra connector offer type for the Cosmos + DB database C* account. Possible values include: 'Small' + :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'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}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + '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]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseAccount, self).__init__(**kwargs) + self.kind = kwargs.get('kind', "GlobalDocumentDB") + self.provisioning_state = kwargs.get('provisioning_state', None) + 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) + self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) + self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) + self.connector_offer = kwargs.get('connector_offer', None) + + +class DatabaseAccountConnectionString(Model): + """Connection string for the Cosmos DB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseAccountConnectionString, self).__init__(**kwargs) + self.connection_string = None + self.description = None + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update Cosmos DB database accounts. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param consistency_policy: The consistency policy for the Cosmos DB + account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: Required. An array that contains the georeplication + locations enabled for the Cosmos DB account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar database_account_offer_type: Required. The offer type for the + database. Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: Cosmos DB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + 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] + :param enable_multiple_write_locations: Enables the account to write in + multiple locations + :type enable_multiple_write_locations: bool + :param enable_cassandra_connector: Enables the cassandra connector on the + Cosmos DB C* account + :type enable_cassandra_connector: bool + :param connector_offer: The cassandra connector offer type for the Cosmos + DB database C* account. Possible values include: 'Small' + :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': 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}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + '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]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, **kwargs): + super(DatabaseAccountCreateUpdateParameters, self).__init__(**kwargs) + self.kind = kwargs.get('kind', "GlobalDocumentDB") + 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) + self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) + self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) + self.connector_offer = kwargs.get('connector_offer', None) + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the Cosmos DB account. + :type connection_strings: + list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, **kwargs): + super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) + self.connection_strings = kwargs.get('connection_strings', None) + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None + + +class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseAccountListKeysResult, self).__init__(**kwargs) + self.primary_master_key = None + self.secondary_master_key = None + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure Cosmos DB database account properties. + + :param tags: + :type tags: dict[str, str] + :param capabilities: List of Cosmos DB capabilities for the account + :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + } + + def __init__(self, **kwargs): + super(DatabaseAccountPatchParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.capabilities = kwargs.get('capabilities', None) + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + All required parameters must be populated in order to send to Azure. + + :param key_kind: Required. The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_kind = kwargs.get('key_kind', None) + + +class ErrorResponse(Model): + """Error Response. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ExcludedPath(Model): + """ExcludedPath. + + :param path: The path for which the indexing behavior applies to. Index + paths typically start with root and end with wildcard (/path/*) + :type path: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExcludedPath, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + + +class ExtendedResourceProperties(Model): + """The system generated resource properties associated with SQL databases and + SQL containers. + + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + """ + + _attribute_map = { + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExtendedResourceProperties, self).__init__(**kwargs) + self._rid = kwargs.get('_rid', None) + self._ts = kwargs.get('_ts', None) + self._etag = kwargs.get('_etag', None) + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + All required parameters must be populated in order to send to Azure. + + :param failover_policies: Required. List of failover policies. + :type failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] + """ + + _validation = { + 'failover_policies': {'required': True}, + } + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, **kwargs): + super(FailoverPolicies, self).__init__(**kwargs) + self.failover_policies = kwargs.get('failover_policies', None) + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FailoverPolicy, self).__init__(**kwargs) + self.id = None + self.location_name = kwargs.get('location_name', None) + self.failover_priority = kwargs.get('failover_priority', None) + + +class GremlinDatabase(Resource): + """An Azure Cosmos DB Gremlin database. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param gremlin_database_id: Required. Name of the Cosmos DB Gremlin + database + :type gremlin_database_id: str + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'gremlin_database_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'gremlin_database_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GremlinDatabase, self).__init__(**kwargs) + self.gremlin_database_id = kwargs.get('gremlin_database_id', None) + self._rid = kwargs.get('_rid', None) + self._ts = kwargs.get('_ts', None) + self._etag = kwargs.get('_etag', None) + + +class GremlinDatabaseCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Gremlin database. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Gremlin database + :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(GremlinDatabaseCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class GremlinDatabaseResource(Model): + """Cosmos DB Gremlin database id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Gremlin database + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GremlinDatabaseResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class GremlinGraph(Resource): + """An Azure Cosmos DB Gremlin graph. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param gremlin_graph_id: Required. Name of the Cosmos DB Gremlin graph + :type gremlin_graph_id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the graph + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + graph. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'gremlin_graph_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'gremlin_graph_id': {'key': 'properties.id', 'type': 'str'}, + 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GremlinGraph, self).__init__(**kwargs) + self.gremlin_graph_id = kwargs.get('gremlin_graph_id', None) + self.indexing_policy = kwargs.get('indexing_policy', None) + self.partition_key = kwargs.get('partition_key', None) + self.default_ttl = kwargs.get('default_ttl', None) + self.unique_key_policy = kwargs.get('unique_key_policy', None) + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) + self._rid = kwargs.get('_rid', None) + self._ts = kwargs.get('_ts', None) + self._etag = kwargs.get('_etag', None) + + +class GremlinGraphCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Gremlin graph. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Gremlin graph + :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class GremlinGraphResource(Model): + """Cosmos DB Gremlin graph resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Gremlin graph + :type id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the graph + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + graph. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + } + + def __init__(self, **kwargs): + super(GremlinGraphResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.indexing_policy = kwargs.get('indexing_policy', None) + self.partition_key = kwargs.get('partition_key', None) + self.default_ttl = kwargs.get('default_ttl', None) + self.unique_key_policy = kwargs.get('unique_key_policy', None) + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) + + +class IncludedPath(Model): + """The paths that are included in indexing. + + :param path: The path for which the indexing behavior applies to. Index + paths typically start with root and end with wildcard (/path/*) + :type path: str + :param indexes: List of indexes for this path + :type indexes: list[~azure.mgmt.cosmosdb.models.Indexes] + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'indexes': {'key': 'indexes', 'type': '[Indexes]'}, + } + + def __init__(self, **kwargs): + super(IncludedPath, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.indexes = kwargs.get('indexes', None) + + +class Indexes(Model): + """The indexes for the path. + + :param data_type: The datatype for which the indexing behavior is applied + to. Possible values include: 'String', 'Number', 'Point', 'Polygon', + 'LineString', 'MultiPolygon'. Default value: "String" . + :type data_type: str or ~azure.mgmt.cosmosdb.models.DataType + :param precision: The precision of the index. -1 is maximum precision. + :type precision: int + :param kind: Indicates the type of index. Possible values include: 'Hash', + 'Range', 'Spatial'. Default value: "Hash" . + :type kind: str or ~azure.mgmt.cosmosdb.models.IndexKind + """ + + _attribute_map = { + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'precision': {'key': 'precision', 'type': 'int'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Indexes, self).__init__(**kwargs) + self.data_type = kwargs.get('data_type', "String") + self.precision = kwargs.get('precision', None) + self.kind = kwargs.get('kind', "Hash") + + +class IndexingPolicy(Model): + """Cosmos DB indexing policy. + + :param automatic: Indicates if the indexing policy is automatic + :type automatic: bool + :param indexing_mode: Indicates the indexing mode. Possible values + include: 'Consistent', 'Lazy', 'None'. Default value: "Consistent" . + :type indexing_mode: str or ~azure.mgmt.cosmosdb.models.IndexingMode + :param included_paths: List of paths to include in the indexing + :type included_paths: list[~azure.mgmt.cosmosdb.models.IncludedPath] + :param excluded_paths: List of paths to exclude from indexing + :type excluded_paths: list[~azure.mgmt.cosmosdb.models.ExcludedPath] + """ + + _attribute_map = { + 'automatic': {'key': 'automatic', 'type': 'bool'}, + 'indexing_mode': {'key': 'indexingMode', 'type': 'str'}, + 'included_paths': {'key': 'includedPaths', 'type': '[IncludedPath]'}, + 'excluded_paths': {'key': 'excludedPaths', 'type': '[ExcludedPath]'}, + } + + def __init__(self, **kwargs): + super(IndexingPolicy, self).__init__(**kwargs) + self.automatic = kwargs.get('automatic', None) + self.indexing_mode = kwargs.get('indexing_mode', "Consistent") + self.included_paths = kwargs.get('included_paths', None) + self.excluded_paths = kwargs.get('excluded_paths', None) + + +class Location(Model): + """A region in which the Azure Cosmos DB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + :param is_zone_redundant: Flag to indicate whether or not this region is + an AvailabilityZone region + :type is_zone_redundant: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + 'is_zone_redundant': {'key': 'isZoneRedundant', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Location, self).__init__(**kwargs) + self.id = None + self.location_name = kwargs.get('location_name', None) + self.document_endpoint = None + self.provisioning_state = kwargs.get('provisioning_state', None) + self.failover_priority = kwargs.get('failover_priority', None) + self.is_zone_redundant = kwargs.get('is_zone_redundant', None) + + +class Metric(Model): + """Metric data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time grain to be used to summarize the metric + values. + :vartype time_grain: str + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.cosmosdb.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, **kwargs): + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = kwargs.get('unit', None) + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """The availability of the metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time_grain: The time grain to be used to summarize the metric + values. + :vartype time_grain: str + :ivar retention: The retention for the metric values. + :vartype retention: str + """ + + _validation = { + 'time_grain': {'readonly': True}, + 'retention': {'readonly': True}, + } + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = None + self.retention = None + + +class MetricDefinition(Model): + """The definition of a metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar metric_availabilities: The list of metric availabilities for the + account. + :vartype metric_availabilities: + list[~azure.mgmt.cosmosdb.models.MetricAvailability] + :ivar primary_aggregation_type: The primary aggregation type of the + metric. Possible values include: 'None', 'Average', 'Total', 'Minimimum', + 'Maximum', 'Last' + :vartype primary_aggregation_type: str or + ~azure.mgmt.cosmosdb.models.PrimaryAggregationType + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + """ + + _validation = { + 'metric_availabilities': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + } + + def __init__(self, **kwargs): + super(MetricDefinition, self).__init__(**kwargs) + self.metric_availabilities = None + self.primary_aggregation_type = None + self.unit = kwargs.get('unit', None) + self.resource_uri = None + self.name = None + + +class MetricName(Model): + """A metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the metric. + :vartype value: str + :ivar localized_value: The friendly name of the metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents metrics values. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar _count: The number of values for the metric. + :vartype _count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + '_count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + '_count': {'key': '_count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(MetricValue, self).__init__(**kwargs) + self._count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class MongoDBCollection(Resource): + """An Azure Cosmos DB MongoDB collection. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param mongo_db_collection_id: Required. Name of the Cosmos DB MongoDB + collection + :type mongo_db_collection_id: str + :param shard_key: A key-value pair of shard keys to be applied for the + request. + :type shard_key: dict[str, str] + :param indexes: List of index keys + :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'mongo_db_collection_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'mongo_db_collection_id': {'key': 'properties.id', 'type': 'str'}, + 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, + 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, + } + + def __init__(self, **kwargs): + super(MongoDBCollection, self).__init__(**kwargs) + self.mongo_db_collection_id = kwargs.get('mongo_db_collection_id', None) + self.shard_key = kwargs.get('shard_key', None) + self.indexes = kwargs.get('indexes', None) + + +class MongoDBCollectionCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB MongoDB collection. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a MongoDB + collection + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MongoDBCollectionCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class MongoDBCollectionResource(Model): + """Cosmos DB MongoDB collection resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB MongoDB collection + :type id: str + :param shard_key: A key-value pair of shard keys to be applied for the + request. + :type shard_key: dict[str, str] + :param indexes: List of index keys + :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'shard_key': {'key': 'shardKey', 'type': '{str}'}, + 'indexes': {'key': 'indexes', 'type': '[MongoIndex]'}, + } + + def __init__(self, **kwargs): + super(MongoDBCollectionResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.shard_key = kwargs.get('shard_key', None) + self.indexes = kwargs.get('indexes', None) + + +class MongoDBDatabase(Resource): + """An Azure Cosmos DB MongoDB database. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param mongo_db_database_id: Required. Name of the Cosmos DB MongoDB + database + :type mongo_db_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'mongo_db_database_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'mongo_db_database_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MongoDBDatabase, self).__init__(**kwargs) + self.mongo_db_database_id = kwargs.get('mongo_db_database_id', None) + + +class MongoDBDatabaseCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB MongoDB database. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a MongoDB database + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MongoDBDatabaseCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class MongoDBDatabaseResource(Model): + """Cosmos DB MongoDB database id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB MongoDB database + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MongoDBDatabaseResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class MongoIndex(Model): + """Cosmos DB MongoDB collection index key. + + :param key: Cosmos DB MongoDB collection index keys + :type key: ~azure.mgmt.cosmosdb.models.MongoIndexKeys + :param options: Cosmos DB MongoDB collection index key options + :type options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'MongoIndexKeys'}, + 'options': {'key': 'options', 'type': 'MongoIndexOptions'}, + } + + def __init__(self, **kwargs): + super(MongoIndex, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.options = kwargs.get('options', None) + + +class MongoIndexKeys(Model): + """Cosmos DB MongoDB collection resource object. + + :param keys: List of keys for each MongoDB collection in the Azure Cosmos + DB service + :type keys: list[str] + """ + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(MongoIndexKeys, self).__init__(**kwargs) + self.keys = kwargs.get('keys', None) + + +class MongoIndexOptions(Model): + """Cosmos DB MongoDB collection index options. + + :param expire_after_seconds: Expire after seconds + :type expire_after_seconds: int + :param unique: Is unique or not + :type unique: bool + """ + + _attribute_map = { + 'expire_after_seconds': {'key': 'expireAfterSeconds', 'type': 'int'}, + 'unique': {'key': 'unique', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MongoIndexOptions, self).__init__(**kwargs) + self.expire_after_seconds = kwargs.get('expire_after_seconds', None) + self.unique = kwargs.get('unique', None) + + +class Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.cosmosdb.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.ResourceProvider + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'Provider', 'type': 'str'}, + 'resource': {'key': 'Resource', 'type': 'str'}, + 'operation': {'key': 'Operation', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class PartitionMetric(Metric): + """The metric values for a single partition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time grain to be used to summarize the metric + values. + :vartype time_grain: str + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.cosmosdb.models.MetricValue] + :ivar partition_id: The partition id (GUID identifier) of the metric + values. + :vartype partition_id: str + :ivar partition_key_range_id: The partition key range id (integer + identifier) of the metric values. + :vartype partition_key_range_id: str + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + 'partition_id': {'readonly': True}, + 'partition_key_range_id': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + 'partition_id': {'key': 'partitionId', 'type': 'str'}, + 'partition_key_range_id': {'key': 'partitionKeyRangeId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartitionMetric, self).__init__(**kwargs) + self.partition_id = None + self.partition_key_range_id = None + + +class Usage(Model): + """The usage data for a usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + :ivar quota_period: The quota period used to summarize the usage values. + :vartype quota_period: str + :ivar limit: Maximum value for this metric + :vartype limit: long + :ivar current_value: Current value for this metric + :vartype current_value: long + """ + + _validation = { + 'name': {'readonly': True}, + 'quota_period': {'readonly': True}, + 'limit': {'readonly': True}, + 'current_value': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.unit = kwargs.get('unit', None) + self.name = None + self.quota_period = None + self.limit = None + self.current_value = None + + +class PartitionUsage(Usage): + """The partition level usage data for a usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + :ivar quota_period: The quota period used to summarize the usage values. + :vartype quota_period: str + :ivar limit: Maximum value for this metric + :vartype limit: long + :ivar current_value: Current value for this metric + :vartype current_value: long + :ivar partition_id: The partition id (GUID identifier) of the usages. + :vartype partition_id: str + :ivar partition_key_range_id: The partition key range id (integer + identifier) of the usages. + :vartype partition_key_range_id: str + """ + + _validation = { + 'name': {'readonly': True}, + 'quota_period': {'readonly': True}, + 'limit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'partition_id': {'readonly': True}, + 'partition_key_range_id': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'partition_id': {'key': 'partitionId', 'type': 'str'}, + 'partition_key_range_id': {'key': 'partitionKeyRangeId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartitionUsage, self).__init__(**kwargs) + self.partition_id = None + self.partition_key_range_id = None + + +class PercentileMetric(Model): + """Percentile Metric data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time grain to be used to summarize the metric + values. + :vartype time_grain: str + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + :ivar metric_values: The percentile metric values for the specified time + window and timestep. + :vartype metric_values: + list[~azure.mgmt.cosmosdb.models.PercentileMetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[PercentileMetricValue]'}, + } + + def __init__(self, **kwargs): + super(PercentileMetric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = kwargs.get('unit', None) + self.name = None + self.metric_values = None + + +class PercentileMetricValue(MetricValue): + """Represents percentile metrics values. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar _count: The number of values for the metric. + :vartype _count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + :ivar p10: The 10th percentile value for the metric. + :vartype p10: float + :ivar p25: The 25th percentile value for the metric. + :vartype p25: float + :ivar p50: The 50th percentile value for the metric. + :vartype p50: float + :ivar p75: The 75th percentile value for the metric. + :vartype p75: float + :ivar p90: The 90th percentile value for the metric. + :vartype p90: float + :ivar p95: The 95th percentile value for the metric. + :vartype p95: float + :ivar p99: The 99th percentile value for the metric. + :vartype p99: float + """ + + _validation = { + '_count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + 'p10': {'readonly': True}, + 'p25': {'readonly': True}, + 'p50': {'readonly': True}, + 'p75': {'readonly': True}, + 'p90': {'readonly': True}, + 'p95': {'readonly': True}, + 'p99': {'readonly': True}, + } + + _attribute_map = { + '_count': {'key': '_count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + 'p10': {'key': 'P10', 'type': 'float'}, + 'p25': {'key': 'P25', 'type': 'float'}, + 'p50': {'key': 'P50', 'type': 'float'}, + 'p75': {'key': 'P75', 'type': 'float'}, + 'p90': {'key': 'P90', 'type': 'float'}, + 'p95': {'key': 'P95', 'type': 'float'}, + 'p99': {'key': 'P99', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(PercentileMetricValue, self).__init__(**kwargs) + self.p10 = None + self.p25 = None + self.p50 = None + self.p75 = None + self.p90 = None + self.p95 = None + self.p99 = None + + +class RegionForOnlineOffline(Model): + """Cosmos DB region to online or offline. + + All required parameters must be populated in order to send to Azure. + + :param region: Required. Cosmos DB region, with spaces between words and + each word capitalized. + :type region: str + """ + + _validation = { + 'region': {'required': True}, + } + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegionForOnlineOffline, self).__init__(**kwargs) + self.region = kwargs.get('region', None) + + +class SqlContainer(Resource): + """An Azure Cosmos DB container. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param sql_container_id: Required. Name of the Cosmos DB SQL container + :type sql_container_id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the + container + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + container. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sql_container_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sql_container_id': {'key': 'properties.id', 'type': 'str'}, + 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlContainer, self).__init__(**kwargs) + self.sql_container_id = kwargs.get('sql_container_id', None) + self.indexing_policy = kwargs.get('indexing_policy', None) + self.partition_key = kwargs.get('partition_key', None) + self.default_ttl = kwargs.get('default_ttl', None) + self.unique_key_policy = kwargs.get('unique_key_policy', None) + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) + self._rid = kwargs.get('_rid', None) + self._ts = kwargs.get('_ts', None) + self._etag = kwargs.get('_etag', None) + + +class SqlContainerCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB container. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a container + :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(SqlContainerCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class SqlContainerResource(Model): + """Cosmos DB SQL container resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB SQL container + :type id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the + container + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + container. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + } + + def __init__(self, **kwargs): + super(SqlContainerResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.indexing_policy = kwargs.get('indexing_policy', None) + self.partition_key = kwargs.get('partition_key', None) + self.default_ttl = kwargs.get('default_ttl', None) + self.unique_key_policy = kwargs.get('unique_key_policy', None) + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) + + +class SqlDatabase(Resource): + """An Azure Cosmos DB SQL database. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param sql_database_id: Required. Name of the Cosmos DB SQL database + :type sql_database_id: str + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + :param _colls: A system generated property that specified the addressable + path of the collections resource. + :type _colls: str + :param _users: A system generated property that specifies the addressable + path of the users resource. + :type _users: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sql_database_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sql_database_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + '_colls': {'key': 'properties._colls', 'type': 'str'}, + '_users': {'key': 'properties._users', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlDatabase, self).__init__(**kwargs) + self.sql_database_id = kwargs.get('sql_database_id', None) + self._rid = kwargs.get('_rid', None) + self._ts = kwargs.get('_ts', None) + self._etag = kwargs.get('_etag', None) + self._colls = kwargs.get('_colls', None) + self._users = kwargs.get('_users', None) + + +class SqlDatabaseCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB SQL database. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a SQL database + :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(SqlDatabaseCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class SqlDatabaseResource(Model): + """Cosmos DB SQL database id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB SQL database + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlDatabaseResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class Table(Resource): + """An Azure Cosmos DB Table. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param table_id: Required. Name of the Cosmos DB table + :type table_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'table_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'table_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Table, self).__init__(**kwargs) + self.table_id = kwargs.get('table_id', None) + + +class TableCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Table. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Table + :type resource: ~azure.mgmt.cosmosdb.models.TableResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TableCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class TableResource(Model): + """Cosmos DB table id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB table + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TableResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class Throughput(Resource): + """An Azure Cosmos DB resource throughput. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param throughput: Required. Value of the Cosmos DB resource throughput + :type throughput: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'throughput': {'required': 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}'}, + 'throughput': {'key': 'properties.throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Throughput, self).__init__(**kwargs) + self.throughput = kwargs.get('throughput', None) + + +class ThroughputResource(Model): + """Cosmos DB resource throughput object. + + All required parameters must be populated in order to send to Azure. + + :param throughput: Required. Value of the Cosmos DB resource throughput + :type throughput: int + """ + + _validation = { + 'throughput': {'required': True}, + } + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ThroughputResource, self).__init__(**kwargs) + self.throughput = kwargs.get('throughput', None) + + +class ThroughputUpdateParameters(Model): + """Parameters to update Cosmos DB resource throughput. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a resource + throughput + :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource + """ + + _validation = { + 'resource': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'ThroughputResource'}, + } + + def __init__(self, **kwargs): + super(ThroughputUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + + +class UniqueKey(Model): + """The unique key on that enforces uniqueness constraint on documents in the + collection in the Azure Cosmos DB service. + + :param paths: List of paths must be unique for each document in the Azure + Cosmos DB service + :type paths: list[str] + """ + + _attribute_map = { + 'paths': {'key': 'paths', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UniqueKey, self).__init__(**kwargs) + self.paths = kwargs.get('paths', None) + + +class UniqueKeyPolicy(Model): + """The unique key policy configuration for specifying uniqueness constraints + on documents in the collection in the Azure Cosmos DB service. + + :param unique_keys: List of unique keys on that enforces uniqueness + constraint on documents in the collection in the Azure Cosmos DB service. + :type unique_keys: list[~azure.mgmt.cosmosdb.models.UniqueKey] + """ + + _attribute_map = { + 'unique_keys': {'key': 'uniqueKeys', 'type': '[UniqueKey]'}, + } + + def __init__(self, **kwargs): + super(UniqueKeyPolicy, self).__init__(**kwargs) + self.unique_keys = kwargs.get('unique_keys', None) + + +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 + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVNetServiceEndpoint', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py new file mode 100644 index 000000000000..a42d3f576f56 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py @@ -0,0 +1,2733 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class Capability(Model): + """Cosmos DB capability object. + + :param name: Name of the Cosmos DB capability. For example, "name": + "EnableCassandra". Current values also include "EnableTable" and + "EnableGremlin". + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(Capability, self).__init__(**kwargs) + self.name = name + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + """ + + _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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class CassandraKeyspace(Resource): + """An Azure Cosmos DB Cassandra keyspace. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param cassandra_keyspace_id: Required. Name of the Cosmos DB Cassandra + keyspace + :type cassandra_keyspace_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'cassandra_keyspace_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'cassandra_keyspace_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, cassandra_keyspace_id: str, location: str=None, tags=None, **kwargs) -> None: + super(CassandraKeyspace, self).__init__(location=location, tags=tags, **kwargs) + self.cassandra_keyspace_id = cassandra_keyspace_id + + +class CassandraKeyspaceCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Cassandra keyspace. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Cassandra + keyspace + :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, **kwargs) -> None: + super(CassandraKeyspaceCreateUpdateParameters, self).__init__(**kwargs) + self.resource = resource + self.options = options + + +class CassandraKeyspaceResource(Model): + """Cosmos DB Cassandra keyspace id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Cassandra keyspace + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(CassandraKeyspaceResource, self).__init__(**kwargs) + self.id = id + + +class CassandraPartitionKey(Model): + """Cosmos DB Cassandra table partition key. + + :param name: Name of the Cosmos DB Cassandra table partition key + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(CassandraPartitionKey, self).__init__(**kwargs) + self.name = name + + +class CassandraSchema(Model): + """Cosmos DB Cassandra table schema. + + :param columns: List of Cassandra table columns. + :type columns: list[~azure.mgmt.cosmosdb.models.Column] + :param partition_keys: List of partition key. + :type partition_keys: + list[~azure.mgmt.cosmosdb.models.CassandraPartitionKey] + :param cluster_keys: List of cluster key. + :type cluster_keys: list[~azure.mgmt.cosmosdb.models.ClusterKey] + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[Column]'}, + 'partition_keys': {'key': 'partitionKeys', 'type': '[CassandraPartitionKey]'}, + 'cluster_keys': {'key': 'clusterKeys', 'type': '[ClusterKey]'}, + } + + def __init__(self, *, columns=None, partition_keys=None, cluster_keys=None, **kwargs) -> None: + super(CassandraSchema, self).__init__(**kwargs) + self.columns = columns + self.partition_keys = partition_keys + self.cluster_keys = cluster_keys + + +class CassandraTable(Resource): + """An Azure Cosmos DB Cassandra table. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param cassandra_table_id: Required. Name of the Cosmos DB Cassandra table + :type cassandra_table_id: str + :param default_ttl: Time to live of the Cosmos DB Cassandra table + :type default_ttl: int + :param schema: Schema of the Cosmos DB Cassandra table + :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'cassandra_table_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'cassandra_table_id': {'key': 'properties.id', 'type': 'str'}, + 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, + 'schema': {'key': 'properties.schema', 'type': 'CassandraSchema'}, + } + + def __init__(self, *, cassandra_table_id: str, location: str=None, tags=None, default_ttl: int=None, schema=None, **kwargs) -> None: + super(CassandraTable, self).__init__(location=location, tags=tags, **kwargs) + self.cassandra_table_id = cassandra_table_id + self.default_ttl = default_ttl + self.schema = schema + + +class CassandraTableCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Cassandra table. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Cassandra table + :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, **kwargs) -> None: + super(CassandraTableCreateUpdateParameters, self).__init__(**kwargs) + self.resource = resource + self.options = options + + +class CassandraTableResource(Model): + """Cosmos DB Cassandra table id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Cassandra table + :type id: str + :param default_ttl: Time to live of the Cosmos DB Cassandra table + :type default_ttl: int + :param schema: Schema of the Cosmos DB Cassandra table + :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, + 'schema': {'key': 'schema', 'type': 'CassandraSchema'}, + } + + def __init__(self, *, id: str, default_ttl: int=None, schema=None, **kwargs) -> None: + super(CassandraTableResource, self).__init__(**kwargs) + self.id = id + self.default_ttl = default_ttl + self.schema = schema + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ClusterKey(Model): + """Cosmos DB Cassandra table cluster key. + + :param name: Name of the Cosmos DB Cassandra table cluster key + :type name: str + :param order_by: Order of the Cosmos DB Cassandra table cluster key, only + support "Asc" and "Desc" + :type order_by: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, order_by: str=None, **kwargs) -> None: + super(ClusterKey, self).__init__(**kwargs) + self.name = name + self.order_by = order_by + + +class Column(Model): + """Cosmos DB Cassandra table column. + + :param name: Name of the Cosmos DB Cassandra table column + :type name: str + :param type: Type of the Cosmos DB Cassandra table column + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: + super(Column, self).__init__(**kwargs) + self.name = name + self.type = type + + +class ConflictResolutionPolicy(Model): + """The conflict resolution policy for the container. + + :param mode: Indicates the conflict resolution mode. Possible values + include: 'LastWriterWins', 'Custom'. Default value: "LastWriterWins" . + :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode + :param conflict_resolution_path: The conflict resolution path in the case + of LastWriterWins mode. + :type conflict_resolution_path: str + :param conflict_resolution_procedure: The procedure to resolve conflicts + in the case of custom mode. + :type conflict_resolution_procedure: str + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, + 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, + } + + def __init__(self, *, mode="LastWriterWins", conflict_resolution_path: str=None, conflict_resolution_procedure: str=None, **kwargs) -> None: + super(ConflictResolutionPolicy, self).__init__(**kwargs) + self.mode = mode + self.conflict_resolution_path = conflict_resolution_path + self.conflict_resolution_procedure = conflict_resolution_procedure + + +class ConsistencyPolicy(Model): + """The consistency policy for the Cosmos DB database account. + + All required parameters must be populated in order to send to Azure. + + :param default_consistency_level: Required. The default consistency level + and configuration settings of the Cosmos DB account. Possible values + include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', + 'ConsistentPrefix' + :type default_consistency_level: str or + ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel + :param max_staleness_prefix: When used with the Bounded Staleness + consistency level, this value represents the number of stale requests + tolerated. Accepted range for this value is 1 – 2,147,483,647. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness + consistency level, this value represents the time amount of staleness (in + seconds) tolerated. Accepted range for this value is 5 - 86400. Required + when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, *, default_consistency_level, max_staleness_prefix: int=None, max_interval_in_seconds: int=None, **kwargs) -> None: + super(ConsistencyPolicy, self).__init__(**kwargs) + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds + + +class ContainerPartitionKey(Model): + """The configuration of the partition key to be used for partitioning data + into multiple partitions. + + :param paths: List of paths using which data within the container can be + partitioned + :type paths: list[str] + :param kind: Indicates the kind of algorithm used for partitioning. + Possible values include: 'Hash', 'Range'. Default value: "Hash" . + :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind + """ + + _attribute_map = { + 'paths': {'key': 'paths', 'type': '[str]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, paths=None, kind="Hash", **kwargs) -> None: + super(ContainerPartitionKey, self).__init__(**kwargs) + self.paths = paths + self.kind = kind + + +class DatabaseAccount(Resource): + """An Azure Cosmos DB database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the Cosmos DB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the Cosmos DB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + ~azure.mgmt.cosmosdb.models.DatabaseAccountOfferType + :param ip_range_filter: Cosmos DB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + 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 consistency_policy: The consistency policy for the Cosmos DB + database account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param capabilities: List of Cosmos DB capabilities for the account + :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :ivar write_locations: An array that contains the write location for the + Cosmos DB account. + :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar read_locations: An array that contains of the read locations enabled + for the Cosmos DB account. + :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar failover_policies: An array that contains the regions ordered by + 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] + :param enable_multiple_write_locations: Enables the account to write in + multiple locations + :type enable_multiple_write_locations: bool + :param enable_cassandra_connector: Enables the cassandra connector on the + Cosmos DB C* account + :type enable_cassandra_connector: bool + :param connector_offer: The cassandra connector offer type for the Cosmos + DB database C* account. Possible values include: 'Small' + :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'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}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + '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]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, 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, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=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 + self.enable_multiple_write_locations = enable_multiple_write_locations + self.enable_cassandra_connector = enable_cassandra_connector + self.connector_offer = connector_offer + + +class DatabaseAccountConnectionString(Model): + """Connection string for the Cosmos DB account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseAccountConnectionString, self).__init__(**kwargs) + self.connection_string = None + self.description = None + + +class DatabaseAccountCreateUpdateParameters(Resource): + """Parameters to create and update Cosmos DB database accounts. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param kind: Indicates the type of database account. This can only be set + at database account creation. Possible values include: 'GlobalDocumentDB', + 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . + :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param consistency_policy: The consistency policy for the Cosmos DB + account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: Required. An array that contains the georeplication + locations enabled for the Cosmos DB account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar database_account_offer_type: Required. The offer type for the + database. Default value: "Standard" . + :vartype database_account_offer_type: str + :param ip_range_filter: Cosmos DB Firewall Support: This value specifies + the set of IP addresses or IP address ranges in CIDR form to be included + 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] + :param enable_multiple_write_locations: Enables the account to write in + multiple locations + :type enable_multiple_write_locations: bool + :param enable_cassandra_connector: Enables the cassandra connector on the + Cosmos DB C* account + :type enable_cassandra_connector: bool + :param connector_offer: The cassandra connector offer type for the Cosmos + DB database C* account. Possible values include: 'Small' + :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': 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}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + '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]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + } + + database_account_offer_type = "Standard" + + def __init__(self, *, locations, location: str=None, 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, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=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 + self.enable_multiple_write_locations = enable_multiple_write_locations + self.enable_cassandra_connector = enable_cassandra_connector + self.connector_offer = connector_offer + + +class DatabaseAccountListConnectionStringsResult(Model): + """The connection strings for the given database account. + + :param connection_strings: An array that contains the connection strings + for the Cosmos DB account. + :type connection_strings: + list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] + """ + + _attribute_map = { + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, + } + + def __init__(self, *, connection_strings=None, **kwargs) -> None: + super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) + self.connection_strings = connection_strings + + +class DatabaseAccountListReadOnlyKeysResult(Model): + """The read-only access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None + + +class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): + """The access keys for the given database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_readonly_master_key: Base 64 encoded value of the primary + read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the + secondary read-only key. + :vartype secondary_readonly_master_key: str + :ivar primary_master_key: Base 64 encoded value of the primary read-write + key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary + read-write key. + :vartype secondary_master_key: str + """ + + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseAccountListKeysResult, self).__init__(**kwargs) + self.primary_master_key = None + self.secondary_master_key = None + + +class DatabaseAccountPatchParameters(Model): + """Parameters for patching Azure Cosmos DB database account properties. + + :param tags: + :type tags: dict[str, str] + :param capabilities: List of Cosmos DB capabilities for the account + :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + } + + def __init__(self, *, tags=None, capabilities=None, **kwargs) -> None: + super(DatabaseAccountPatchParameters, self).__init__(**kwargs) + self.tags = tags + self.capabilities = capabilities + + +class DatabaseAccountRegenerateKeyParameters(Model): + """Parameters to regenerate the keys within the database account. + + All required parameters must be populated in order to send to Azure. + + :param key_kind: Required. The access key to regenerate. Possible values + include: 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' + :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind + """ + + _validation = { + 'key_kind': {'required': True}, + } + + _attribute_map = { + 'key_kind': {'key': 'keyKind', 'type': 'str'}, + } + + def __init__(self, *, key_kind, **kwargs) -> None: + super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_kind = key_kind + + +class ErrorResponse(Model): + """Error Response. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ExcludedPath(Model): + """ExcludedPath. + + :param path: The path for which the indexing behavior applies to. Index + paths typically start with root and end with wildcard (/path/*) + :type path: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, **kwargs) -> None: + super(ExcludedPath, self).__init__(**kwargs) + self.path = path + + +class ExtendedResourceProperties(Model): + """The system generated resource properties associated with SQL databases and + SQL containers. + + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + """ + + _attribute_map = { + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, *, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: + super(ExtendedResourceProperties, self).__init__(**kwargs) + self._rid = _rid + self._ts = _ts + self._etag = _etag + + +class FailoverPolicies(Model): + """The list of new failover policies for the failover priority change. + + All required parameters must be populated in order to send to Azure. + + :param failover_policies: Required. List of failover policies. + :type failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] + """ + + _validation = { + 'failover_policies': {'required': True}, + } + + _attribute_map = { + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + } + + def __init__(self, *, failover_policies, **kwargs) -> None: + super(FailoverPolicies, self).__init__(**kwargs) + self.failover_policies = failover_policies + + +class FailoverPolicy(Model): + """The failover policy for a given region of a database account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region in which the database + account replicates to. Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account + exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + """ + + _validation = { + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__(self, *, location_name: str=None, failover_priority: int=None, **kwargs) -> None: + super(FailoverPolicy, self).__init__(**kwargs) + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority + + +class GremlinDatabase(Resource): + """An Azure Cosmos DB Gremlin database. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param gremlin_database_id: Required. Name of the Cosmos DB Gremlin + database + :type gremlin_database_id: str + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'gremlin_database_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'gremlin_database_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, *, gremlin_database_id: str, location: str=None, tags=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: + super(GremlinDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.gremlin_database_id = gremlin_database_id + self._rid = _rid + self._ts = _ts + self._etag = _etag + + +class GremlinDatabaseCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Gremlin database. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Gremlin database + :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, **kwargs) -> None: + super(GremlinDatabaseCreateUpdateParameters, self).__init__(**kwargs) + self.resource = resource + self.options = options + + +class GremlinDatabaseResource(Model): + """Cosmos DB Gremlin database id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Gremlin database + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(GremlinDatabaseResource, self).__init__(**kwargs) + self.id = id + + +class GremlinGraph(Resource): + """An Azure Cosmos DB Gremlin graph. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param gremlin_graph_id: Required. Name of the Cosmos DB Gremlin graph + :type gremlin_graph_id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the graph + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + graph. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'gremlin_graph_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'gremlin_graph_id': {'key': 'properties.id', 'type': 'str'}, + 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, *, gremlin_graph_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: + super(GremlinGraph, self).__init__(location=location, tags=tags, **kwargs) + self.gremlin_graph_id = gremlin_graph_id + self.indexing_policy = indexing_policy + self.partition_key = partition_key + self.default_ttl = default_ttl + self.unique_key_policy = unique_key_policy + self.conflict_resolution_policy = conflict_resolution_policy + self._rid = _rid + self._ts = _ts + self._etag = _etag + + +class GremlinGraphCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Gremlin graph. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Gremlin graph + :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, **kwargs) -> None: + super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs) + self.resource = resource + self.options = options + + +class GremlinGraphResource(Model): + """Cosmos DB Gremlin graph resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Gremlin graph + :type id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the graph + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + graph. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + } + + def __init__(self, *, id: str, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, **kwargs) -> None: + super(GremlinGraphResource, self).__init__(**kwargs) + self.id = id + self.indexing_policy = indexing_policy + self.partition_key = partition_key + self.default_ttl = default_ttl + self.unique_key_policy = unique_key_policy + self.conflict_resolution_policy = conflict_resolution_policy + + +class IncludedPath(Model): + """The paths that are included in indexing. + + :param path: The path for which the indexing behavior applies to. Index + paths typically start with root and end with wildcard (/path/*) + :type path: str + :param indexes: List of indexes for this path + :type indexes: list[~azure.mgmt.cosmosdb.models.Indexes] + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'indexes': {'key': 'indexes', 'type': '[Indexes]'}, + } + + def __init__(self, *, path: str=None, indexes=None, **kwargs) -> None: + super(IncludedPath, self).__init__(**kwargs) + self.path = path + self.indexes = indexes + + +class Indexes(Model): + """The indexes for the path. + + :param data_type: The datatype for which the indexing behavior is applied + to. Possible values include: 'String', 'Number', 'Point', 'Polygon', + 'LineString', 'MultiPolygon'. Default value: "String" . + :type data_type: str or ~azure.mgmt.cosmosdb.models.DataType + :param precision: The precision of the index. -1 is maximum precision. + :type precision: int + :param kind: Indicates the type of index. Possible values include: 'Hash', + 'Range', 'Spatial'. Default value: "Hash" . + :type kind: str or ~azure.mgmt.cosmosdb.models.IndexKind + """ + + _attribute_map = { + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'precision': {'key': 'precision', 'type': 'int'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, data_type="String", precision: int=None, kind="Hash", **kwargs) -> None: + super(Indexes, self).__init__(**kwargs) + self.data_type = data_type + self.precision = precision + self.kind = kind + + +class IndexingPolicy(Model): + """Cosmos DB indexing policy. + + :param automatic: Indicates if the indexing policy is automatic + :type automatic: bool + :param indexing_mode: Indicates the indexing mode. Possible values + include: 'Consistent', 'Lazy', 'None'. Default value: "Consistent" . + :type indexing_mode: str or ~azure.mgmt.cosmosdb.models.IndexingMode + :param included_paths: List of paths to include in the indexing + :type included_paths: list[~azure.mgmt.cosmosdb.models.IncludedPath] + :param excluded_paths: List of paths to exclude from indexing + :type excluded_paths: list[~azure.mgmt.cosmosdb.models.ExcludedPath] + """ + + _attribute_map = { + 'automatic': {'key': 'automatic', 'type': 'bool'}, + 'indexing_mode': {'key': 'indexingMode', 'type': 'str'}, + 'included_paths': {'key': 'includedPaths', 'type': '[IncludedPath]'}, + 'excluded_paths': {'key': 'excludedPaths', 'type': '[ExcludedPath]'}, + } + + def __init__(self, *, automatic: bool=None, indexing_mode="Consistent", included_paths=None, excluded_paths=None, **kwargs) -> None: + super(IndexingPolicy, self).__init__(**kwargs) + self.automatic = automatic + self.indexing_mode = indexing_mode + self.included_paths = included_paths + self.excluded_paths = excluded_paths + + +class Location(Model): + """A region in which the Azure Cosmos DB database account is deployed. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique identifier of the region within the database account. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region. + :type location_name: str + :ivar document_endpoint: The connection endpoint for the specific region. + Example: + https://<accountName>-<locationName>.documents.azure.com:443/ + :vartype document_endpoint: str + :param provisioning_state: + :type provisioning_state: str + :param failover_priority: The failover priority of the region. A failover + priority of 0 indicates a write region. The maximum value for a failover + priority = (total number of regions - 1). Failover priority values must be + unique for each of the regions in which the database account exists. + :type failover_priority: int + :param is_zone_redundant: Flag to indicate whether or not this region is + an AvailabilityZone region + :type is_zone_redundant: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + 'is_zone_redundant': {'key': 'isZoneRedundant', 'type': 'bool'}, + } + + def __init__(self, *, location_name: str=None, provisioning_state: str=None, failover_priority: int=None, is_zone_redundant: bool=None, **kwargs) -> None: + super(Location, self).__init__(**kwargs) + self.id = None + self.location_name = location_name + self.document_endpoint = None + self.provisioning_state = provisioning_state + self.failover_priority = failover_priority + self.is_zone_redundant = is_zone_redundant + + +class Metric(Model): + """Metric data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time grain to be used to summarize the metric + values. + :vartype time_grain: str + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.cosmosdb.models.MetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + } + + def __init__(self, *, unit=None, **kwargs) -> None: + super(Metric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = unit + self.name = None + self.metric_values = None + + +class MetricAvailability(Model): + """The availability of the metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time_grain: The time grain to be used to summarize the metric + values. + :vartype time_grain: str + :ivar retention: The retention for the metric values. + :vartype retention: str + """ + + _validation = { + 'time_grain': {'readonly': True}, + 'retention': {'readonly': True}, + } + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = None + self.retention = None + + +class MetricDefinition(Model): + """The definition of a metric. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar metric_availabilities: The list of metric availabilities for the + account. + :vartype metric_availabilities: + list[~azure.mgmt.cosmosdb.models.MetricAvailability] + :ivar primary_aggregation_type: The primary aggregation type of the + metric. Possible values include: 'None', 'Average', 'Total', 'Minimimum', + 'Maximum', 'Last' + :vartype primary_aggregation_type: str or + ~azure.mgmt.cosmosdb.models.PrimaryAggregationType + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar resource_uri: The resource uri of the database. + :vartype resource_uri: str + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + """ + + _validation = { + 'metric_availabilities': {'readonly': True}, + 'primary_aggregation_type': {'readonly': True}, + 'resource_uri': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + } + + def __init__(self, *, unit=None, **kwargs) -> None: + super(MetricDefinition, self).__init__(**kwargs) + self.metric_availabilities = None + self.primary_aggregation_type = None + self.unit = unit + self.resource_uri = None + self.name = None + + +class MetricName(Model): + """A metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the metric. + :vartype value: str + :ivar localized_value: The friendly name of the metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class MetricValue(Model): + """Represents metrics values. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar _count: The number of values for the metric. + :vartype _count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + """ + + _validation = { + '_count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + } + + _attribute_map = { + '_count': {'key': '_count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricValue, self).__init__(**kwargs) + self._count = None + self.average = None + self.maximum = None + self.minimum = None + self.timestamp = None + self.total = None + + +class MongoDBCollection(Resource): + """An Azure Cosmos DB MongoDB collection. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param mongo_db_collection_id: Required. Name of the Cosmos DB MongoDB + collection + :type mongo_db_collection_id: str + :param shard_key: A key-value pair of shard keys to be applied for the + request. + :type shard_key: dict[str, str] + :param indexes: List of index keys + :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'mongo_db_collection_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'mongo_db_collection_id': {'key': 'properties.id', 'type': 'str'}, + 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, + 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, + } + + def __init__(self, *, mongo_db_collection_id: str, location: str=None, tags=None, shard_key=None, indexes=None, **kwargs) -> None: + super(MongoDBCollection, self).__init__(location=location, tags=tags, **kwargs) + self.mongo_db_collection_id = mongo_db_collection_id + self.shard_key = shard_key + self.indexes = indexes + + +class MongoDBCollectionCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB MongoDB collection. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a MongoDB + collection + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, **kwargs) -> None: + super(MongoDBCollectionCreateUpdateParameters, self).__init__(**kwargs) + self.resource = resource + self.options = options + + +class MongoDBCollectionResource(Model): + """Cosmos DB MongoDB collection resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB MongoDB collection + :type id: str + :param shard_key: A key-value pair of shard keys to be applied for the + request. + :type shard_key: dict[str, str] + :param indexes: List of index keys + :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'shard_key': {'key': 'shardKey', 'type': '{str}'}, + 'indexes': {'key': 'indexes', 'type': '[MongoIndex]'}, + } + + def __init__(self, *, id: str, shard_key=None, indexes=None, **kwargs) -> None: + super(MongoDBCollectionResource, self).__init__(**kwargs) + self.id = id + self.shard_key = shard_key + self.indexes = indexes + + +class MongoDBDatabase(Resource): + """An Azure Cosmos DB MongoDB database. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param mongo_db_database_id: Required. Name of the Cosmos DB MongoDB + database + :type mongo_db_database_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'mongo_db_database_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'mongo_db_database_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, mongo_db_database_id: str, location: str=None, tags=None, **kwargs) -> None: + super(MongoDBDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.mongo_db_database_id = mongo_db_database_id + + +class MongoDBDatabaseCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB MongoDB database. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a MongoDB database + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, **kwargs) -> None: + super(MongoDBDatabaseCreateUpdateParameters, self).__init__(**kwargs) + self.resource = resource + self.options = options + + +class MongoDBDatabaseResource(Model): + """Cosmos DB MongoDB database id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB MongoDB database + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(MongoDBDatabaseResource, self).__init__(**kwargs) + self.id = id + + +class MongoIndex(Model): + """Cosmos DB MongoDB collection index key. + + :param key: Cosmos DB MongoDB collection index keys + :type key: ~azure.mgmt.cosmosdb.models.MongoIndexKeys + :param options: Cosmos DB MongoDB collection index key options + :type options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'MongoIndexKeys'}, + 'options': {'key': 'options', 'type': 'MongoIndexOptions'}, + } + + def __init__(self, *, key=None, options=None, **kwargs) -> None: + super(MongoIndex, self).__init__(**kwargs) + self.key = key + self.options = options + + +class MongoIndexKeys(Model): + """Cosmos DB MongoDB collection resource object. + + :param keys: List of keys for each MongoDB collection in the Azure Cosmos + DB service + :type keys: list[str] + """ + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[str]'}, + } + + def __init__(self, *, keys=None, **kwargs) -> None: + super(MongoIndexKeys, self).__init__(**kwargs) + self.keys = keys + + +class MongoIndexOptions(Model): + """Cosmos DB MongoDB collection index options. + + :param expire_after_seconds: Expire after seconds + :type expire_after_seconds: int + :param unique: Is unique or not + :type unique: bool + """ + + _attribute_map = { + 'expire_after_seconds': {'key': 'expireAfterSeconds', 'type': 'int'}, + 'unique': {'key': 'unique', 'type': 'bool'}, + } + + def __init__(self, *, expire_after_seconds: int=None, unique: bool=None, **kwargs) -> None: + super(MongoIndexOptions, self).__init__(**kwargs) + self.expire_after_seconds = expire_after_seconds + self.unique = unique + + +class Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.cosmosdb.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.ResourceProvider + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'Provider', 'type': 'str'}, + 'resource': {'key': 'Resource', 'type': 'str'}, + 'operation': {'key': 'Operation', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PartitionMetric(Metric): + """The metric values for a single partition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time grain to be used to summarize the metric + values. + :vartype time_grain: str + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + :ivar metric_values: The metric values for the specified time window and + timestep. + :vartype metric_values: list[~azure.mgmt.cosmosdb.models.MetricValue] + :ivar partition_id: The partition id (GUID identifier) of the metric + values. + :vartype partition_id: str + :ivar partition_key_range_id: The partition key range id (integer + identifier) of the metric values. + :vartype partition_key_range_id: str + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + 'partition_id': {'readonly': True}, + 'partition_key_range_id': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, + 'partition_id': {'key': 'partitionId', 'type': 'str'}, + 'partition_key_range_id': {'key': 'partitionKeyRangeId', 'type': 'str'}, + } + + def __init__(self, *, unit=None, **kwargs) -> None: + super(PartitionMetric, self).__init__(unit=unit, **kwargs) + self.partition_id = None + self.partition_key_range_id = None + + +class Usage(Model): + """The usage data for a usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + :ivar quota_period: The quota period used to summarize the usage values. + :vartype quota_period: str + :ivar limit: Maximum value for this metric + :vartype limit: long + :ivar current_value: Current value for this metric + :vartype current_value: long + """ + + _validation = { + 'name': {'readonly': True}, + 'quota_period': {'readonly': True}, + 'limit': {'readonly': True}, + 'current_value': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + } + + def __init__(self, *, unit=None, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.unit = unit + self.name = None + self.quota_period = None + self.limit = None + self.current_value = None + + +class PartitionUsage(Usage): + """The partition level usage data for a usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + :ivar quota_period: The quota period used to summarize the usage values. + :vartype quota_period: str + :ivar limit: Maximum value for this metric + :vartype limit: long + :ivar current_value: Current value for this metric + :vartype current_value: long + :ivar partition_id: The partition id (GUID identifier) of the usages. + :vartype partition_id: str + :ivar partition_key_range_id: The partition key range id (integer + identifier) of the usages. + :vartype partition_key_range_id: str + """ + + _validation = { + 'name': {'readonly': True}, + 'quota_period': {'readonly': True}, + 'limit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'partition_id': {'readonly': True}, + 'partition_key_range_id': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'partition_id': {'key': 'partitionId', 'type': 'str'}, + 'partition_key_range_id': {'key': 'partitionKeyRangeId', 'type': 'str'}, + } + + def __init__(self, *, unit=None, **kwargs) -> None: + super(PartitionUsage, self).__init__(unit=unit, **kwargs) + self.partition_id = None + self.partition_key_range_id = None + + +class PercentileMetric(Model): + """Percentile Metric data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: The start time for the metric (ISO-8601 format). + :vartype start_time: datetime + :ivar end_time: The end time for the metric (ISO-8601 format). + :vartype end_time: datetime + :ivar time_grain: The time grain to be used to summarize the metric + values. + :vartype time_grain: str + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cosmosdb.models.MetricName + :ivar metric_values: The percentile metric values for the specified time + window and timestep. + :vartype metric_values: + list[~azure.mgmt.cosmosdb.models.PercentileMetricValue] + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'time_grain': {'readonly': True}, + 'name': {'readonly': True}, + 'metric_values': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'metric_values': {'key': 'metricValues', 'type': '[PercentileMetricValue]'}, + } + + def __init__(self, *, unit=None, **kwargs) -> None: + super(PercentileMetric, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.time_grain = None + self.unit = unit + self.name = None + self.metric_values = None + + +class PercentileMetricValue(MetricValue): + """Represents percentile metrics values. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar _count: The number of values for the metric. + :vartype _count: float + :ivar average: The average value of the metric. + :vartype average: float + :ivar maximum: The max value of the metric. + :vartype maximum: float + :ivar minimum: The min value of the metric. + :vartype minimum: float + :ivar timestamp: The metric timestamp (ISO-8601 format). + :vartype timestamp: datetime + :ivar total: The total value of the metric. + :vartype total: float + :ivar p10: The 10th percentile value for the metric. + :vartype p10: float + :ivar p25: The 25th percentile value for the metric. + :vartype p25: float + :ivar p50: The 50th percentile value for the metric. + :vartype p50: float + :ivar p75: The 75th percentile value for the metric. + :vartype p75: float + :ivar p90: The 90th percentile value for the metric. + :vartype p90: float + :ivar p95: The 95th percentile value for the metric. + :vartype p95: float + :ivar p99: The 99th percentile value for the metric. + :vartype p99: float + """ + + _validation = { + '_count': {'readonly': True}, + 'average': {'readonly': True}, + 'maximum': {'readonly': True}, + 'minimum': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'total': {'readonly': True}, + 'p10': {'readonly': True}, + 'p25': {'readonly': True}, + 'p50': {'readonly': True}, + 'p75': {'readonly': True}, + 'p90': {'readonly': True}, + 'p95': {'readonly': True}, + 'p99': {'readonly': True}, + } + + _attribute_map = { + '_count': {'key': '_count', 'type': 'float'}, + 'average': {'key': 'average', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'total': {'key': 'total', 'type': 'float'}, + 'p10': {'key': 'P10', 'type': 'float'}, + 'p25': {'key': 'P25', 'type': 'float'}, + 'p50': {'key': 'P50', 'type': 'float'}, + 'p75': {'key': 'P75', 'type': 'float'}, + 'p90': {'key': 'P90', 'type': 'float'}, + 'p95': {'key': 'P95', 'type': 'float'}, + 'p99': {'key': 'P99', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(PercentileMetricValue, self).__init__(**kwargs) + self.p10 = None + self.p25 = None + self.p50 = None + self.p75 = None + self.p90 = None + self.p95 = None + self.p99 = None + + +class RegionForOnlineOffline(Model): + """Cosmos DB region to online or offline. + + All required parameters must be populated in order to send to Azure. + + :param region: Required. Cosmos DB region, with spaces between words and + each word capitalized. + :type region: str + """ + + _validation = { + 'region': {'required': True}, + } + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__(self, *, region: str, **kwargs) -> None: + super(RegionForOnlineOffline, self).__init__(**kwargs) + self.region = region + + +class SqlContainer(Resource): + """An Azure Cosmos DB container. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param sql_container_id: Required. Name of the Cosmos DB SQL container + :type sql_container_id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the + container + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + container. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sql_container_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sql_container_id': {'key': 'properties.id', 'type': 'str'}, + 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, *, sql_container_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: + super(SqlContainer, self).__init__(location=location, tags=tags, **kwargs) + self.sql_container_id = sql_container_id + self.indexing_policy = indexing_policy + self.partition_key = partition_key + self.default_ttl = default_ttl + self.unique_key_policy = unique_key_policy + self.conflict_resolution_policy = conflict_resolution_policy + self._rid = _rid + self._ts = _ts + self._etag = _etag + + +class SqlContainerCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB container. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a container + :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, **kwargs) -> None: + super(SqlContainerCreateUpdateParameters, self).__init__(**kwargs) + self.resource = resource + self.options = options + + +class SqlContainerResource(Model): + """Cosmos DB SQL container resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB SQL container + :type id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the + container + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + container. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + } + + def __init__(self, *, id: str, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, **kwargs) -> None: + super(SqlContainerResource, self).__init__(**kwargs) + self.id = id + self.indexing_policy = indexing_policy + self.partition_key = partition_key + self.default_ttl = default_ttl + self.unique_key_policy = unique_key_policy + self.conflict_resolution_policy = conflict_resolution_policy + + +class SqlDatabase(Resource): + """An Azure Cosmos DB SQL database. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param sql_database_id: Required. Name of the Cosmos DB SQL database + :type sql_database_id: str + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + :param _colls: A system generated property that specified the addressable + path of the collections resource. + :type _colls: str + :param _users: A system generated property that specifies the addressable + path of the users resource. + :type _users: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sql_database_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sql_database_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + '_colls': {'key': 'properties._colls', 'type': 'str'}, + '_users': {'key': 'properties._users', 'type': 'str'}, + } + + def __init__(self, *, sql_database_id: str, location: str=None, tags=None, _rid: str=None, _ts=None, _etag: str=None, _colls: str=None, _users: str=None, **kwargs) -> None: + super(SqlDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.sql_database_id = sql_database_id + self._rid = _rid + self._ts = _ts + self._etag = _etag + self._colls = _colls + self._users = _users + + +class SqlDatabaseCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB SQL database. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a SQL database + :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, **kwargs) -> None: + super(SqlDatabaseCreateUpdateParameters, self).__init__(**kwargs) + self.resource = resource + self.options = options + + +class SqlDatabaseResource(Model): + """Cosmos DB SQL database id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB SQL database + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(SqlDatabaseResource, self).__init__(**kwargs) + self.id = id + + +class Table(Resource): + """An Azure Cosmos DB Table. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param table_id: Required. Name of the Cosmos DB table + :type table_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'table_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'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'table_id': {'key': 'properties.id', 'type': 'str'}, + } + + def __init__(self, *, table_id: str, location: str=None, tags=None, **kwargs) -> None: + super(Table, self).__init__(location=location, tags=tags, **kwargs) + self.table_id = table_id + + +class TableCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Table. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Table + :type resource: ~azure.mgmt.cosmosdb.models.TableResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, **kwargs) -> None: + super(TableCreateUpdateParameters, self).__init__(**kwargs) + self.resource = resource + self.options = options + + +class TableResource(Model): + """Cosmos DB table id object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB table + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(TableResource, self).__init__(**kwargs) + self.id = id + + +class Throughput(Resource): + """An Azure Cosmos DB resource throughput. + + 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: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param throughput: Required. Value of the Cosmos DB resource throughput + :type throughput: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'throughput': {'required': 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}'}, + 'throughput': {'key': 'properties.throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int, location: str=None, tags=None, **kwargs) -> None: + super(Throughput, self).__init__(location=location, tags=tags, **kwargs) + self.throughput = throughput + + +class ThroughputResource(Model): + """Cosmos DB resource throughput object. + + All required parameters must be populated in order to send to Azure. + + :param throughput: Required. Value of the Cosmos DB resource throughput + :type throughput: int + """ + + _validation = { + 'throughput': {'required': True}, + } + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int, **kwargs) -> None: + super(ThroughputResource, self).__init__(**kwargs) + self.throughput = throughput + + +class ThroughputUpdateParameters(Model): + """Parameters to update Cosmos DB resource throughput. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a resource + throughput + :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource + """ + + _validation = { + 'resource': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'ThroughputResource'}, + } + + def __init__(self, *, resource, **kwargs) -> None: + super(ThroughputUpdateParameters, self).__init__(**kwargs) + self.resource = resource + + +class UniqueKey(Model): + """The unique key on that enforces uniqueness constraint on documents in the + collection in the Azure Cosmos DB service. + + :param paths: List of paths must be unique for each document in the Azure + Cosmos DB service + :type paths: list[str] + """ + + _attribute_map = { + 'paths': {'key': 'paths', 'type': '[str]'}, + } + + def __init__(self, *, paths=None, **kwargs) -> None: + super(UniqueKey, self).__init__(**kwargs) + self.paths = paths + + +class UniqueKeyPolicy(Model): + """The unique key policy configuration for specifying uniqueness constraints + on documents in the collection in the Azure Cosmos DB service. + + :param unique_keys: List of unique keys on that enforces uniqueness + constraint on documents in the collection in the Azure Cosmos DB service. + :type unique_keys: list[~azure.mgmt.cosmosdb.models.UniqueKey] + """ + + _attribute_map = { + 'unique_keys': {'key': 'uniqueKeys', 'type': '[UniqueKey]'}, + } + + def __init__(self, *, unique_keys=None, **kwargs) -> None: + super(UniqueKeyPolicy, self).__init__(**kwargs) + self.unique_keys = unique_keys + + +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 + :param ignore_missing_vnet_service_endpoint: Create firewall rule before + the virtual network has vnet service endpoint enabled. + :type ignore_missing_vnet_service_endpoint: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVNetServiceEndpoint', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.id = id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py new file mode 100644 index 000000000000..4f822e53855b --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py @@ -0,0 +1,235 @@ +# 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 DatabaseAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`DatabaseAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(DatabaseAccountPaged, self).__init__(*args, **kwargs) +class MetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`Metric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Metric]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricPaged, self).__init__(*args, **kwargs) +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) +class MetricDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`MetricDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricDefinitionPaged, self).__init__(*args, **kwargs) +class SqlDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`SqlDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SqlDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(SqlDatabasePaged, self).__init__(*args, **kwargs) +class SqlContainerPaged(Paged): + """ + A paging container for iterating over a list of :class:`SqlContainer ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SqlContainer]'} + } + + def __init__(self, *args, **kwargs): + + super(SqlContainerPaged, self).__init__(*args, **kwargs) +class MongoDBDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`MongoDBDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MongoDBDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(MongoDBDatabasePaged, self).__init__(*args, **kwargs) +class MongoDBCollectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`MongoDBCollection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MongoDBCollection]'} + } + + def __init__(self, *args, **kwargs): + + super(MongoDBCollectionPaged, self).__init__(*args, **kwargs) +class TablePaged(Paged): + """ + A paging container for iterating over a list of :class:`Table ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Table]'} + } + + def __init__(self, *args, **kwargs): + + super(TablePaged, self).__init__(*args, **kwargs) +class CassandraKeyspacePaged(Paged): + """ + A paging container for iterating over a list of :class:`CassandraKeyspace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CassandraKeyspace]'} + } + + def __init__(self, *args, **kwargs): + + super(CassandraKeyspacePaged, self).__init__(*args, **kwargs) +class CassandraTablePaged(Paged): + """ + A paging container for iterating over a list of :class:`CassandraTable ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CassandraTable]'} + } + + def __init__(self, *args, **kwargs): + + super(CassandraTablePaged, self).__init__(*args, **kwargs) +class GremlinDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`GremlinDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GremlinDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(GremlinDatabasePaged, self).__init__(*args, **kwargs) +class GremlinGraphPaged(Paged): + """ + A paging container for iterating over a list of :class:`GremlinGraph ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GremlinGraph]'} + } + + def __init__(self, *args, **kwargs): + + super(GremlinGraphPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class PercentileMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`PercentileMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PercentileMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(PercentileMetricPaged, self).__init__(*args, **kwargs) +class PartitionMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`PartitionMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PartitionMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(PartitionMetricPaged, self).__init__(*args, **kwargs) +class PartitionUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`PartitionUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PartitionUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(PartitionUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/capability.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/capability.py deleted file mode 100644 index 4af58eafe420..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/capability.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 Capability(Model): - """Cosmos DB capability object. - - :param name: Name of the Cosmos DB capability. For example, "name": - "EnableCassandra". Current values also include "EnableTable" and - "EnableGremlin". - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Capability, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/capability_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/capability_py3.py deleted file mode 100644 index 50a19a7ecad3..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/capability_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 Capability(Model): - """Cosmos DB capability object. - - :param name: Name of the Cosmos DB capability. For example, "name": - "EnableCassandra". Current values also include "EnableTable" and - "EnableGremlin". - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(Capability, self).__init__(**kwargs) - self.name = name diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace.py deleted file mode 100644 index d3da400811fc..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 .resource import Resource - - -class CassandraKeyspace(Resource): - """An Azure Cosmos DB Cassandra keyspace. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param cassandra_keyspace_id: Required. Name of the Cosmos DB Cassandra - keyspace - :type cassandra_keyspace_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'cassandra_keyspace_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'cassandra_keyspace_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CassandraKeyspace, self).__init__(**kwargs) - self.cassandra_keyspace_id = kwargs.get('cassandra_keyspace_id', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_create_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_create_update_parameters.py deleted file mode 100644 index c9fcce128a5b..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_create_update_parameters.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 CassandraKeyspaceCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Cassandra keyspace. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Cassandra - keyspace - :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(CassandraKeyspaceCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_create_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_create_update_parameters_py3.py deleted file mode 100644 index 586e0e7bbf7e..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_create_update_parameters_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 CassandraKeyspaceCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Cassandra keyspace. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Cassandra - keyspace - :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(CassandraKeyspaceCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_paged.py deleted file mode 100644 index 83a111e99d31..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 CassandraKeyspacePaged(Paged): - """ - A paging container for iterating over a list of :class:`CassandraKeyspace ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CassandraKeyspace]'} - } - - def __init__(self, *args, **kwargs): - - super(CassandraKeyspacePaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_py3.py deleted file mode 100644 index d95b1e23228d..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 .resource_py3 import Resource - - -class CassandraKeyspace(Resource): - """An Azure Cosmos DB Cassandra keyspace. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param cassandra_keyspace_id: Required. Name of the Cosmos DB Cassandra - keyspace - :type cassandra_keyspace_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'cassandra_keyspace_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'cassandra_keyspace_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, cassandra_keyspace_id: str, location: str=None, tags=None, **kwargs) -> None: - super(CassandraKeyspace, self).__init__(location=location, tags=tags, **kwargs) - self.cassandra_keyspace_id = cassandra_keyspace_id diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_resource.py deleted file mode 100644 index ab347ea0c075..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_resource.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 CassandraKeyspaceResource(Model): - """Cosmos DB Cassandra keyspace id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Cassandra keyspace - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CassandraKeyspaceResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_resource_py3.py deleted file mode 100644 index 85faffac66d0..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_keyspace_resource_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 CassandraKeyspaceResource(Model): - """Cosmos DB Cassandra keyspace id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Cassandra keyspace - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(CassandraKeyspaceResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_partition_key.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_partition_key.py deleted file mode 100644 index e94e0da9c5b3..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_partition_key.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 CassandraPartitionKey(Model): - """Cosmos DB Cassandra table partition key. - - :param name: Name of the Cosmos DB Cassandra table partition key - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CassandraPartitionKey, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_partition_key_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_partition_key_py3.py deleted file mode 100644 index fbca51aeedae..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_partition_key_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 CassandraPartitionKey(Model): - """Cosmos DB Cassandra table partition key. - - :param name: Name of the Cosmos DB Cassandra table partition key - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(CassandraPartitionKey, self).__init__(**kwargs) - self.name = name diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_schema.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_schema.py deleted file mode 100644 index 492f687bc6c1..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_schema.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 CassandraSchema(Model): - """Cosmos DB Cassandra table schema. - - :param columns: List of Cassandra table columns. - :type columns: list[~azure.mgmt.cosmosdb.models.Column] - :param partition_keys: List of partition key. - :type partition_keys: - list[~azure.mgmt.cosmosdb.models.CassandraPartitionKey] - :param cluster_keys: List of cluster key. - :type cluster_keys: list[~azure.mgmt.cosmosdb.models.ClusterKey] - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[Column]'}, - 'partition_keys': {'key': 'partitionKeys', 'type': '[CassandraPartitionKey]'}, - 'cluster_keys': {'key': 'clusterKeys', 'type': '[ClusterKey]'}, - } - - def __init__(self, **kwargs): - super(CassandraSchema, self).__init__(**kwargs) - self.columns = kwargs.get('columns', None) - self.partition_keys = kwargs.get('partition_keys', None) - self.cluster_keys = kwargs.get('cluster_keys', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_schema_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_schema_py3.py deleted file mode 100644 index 9bc8522d5ab6..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_schema_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 CassandraSchema(Model): - """Cosmos DB Cassandra table schema. - - :param columns: List of Cassandra table columns. - :type columns: list[~azure.mgmt.cosmosdb.models.Column] - :param partition_keys: List of partition key. - :type partition_keys: - list[~azure.mgmt.cosmosdb.models.CassandraPartitionKey] - :param cluster_keys: List of cluster key. - :type cluster_keys: list[~azure.mgmt.cosmosdb.models.ClusterKey] - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[Column]'}, - 'partition_keys': {'key': 'partitionKeys', 'type': '[CassandraPartitionKey]'}, - 'cluster_keys': {'key': 'clusterKeys', 'type': '[ClusterKey]'}, - } - - def __init__(self, *, columns=None, partition_keys=None, cluster_keys=None, **kwargs) -> None: - super(CassandraSchema, self).__init__(**kwargs) - self.columns = columns - self.partition_keys = partition_keys - self.cluster_keys = cluster_keys diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table.py deleted file mode 100644 index 0820eff6fcd2..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 .resource import Resource - - -class CassandraTable(Resource): - """An Azure Cosmos DB Cassandra table. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param cassandra_table_id: Required. Name of the Cosmos DB Cassandra table - :type cassandra_table_id: str - :param default_ttl: Time to live of the Cosmos DB Cassandra table - :type default_ttl: int - :param schema: Schema of the Cosmos DB Cassandra table - :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'cassandra_table_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'cassandra_table_id': {'key': 'properties.id', 'type': 'str'}, - 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, - 'schema': {'key': 'properties.schema', 'type': 'CassandraSchema'}, - } - - def __init__(self, **kwargs): - super(CassandraTable, self).__init__(**kwargs) - self.cassandra_table_id = kwargs.get('cassandra_table_id', None) - self.default_ttl = kwargs.get('default_ttl', None) - self.schema = kwargs.get('schema', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_create_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_create_update_parameters.py deleted file mode 100644 index ecc8079df915..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_create_update_parameters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 CassandraTableCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Cassandra table. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Cassandra table - :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(CassandraTableCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_create_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_create_update_parameters_py3.py deleted file mode 100644 index 288474bc3d04..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_create_update_parameters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 CassandraTableCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Cassandra table. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Cassandra table - :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(CassandraTableCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_paged.py deleted file mode 100644 index 3d88c8ab3c2c..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 CassandraTablePaged(Paged): - """ - A paging container for iterating over a list of :class:`CassandraTable ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CassandraTable]'} - } - - def __init__(self, *args, **kwargs): - - super(CassandraTablePaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_py3.py deleted file mode 100644 index 278da23841d0..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 .resource_py3 import Resource - - -class CassandraTable(Resource): - """An Azure Cosmos DB Cassandra table. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param cassandra_table_id: Required. Name of the Cosmos DB Cassandra table - :type cassandra_table_id: str - :param default_ttl: Time to live of the Cosmos DB Cassandra table - :type default_ttl: int - :param schema: Schema of the Cosmos DB Cassandra table - :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'cassandra_table_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'cassandra_table_id': {'key': 'properties.id', 'type': 'str'}, - 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, - 'schema': {'key': 'properties.schema', 'type': 'CassandraSchema'}, - } - - def __init__(self, *, cassandra_table_id: str, location: str=None, tags=None, default_ttl: int=None, schema=None, **kwargs) -> None: - super(CassandraTable, self).__init__(location=location, tags=tags, **kwargs) - self.cassandra_table_id = cassandra_table_id - self.default_ttl = default_ttl - self.schema = schema diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_resource.py deleted file mode 100644 index dc160654c074..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_resource.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 CassandraTableResource(Model): - """Cosmos DB Cassandra table id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Cassandra table - :type id: str - :param default_ttl: Time to live of the Cosmos DB Cassandra table - :type default_ttl: int - :param schema: Schema of the Cosmos DB Cassandra table - :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'schema': {'key': 'schema', 'type': 'CassandraSchema'}, - } - - def __init__(self, **kwargs): - super(CassandraTableResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.default_ttl = kwargs.get('default_ttl', None) - self.schema = kwargs.get('schema', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_resource_py3.py deleted file mode 100644 index 3519de867b8a..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cassandra_table_resource_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 CassandraTableResource(Model): - """Cosmos DB Cassandra table id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Cassandra table - :type id: str - :param default_ttl: Time to live of the Cosmos DB Cassandra table - :type default_ttl: int - :param schema: Schema of the Cosmos DB Cassandra table - :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'schema': {'key': 'schema', 'type': 'CassandraSchema'}, - } - - def __init__(self, *, id: str, default_ttl: int=None, schema=None, **kwargs) -> None: - super(CassandraTableResource, self).__init__(**kwargs) - self.id = id - self.default_ttl = default_ttl - self.schema = schema diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cluster_key.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cluster_key.py deleted file mode 100644 index c124e17c01d6..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cluster_key.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 ClusterKey(Model): - """Cosmos DB Cassandra table cluster key. - - :param name: Name of the Cosmos DB Cassandra table cluster key - :type name: str - :param order_by: Order of the Cosmos DB Cassandra table cluster key, only - support "Asc" and "Desc" - :type order_by: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order_by': {'key': 'orderBy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterKey, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.order_by = kwargs.get('order_by', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cluster_key_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cluster_key_py3.py deleted file mode 100644 index 95943f87cad8..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/cluster_key_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 ClusterKey(Model): - """Cosmos DB Cassandra table cluster key. - - :param name: Name of the Cosmos DB Cassandra table cluster key - :type name: str - :param order_by: Order of the Cosmos DB Cassandra table cluster key, only - support "Asc" and "Desc" - :type order_by: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order_by': {'key': 'orderBy', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, order_by: str=None, **kwargs) -> None: - super(ClusterKey, self).__init__(**kwargs) - self.name = name - self.order_by = order_by diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/column.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/column.py deleted file mode 100644 index 807481567012..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/column.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 Column(Model): - """Cosmos DB Cassandra table column. - - :param name: Name of the Cosmos DB Cassandra table column - :type name: str - :param type: Type of the Cosmos DB Cassandra table column - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Column, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/column_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/column_py3.py deleted file mode 100644 index aff65b552c88..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/column_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 Column(Model): - """Cosmos DB Cassandra table column. - - :param name: Name of the Cosmos DB Cassandra table column - :type name: str - :param type: Type of the Cosmos DB Cassandra table column - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: - super(Column, self).__init__(**kwargs) - self.name = name - self.type = type diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/conflict_resolution_policy.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/conflict_resolution_policy.py deleted file mode 100644 index a408a77ad7e0..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/conflict_resolution_policy.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 ConflictResolutionPolicy(Model): - """The conflict resolution policy for the container. - - :param mode: Indicates the conflict resolution mode. Possible values - include: 'LastWriterWins', 'Custom'. Default value: "LastWriterWins" . - :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode - :param conflict_resolution_path: The conflict resolution path in the case - of LastWriterWins mode. - :type conflict_resolution_path: str - :param conflict_resolution_procedure: The procedure to resolve conflicts - in the case of custom mode. - :type conflict_resolution_procedure: str - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, - 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ConflictResolutionPolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', "LastWriterWins") - self.conflict_resolution_path = kwargs.get('conflict_resolution_path', None) - self.conflict_resolution_procedure = kwargs.get('conflict_resolution_procedure', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/conflict_resolution_policy_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/conflict_resolution_policy_py3.py deleted file mode 100644 index a0012afc1a40..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/conflict_resolution_policy_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 ConflictResolutionPolicy(Model): - """The conflict resolution policy for the container. - - :param mode: Indicates the conflict resolution mode. Possible values - include: 'LastWriterWins', 'Custom'. Default value: "LastWriterWins" . - :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode - :param conflict_resolution_path: The conflict resolution path in the case - of LastWriterWins mode. - :type conflict_resolution_path: str - :param conflict_resolution_procedure: The procedure to resolve conflicts - in the case of custom mode. - :type conflict_resolution_procedure: str - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, - 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, - } - - def __init__(self, *, mode="LastWriterWins", conflict_resolution_path: str=None, conflict_resolution_procedure: str=None, **kwargs) -> None: - super(ConflictResolutionPolicy, self).__init__(**kwargs) - self.mode = mode - self.conflict_resolution_path = conflict_resolution_path - self.conflict_resolution_procedure = conflict_resolution_procedure diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/consistency_policy.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/consistency_policy.py deleted file mode 100644 index 10e57668fd9d..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/consistency_policy.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 ConsistencyPolicy(Model): - """The consistency policy for the Cosmos DB database account. - - All required parameters must be populated in order to send to Azure. - - :param default_consistency_level: Required. The default consistency level - and configuration settings of the Cosmos DB account. Possible values - include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', - 'ConsistentPrefix' - :type default_consistency_level: str or - ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 5 - 86400. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ConsistencyPolicy, self).__init__(**kwargs) - self.default_consistency_level = kwargs.get('default_consistency_level', None) - self.max_staleness_prefix = kwargs.get('max_staleness_prefix', None) - self.max_interval_in_seconds = kwargs.get('max_interval_in_seconds', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/consistency_policy_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/consistency_policy_py3.py deleted file mode 100644 index a544558dbc23..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/consistency_policy_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 ConsistencyPolicy(Model): - """The consistency policy for the Cosmos DB database account. - - All required parameters must be populated in order to send to Azure. - - :param default_consistency_level: Required. The default consistency level - and configuration settings of the Cosmos DB account. Possible values - include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', - 'ConsistentPrefix' - :type default_consistency_level: str or - ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel - :param max_staleness_prefix: When used with the Bounded Staleness - consistency level, this value represents the number of stale requests - tolerated. Accepted range for this value is 1 – 2,147,483,647. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness - consistency level, this value represents the time amount of staleness (in - seconds) tolerated. Accepted range for this value is 5 - 86400. Required - when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'DefaultConsistencyLevel'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, *, default_consistency_level, max_staleness_prefix: int=None, max_interval_in_seconds: int=None, **kwargs) -> None: - super(ConsistencyPolicy, self).__init__(**kwargs) - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_partition_key.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_partition_key.py deleted file mode 100644 index 846460f42ba0..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_partition_key.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 ContainerPartitionKey(Model): - """The configuration of the partition key to be used for partitioning data - into multiple partitions. - - :param paths: List of paths using which data within the container can be - partitioned - :type paths: list[str] - :param kind: Indicates the kind of algorithm used for partitioning. - Possible values include: 'Hash', 'Range'. Default value: "Hash" . - :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind - """ - - _attribute_map = { - 'paths': {'key': 'paths', 'type': '[str]'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerPartitionKey, self).__init__(**kwargs) - self.paths = kwargs.get('paths', None) - self.kind = kwargs.get('kind', "Hash") diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_partition_key_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_partition_key_py3.py deleted file mode 100644 index 08e560d7272a..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_partition_key_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 ContainerPartitionKey(Model): - """The configuration of the partition key to be used for partitioning data - into multiple partitions. - - :param paths: List of paths using which data within the container can be - partitioned - :type paths: list[str] - :param kind: Indicates the kind of algorithm used for partitioning. - Possible values include: 'Hash', 'Range'. Default value: "Hash" . - :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind - """ - - _attribute_map = { - 'paths': {'key': 'paths', 'type': '[str]'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, paths=None, kind="Hash", **kwargs) -> None: - super(ContainerPartitionKey, self).__init__(**kwargs) - self.paths = paths - self.kind = kind diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account.py deleted file mode 100644 index aa8fc15c837a..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account.py +++ /dev/null @@ -1,131 +0,0 @@ -# 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 .resource import Resource - - -class DatabaseAccount(Resource): - """An Azure Cosmos DB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the Cosmos DB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the Cosmos DB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - ~azure.mgmt.cosmosdb.models.DatabaseAccountOfferType - :param ip_range_filter: Cosmos DB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - 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 consistency_policy: The consistency policy for the Cosmos DB - database account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param capabilities: List of Cosmos DB capabilities for the account - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :ivar write_locations: An array that contains the write location for the - Cosmos DB account. - :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar read_locations: An array that contains of the read locations enabled - for the Cosmos DB account. - :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar failover_policies: An array that contains the regions ordered by - 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] - :param enable_multiple_write_locations: Enables the account to write in - multiple locations - :type enable_multiple_write_locations: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'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}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - '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]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DatabaseAccount, self).__init__(**kwargs) - self.kind = kwargs.get('kind', "GlobalDocumentDB") - self.provisioning_state = kwargs.get('provisioning_state', None) - 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) - self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_connection_string.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_connection_string.py deleted file mode 100644 index 113617832a67..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_connection_string.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 DatabaseAccountConnectionString(Model): - """Connection string for the Cosmos DB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseAccountConnectionString, self).__init__(**kwargs) - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_connection_string_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_connection_string_py3.py deleted file mode 100644 index d2c8d2671007..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_connection_string_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 DatabaseAccountConnectionString(Model): - """Connection string for the Cosmos DB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseAccountConnectionString, self).__init__(**kwargs) - self.connection_string = None - self.description = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_create_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_create_update_parameters.py deleted file mode 100644 index a9fa3fdfab68..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_create_update_parameters.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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 .resource import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update Cosmos DB database accounts. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param consistency_policy: The consistency policy for the Cosmos DB - account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication - locations enabled for the Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: Required. The offer type for the - database. Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: Cosmos DB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - 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] - :param enable_multiple_write_locations: Enables the account to write in - multiple locations - :type enable_multiple_write_locations: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': 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}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - '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]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, **kwargs): - super(DatabaseAccountCreateUpdateParameters, self).__init__(**kwargs) - self.kind = kwargs.get('kind', "GlobalDocumentDB") - 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) - self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_create_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_create_update_parameters_py3.py deleted file mode 100644 index eb39a8a68d94..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_create_update_parameters_py3.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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 .resource_py3 import Resource - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update Cosmos DB database accounts. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param consistency_policy: The consistency policy for the Cosmos DB - account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication - locations enabled for the Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: Required. The offer type for the - database. Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_range_filter: Cosmos DB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - 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] - :param enable_multiple_write_locations: Enables the account to write in - multiple locations - :type enable_multiple_write_locations: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': 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}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - '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]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - } - - database_account_offer_type = "Standard" - - def __init__(self, *, locations, location: str=None, 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, enable_multiple_write_locations: bool=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 - self.enable_multiple_write_locations = enable_multiple_write_locations diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_connection_strings_result.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_connection_strings_result.py deleted file mode 100644 index 4238c1c68bd5..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_connection_strings_result.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the Cosmos DB account. - :type connection_strings: - list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, **kwargs): - super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) - self.connection_strings = kwargs.get('connection_strings', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_connection_strings_result_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_connection_strings_result_py3.py deleted file mode 100644 index dcf39d62634b..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_connection_strings_result_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 DatabaseAccountListConnectionStringsResult(Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings - for the Cosmos DB account. - :type connection_strings: - list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__(self, *, connection_strings=None, **kwargs) -> None: - super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) - self.connection_strings = connection_strings diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_keys_result.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_keys_result.py deleted file mode 100644 index 8da636886258..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_keys_result.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseAccountListKeysResult, self).__init__(**kwargs) - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_keys_result_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_keys_result_py3.py deleted file mode 100644 index 3b060e748026..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_keys_result_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 DatabaseAccountListKeysResult(Model): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_master_key: Base 64 encoded value of the primary read-write - key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary - read-write key. - :vartype secondary_master_key: str - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - 'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseAccountListKeysResult, self).__init__(**kwargs) - self.primary_master_key = None - self.secondary_master_key = None - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_read_only_keys_result.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_read_only_keys_result.py deleted file mode 100644 index 806ef75fa732..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_read_only_keys_result.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_read_only_keys_result_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_read_only_keys_result_py3.py deleted file mode 100644 index fc4b99fadd90..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_list_read_only_keys_result_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 DatabaseAccountListReadOnlyKeysResult(Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary - read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the - secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_paged.py deleted file mode 100644 index ce3e09faba4e..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 DatabaseAccountPaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseAccount ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_patch_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_patch_parameters.py deleted file mode 100644 index c6ce68f18224..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_patch_parameters.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure Cosmos DB database account properties. - - :param tags: - :type tags: dict[str, str] - :param capabilities: List of Cosmos DB capabilities for the account - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - } - - def __init__(self, **kwargs): - super(DatabaseAccountPatchParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.capabilities = kwargs.get('capabilities', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_patch_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_patch_parameters_py3.py deleted file mode 100644 index 3554c8922fe2..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_patch_parameters_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 DatabaseAccountPatchParameters(Model): - """Parameters for patching Azure Cosmos DB database account properties. - - :param tags: - :type tags: dict[str, str] - :param capabilities: List of Cosmos DB capabilities for the account - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - } - - def __init__(self, *, tags=None, capabilities=None, **kwargs) -> None: - super(DatabaseAccountPatchParameters, self).__init__(**kwargs) - self.tags = tags - self.capabilities = capabilities diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_py3.py deleted file mode 100644 index 6f587458187c..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_py3.py +++ /dev/null @@ -1,131 +0,0 @@ -# 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 .resource_py3 import Resource - - -class DatabaseAccount(Resource): - """An Azure Cosmos DB database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param kind: Indicates the type of database account. This can only be set - at database account creation. Possible values include: 'GlobalDocumentDB', - 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . - :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the Cosmos DB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the Cosmos DB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - ~azure.mgmt.cosmosdb.models.DatabaseAccountOfferType - :param ip_range_filter: Cosmos DB Firewall Support: This value specifies - the set of IP addresses or IP address ranges in CIDR form to be included - 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 consistency_policy: The consistency policy for the Cosmos DB - database account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param capabilities: List of Cosmos DB capabilities for the account - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :ivar write_locations: An array that contains the write location for the - Cosmos DB account. - :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar read_locations: An array that contains of the read locations enabled - for the Cosmos DB account. - :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar failover_policies: An array that contains the regions ordered by - 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] - :param enable_multiple_write_locations: Enables the account to write in - multiple locations - :type enable_multiple_write_locations: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'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}'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - '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]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - } - - def __init__(self, *, location: str=None, 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, enable_multiple_write_locations: bool=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 - self.enable_multiple_write_locations = enable_multiple_write_locations diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_regenerate_key_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_regenerate_key_parameters.py deleted file mode 100644 index c122b82647ce..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_regenerate_key_parameters.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - All required parameters must be populated in order to send to Azure. - - :param key_kind: Required. The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) - self.key_kind = kwargs.get('key_kind', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_regenerate_key_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_regenerate_key_parameters_py3.py deleted file mode 100644 index 0ab59e91d274..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/database_account_regenerate_key_parameters_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 DatabaseAccountRegenerateKeyParameters(Model): - """Parameters to regenerate the keys within the database account. - - All required parameters must be populated in order to send to Azure. - - :param key_kind: Required. The access key to regenerate. Possible values - include: 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly' - :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__(self, *, key_kind, **kwargs) -> None: - super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) - self.key_kind = key_kind diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/error_response.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/error_response.py deleted file mode 100644 index e20829bcf7b2..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/error_response.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error Response. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/error_response_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/error_response_py3.py deleted file mode 100644 index 1b2f05f1d4d6..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/error_response_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error Response. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/excluded_path.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/excluded_path.py deleted file mode 100644 index c4564deae35b..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/excluded_path.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 ExcludedPath(Model): - """ExcludedPath. - - :param path: The path for which the indexing behavior applies to. Index - paths typically start with root and end with wildcard (/path/*) - :type path: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExcludedPath, self).__init__(**kwargs) - self.path = kwargs.get('path', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/excluded_path_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/excluded_path_py3.py deleted file mode 100644 index 35b2a7f95ab0..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/excluded_path_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 ExcludedPath(Model): - """ExcludedPath. - - :param path: The path for which the indexing behavior applies to. Index - paths typically start with root and end with wildcard (/path/*) - :type path: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__(self, *, path: str=None, **kwargs) -> None: - super(ExcludedPath, self).__init__(**kwargs) - self.path = path diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/extended_resource_properties.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/extended_resource_properties.py deleted file mode 100644 index bc58c85c6cff..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/extended_resource_properties.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 ExtendedResourceProperties(Model): - """The system generated resource properties associated with SQL databases and - SQL containers. - - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str - """ - - _attribute_map = { - '_rid': {'key': '_rid', 'type': 'str'}, - '_ts': {'key': '_ts', 'type': 'object'}, - '_etag': {'key': '_etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExtendedResourceProperties, self).__init__(**kwargs) - self._rid = kwargs.get('_rid', None) - self._ts = kwargs.get('_ts', None) - self._etag = kwargs.get('_etag', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/extended_resource_properties_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/extended_resource_properties_py3.py deleted file mode 100644 index 75f13069490c..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/extended_resource_properties_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 ExtendedResourceProperties(Model): - """The system generated resource properties associated with SQL databases and - SQL containers. - - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str - """ - - _attribute_map = { - '_rid': {'key': '_rid', 'type': 'str'}, - '_ts': {'key': '_ts', 'type': 'object'}, - '_etag': {'key': '_etag', 'type': 'str'}, - } - - def __init__(self, *, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: - super(ExtendedResourceProperties, self).__init__(**kwargs) - self._rid = _rid - self._ts = _ts - self._etag = _etag diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policies.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policies.py deleted file mode 100644 index 465593e38b6e..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policies.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - All required parameters must be populated in order to send to Azure. - - :param failover_policies: Required. List of failover policies. - :type failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] - """ - - _validation = { - 'failover_policies': {'required': True}, - } - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, **kwargs): - super(FailoverPolicies, self).__init__(**kwargs) - self.failover_policies = kwargs.get('failover_policies', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policies_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policies_py3.py deleted file mode 100644 index ef0230b30f7d..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policies_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 FailoverPolicies(Model): - """The list of new failover policies for the failover priority change. - - All required parameters must be populated in order to send to Azure. - - :param failover_policies: Required. List of failover policies. - :type failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] - """ - - _validation = { - 'failover_policies': {'required': True}, - } - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__(self, *, failover_policies, **kwargs) -> None: - super(FailoverPolicies, self).__init__(**kwargs) - self.failover_policies = failover_policies diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policy.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policy.py deleted file mode 100644 index 032a8850ec6a..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policy.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FailoverPolicy, self).__init__(**kwargs) - self.id = None - self.location_name = kwargs.get('location_name', None) - self.failover_priority = kwargs.get('failover_priority', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policy_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policy_py3.py deleted file mode 100644 index 94451fd116d8..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/failover_policy_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 FailoverPolicy(Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region in which the database - account replicates to. Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account - exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__(self, *, location_name: str=None, failover_priority: int=None, **kwargs) -> None: - super(FailoverPolicy, self).__init__(**kwargs) - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database.py deleted file mode 100644 index 907020974c2f..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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 .resource import Resource - - -class GremlinDatabase(Resource): - """An Azure Cosmos DB Gremlin database. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param gremlin_database_id: Required. Name of the Cosmos DB Gremlin - database - :type gremlin_database_id: str - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'gremlin_database_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'gremlin_database_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GremlinDatabase, self).__init__(**kwargs) - self.gremlin_database_id = kwargs.get('gremlin_database_id', None) - self._rid = kwargs.get('_rid', None) - self._ts = kwargs.get('_ts', None) - self._etag = kwargs.get('_etag', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_create_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_create_update_parameters.py deleted file mode 100644 index b2fb872c61a1..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_create_update_parameters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 GremlinDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Gremlin database. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Gremlin database - :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(GremlinDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_create_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_create_update_parameters_py3.py deleted file mode 100644 index a247b2cd4419..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_create_update_parameters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 GremlinDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Gremlin database. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Gremlin database - :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(GremlinDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_paged.py deleted file mode 100644 index 797f7087eb5e..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 GremlinDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`GremlinDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GremlinDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(GremlinDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_py3.py deleted file mode 100644 index a667c3eb8552..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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 .resource_py3 import Resource - - -class GremlinDatabase(Resource): - """An Azure Cosmos DB Gremlin database. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param gremlin_database_id: Required. Name of the Cosmos DB Gremlin - database - :type gremlin_database_id: str - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'gremlin_database_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'gremlin_database_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, - } - - def __init__(self, *, gremlin_database_id: str, location: str=None, tags=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: - super(GremlinDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.gremlin_database_id = gremlin_database_id - self._rid = _rid - self._ts = _ts - self._etag = _etag diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_resource.py deleted file mode 100644 index 4f7b1caf1ae2..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_resource.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 GremlinDatabaseResource(Model): - """Cosmos DB Gremlin database id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Gremlin database - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GremlinDatabaseResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_resource_py3.py deleted file mode 100644 index c4086334e830..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_database_resource_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 GremlinDatabaseResource(Model): - """Cosmos DB Gremlin database id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Gremlin database - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(GremlinDatabaseResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph.py deleted file mode 100644 index 21b7ed31c514..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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 .resource import Resource - - -class GremlinGraph(Resource): - """An Azure Cosmos DB Gremlin graph. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param gremlin_graph_id: Required. Name of the Cosmos DB Gremlin graph - :type gremlin_graph_id: str - :param indexing_policy: The configuration of the indexing policy. By - default, the indexing is automatic for all document paths within the graph - :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy - :param partition_key: The configuration of the partition key to be used - for partitioning data into multiple partitions - :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey - :param default_ttl: Default time to live - :type default_ttl: int - :param unique_key_policy: The unique key policy configuration for - specifying uniqueness constraints on documents in the collection in the - Azure Cosmos DB service. - :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy - :param conflict_resolution_policy: The conflict resolution policy for the - graph. - :type conflict_resolution_policy: - ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'gremlin_graph_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'gremlin_graph_id': {'key': 'properties.id', 'type': 'str'}, - 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GremlinGraph, self).__init__(**kwargs) - self.gremlin_graph_id = kwargs.get('gremlin_graph_id', None) - self.indexing_policy = kwargs.get('indexing_policy', None) - self.partition_key = kwargs.get('partition_key', None) - self.default_ttl = kwargs.get('default_ttl', None) - self.unique_key_policy = kwargs.get('unique_key_policy', None) - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self._rid = kwargs.get('_rid', None) - self._ts = kwargs.get('_ts', None) - self._etag = kwargs.get('_etag', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters.py deleted file mode 100644 index 795dc009706a..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 GremlinGraphCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Gremlin graph. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Gremlin graph - :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters_py3.py deleted file mode 100644 index 55da54081b08..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 GremlinGraphCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Gremlin graph. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Gremlin graph - :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_paged.py deleted file mode 100644 index b879fbb6648b..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 GremlinGraphPaged(Paged): - """ - A paging container for iterating over a list of :class:`GremlinGraph ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GremlinGraph]'} - } - - def __init__(self, *args, **kwargs): - - super(GremlinGraphPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_py3.py deleted file mode 100644 index 5de6eb12296a..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_py3.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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 .resource_py3 import Resource - - -class GremlinGraph(Resource): - """An Azure Cosmos DB Gremlin graph. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param gremlin_graph_id: Required. Name of the Cosmos DB Gremlin graph - :type gremlin_graph_id: str - :param indexing_policy: The configuration of the indexing policy. By - default, the indexing is automatic for all document paths within the graph - :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy - :param partition_key: The configuration of the partition key to be used - for partitioning data into multiple partitions - :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey - :param default_ttl: Default time to live - :type default_ttl: int - :param unique_key_policy: The unique key policy configuration for - specifying uniqueness constraints on documents in the collection in the - Azure Cosmos DB service. - :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy - :param conflict_resolution_policy: The conflict resolution policy for the - graph. - :type conflict_resolution_policy: - ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'gremlin_graph_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'gremlin_graph_id': {'key': 'properties.id', 'type': 'str'}, - 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, - } - - def __init__(self, *, gremlin_graph_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: - super(GremlinGraph, self).__init__(location=location, tags=tags, **kwargs) - self.gremlin_graph_id = gremlin_graph_id - self.indexing_policy = indexing_policy - self.partition_key = partition_key - self.default_ttl = default_ttl - self.unique_key_policy = unique_key_policy - self.conflict_resolution_policy = conflict_resolution_policy - self._rid = _rid - self._ts = _ts - self._etag = _etag diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource.py deleted file mode 100644 index 2a050a738730..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 GremlinGraphResource(Model): - """Cosmos DB Gremlin graph resource object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Gremlin graph - :type id: str - :param indexing_policy: The configuration of the indexing policy. By - default, the indexing is automatic for all document paths within the graph - :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy - :param partition_key: The configuration of the partition key to be used - for partitioning data into multiple partitions - :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey - :param default_ttl: Default time to live - :type default_ttl: int - :param unique_key_policy: The unique key policy configuration for - specifying uniqueness constraints on documents in the collection in the - Azure Cosmos DB service. - :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy - :param conflict_resolution_policy: The conflict resolution policy for the - graph. - :type conflict_resolution_policy: - ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - } - - def __init__(self, **kwargs): - super(GremlinGraphResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.indexing_policy = kwargs.get('indexing_policy', None) - self.partition_key = kwargs.get('partition_key', None) - self.default_ttl = kwargs.get('default_ttl', None) - self.unique_key_policy = kwargs.get('unique_key_policy', None) - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource_py3.py deleted file mode 100644 index abe0e7a3051f..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 GremlinGraphResource(Model): - """Cosmos DB Gremlin graph resource object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Gremlin graph - :type id: str - :param indexing_policy: The configuration of the indexing policy. By - default, the indexing is automatic for all document paths within the graph - :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy - :param partition_key: The configuration of the partition key to be used - for partitioning data into multiple partitions - :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey - :param default_ttl: Default time to live - :type default_ttl: int - :param unique_key_policy: The unique key policy configuration for - specifying uniqueness constraints on documents in the collection in the - Azure Cosmos DB service. - :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy - :param conflict_resolution_policy: The conflict resolution policy for the - graph. - :type conflict_resolution_policy: - ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - } - - def __init__(self, *, id: str, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, **kwargs) -> None: - super(GremlinGraphResource, self).__init__(**kwargs) - self.id = id - self.indexing_policy = indexing_policy - self.partition_key = partition_key - self.default_ttl = default_ttl - self.unique_key_policy = unique_key_policy - self.conflict_resolution_policy = conflict_resolution_policy diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/included_path.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/included_path.py deleted file mode 100644 index 3b49279501dd..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/included_path.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 IncludedPath(Model): - """The paths that are included in indexing. - - :param path: The path for which the indexing behavior applies to. Index - paths typically start with root and end with wildcard (/path/*) - :type path: str - :param indexes: List of indexes for this path - :type indexes: list[~azure.mgmt.cosmosdb.models.Indexes] - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'indexes': {'key': 'indexes', 'type': '[Indexes]'}, - } - - def __init__(self, **kwargs): - super(IncludedPath, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.indexes = kwargs.get('indexes', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/included_path_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/included_path_py3.py deleted file mode 100644 index d16e72ee197f..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/included_path_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 IncludedPath(Model): - """The paths that are included in indexing. - - :param path: The path for which the indexing behavior applies to. Index - paths typically start with root and end with wildcard (/path/*) - :type path: str - :param indexes: List of indexes for this path - :type indexes: list[~azure.mgmt.cosmosdb.models.Indexes] - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'indexes': {'key': 'indexes', 'type': '[Indexes]'}, - } - - def __init__(self, *, path: str=None, indexes=None, **kwargs) -> None: - super(IncludedPath, self).__init__(**kwargs) - self.path = path - self.indexes = indexes diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexes.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexes.py deleted file mode 100644 index 94c1007f9a39..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexes.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 Indexes(Model): - """The indexes for the path. - - :param data_type: The datatype for which the indexing behavior is applied - to. Possible values include: 'String', 'Number', 'Point', 'Polygon', - 'LineString', 'MultiPolygon'. Default value: "String" . - :type data_type: str or ~azure.mgmt.cosmosdb.models.DataType - :param precision: The precision of the index. -1 is maximum precision. - :type precision: int - :param kind: Indicates the type of index. Possible values include: 'Hash', - 'Range', 'Spatial'. Default value: "Hash" . - :type kind: str or ~azure.mgmt.cosmosdb.models.IndexKind - """ - - _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'precision': {'key': 'precision', 'type': 'int'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Indexes, self).__init__(**kwargs) - self.data_type = kwargs.get('data_type', "String") - self.precision = kwargs.get('precision', None) - self.kind = kwargs.get('kind', "Hash") diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexes_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexes_py3.py deleted file mode 100644 index 436c7f787d07..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexes_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 Indexes(Model): - """The indexes for the path. - - :param data_type: The datatype for which the indexing behavior is applied - to. Possible values include: 'String', 'Number', 'Point', 'Polygon', - 'LineString', 'MultiPolygon'. Default value: "String" . - :type data_type: str or ~azure.mgmt.cosmosdb.models.DataType - :param precision: The precision of the index. -1 is maximum precision. - :type precision: int - :param kind: Indicates the type of index. Possible values include: 'Hash', - 'Range', 'Spatial'. Default value: "Hash" . - :type kind: str or ~azure.mgmt.cosmosdb.models.IndexKind - """ - - _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'precision': {'key': 'precision', 'type': 'int'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, data_type="String", precision: int=None, kind="Hash", **kwargs) -> None: - super(Indexes, self).__init__(**kwargs) - self.data_type = data_type - self.precision = precision - self.kind = kind diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexing_policy.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexing_policy.py deleted file mode 100644 index 1f52ca8c31ff..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexing_policy.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 IndexingPolicy(Model): - """Cosmos DB indexing policy. - - :param automatic: Indicates if the indexing policy is automatic - :type automatic: bool - :param indexing_mode: Indicates the indexing mode. Possible values - include: 'Consistent', 'Lazy', 'None'. Default value: "Consistent" . - :type indexing_mode: str or ~azure.mgmt.cosmosdb.models.IndexingMode - :param included_paths: List of paths to include in the indexing - :type included_paths: list[~azure.mgmt.cosmosdb.models.IncludedPath] - :param excluded_paths: List of paths to exclude from indexing - :type excluded_paths: list[~azure.mgmt.cosmosdb.models.ExcludedPath] - """ - - _attribute_map = { - 'automatic': {'key': 'automatic', 'type': 'bool'}, - 'indexing_mode': {'key': 'indexingMode', 'type': 'str'}, - 'included_paths': {'key': 'includedPaths', 'type': '[IncludedPath]'}, - 'excluded_paths': {'key': 'excludedPaths', 'type': '[ExcludedPath]'}, - } - - def __init__(self, **kwargs): - super(IndexingPolicy, self).__init__(**kwargs) - self.automatic = kwargs.get('automatic', None) - self.indexing_mode = kwargs.get('indexing_mode', "Consistent") - self.included_paths = kwargs.get('included_paths', None) - self.excluded_paths = kwargs.get('excluded_paths', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexing_policy_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexing_policy_py3.py deleted file mode 100644 index eba8cb12589d..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/indexing_policy_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 IndexingPolicy(Model): - """Cosmos DB indexing policy. - - :param automatic: Indicates if the indexing policy is automatic - :type automatic: bool - :param indexing_mode: Indicates the indexing mode. Possible values - include: 'Consistent', 'Lazy', 'None'. Default value: "Consistent" . - :type indexing_mode: str or ~azure.mgmt.cosmosdb.models.IndexingMode - :param included_paths: List of paths to include in the indexing - :type included_paths: list[~azure.mgmt.cosmosdb.models.IncludedPath] - :param excluded_paths: List of paths to exclude from indexing - :type excluded_paths: list[~azure.mgmt.cosmosdb.models.ExcludedPath] - """ - - _attribute_map = { - 'automatic': {'key': 'automatic', 'type': 'bool'}, - 'indexing_mode': {'key': 'indexingMode', 'type': 'str'}, - 'included_paths': {'key': 'includedPaths', 'type': '[IncludedPath]'}, - 'excluded_paths': {'key': 'excludedPaths', 'type': '[ExcludedPath]'}, - } - - def __init__(self, *, automatic: bool=None, indexing_mode="Consistent", included_paths=None, excluded_paths=None, **kwargs) -> None: - super(IndexingPolicy, self).__init__(**kwargs) - self.automatic = automatic - self.indexing_mode = indexing_mode - self.included_paths = included_paths - self.excluded_paths = excluded_paths diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/location.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/location.py deleted file mode 100644 index 051206f0963f..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/location.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 Location(Model): - """A region in which the Azure Cosmos DB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - :param is_zone_redundant: Flag to indicate whether or not this region is - an AvailabilityZone region - :type is_zone_redundant: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - 'is_zone_redundant': {'key': 'isZoneRedundant', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(Location, self).__init__(**kwargs) - self.id = None - self.location_name = kwargs.get('location_name', None) - self.document_endpoint = None - self.provisioning_state = kwargs.get('provisioning_state', None) - self.failover_priority = kwargs.get('failover_priority', None) - self.is_zone_redundant = kwargs.get('is_zone_redundant', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/location_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/location_py3.py deleted file mode 100644 index d40a5ce80d19..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/location_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 Location(Model): - """A region in which the Azure Cosmos DB database account is deployed. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique identifier of the region within the database account. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region. - :type location_name: str - :ivar document_endpoint: The connection endpoint for the specific region. - Example: - https://<accountName>-<locationName>.documents.azure.com:443/ - :vartype document_endpoint: str - :param provisioning_state: - :type provisioning_state: str - :param failover_priority: The failover priority of the region. A failover - priority of 0 indicates a write region. The maximum value for a failover - priority = (total number of regions - 1). Failover priority values must be - unique for each of the regions in which the database account exists. - :type failover_priority: int - :param is_zone_redundant: Flag to indicate whether or not this region is - an AvailabilityZone region - :type is_zone_redundant: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - 'is_zone_redundant': {'key': 'isZoneRedundant', 'type': 'bool'}, - } - - def __init__(self, *, location_name: str=None, provisioning_state: str=None, failover_priority: int=None, is_zone_redundant: bool=None, **kwargs) -> None: - super(Location, self).__init__(**kwargs) - self.id = None - self.location_name = location_name - self.document_endpoint = None - self.provisioning_state = provisioning_state - self.failover_priority = failover_priority - self.is_zone_redundant = is_zone_redundant diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric.py deleted file mode 100644 index ab7b78168c72..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 Metric(Model): - """Metric data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time grain to be used to summarize the metric - values. - :vartype time_grain: str - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.cosmosdb.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, **kwargs): - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = kwargs.get('unit', None) - self.name = None - self.metric_values = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_availability.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_availability.py deleted file mode 100644 index 3158a74ce99a..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_availability.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 MetricAvailability(Model): - """The availability of the metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar time_grain: The time grain to be used to summarize the metric - values. - :vartype time_grain: str - :ivar retention: The retention for the metric values. - :vartype retention: str - """ - - _validation = { - 'time_grain': {'readonly': True}, - 'retention': {'readonly': True}, - } - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricAvailability, self).__init__(**kwargs) - self.time_grain = None - self.retention = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_availability_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_availability_py3.py deleted file mode 100644 index 0da15e806cb7..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_availability_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 MetricAvailability(Model): - """The availability of the metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar time_grain: The time grain to be used to summarize the metric - values. - :vartype time_grain: str - :ivar retention: The retention for the metric values. - :vartype retention: str - """ - - _validation = { - 'time_grain': {'readonly': True}, - 'retention': {'readonly': True}, - } - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricAvailability, self).__init__(**kwargs) - self.time_grain = None - self.retention = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_definition.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_definition.py deleted file mode 100644 index 7cbbbe13aafb..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_definition.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 MetricDefinition(Model): - """The definition of a metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar metric_availabilities: The list of metric availabilities for the - account. - :vartype metric_availabilities: - list[~azure.mgmt.cosmosdb.models.MetricAvailability] - :ivar primary_aggregation_type: The primary aggregation type of the - metric. Possible values include: 'None', 'Average', 'Total', 'Minimimum', - 'Maximum', 'Last' - :vartype primary_aggregation_type: str or - ~azure.mgmt.cosmosdb.models.PrimaryAggregationType - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - """ - - _validation = { - 'metric_availabilities': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - } - - def __init__(self, **kwargs): - super(MetricDefinition, self).__init__(**kwargs) - self.metric_availabilities = None - self.primary_aggregation_type = None - self.unit = kwargs.get('unit', None) - self.resource_uri = None - self.name = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_definition_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_definition_paged.py deleted file mode 100644 index 19880602a471..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 MetricDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`MetricDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MetricDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_definition_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_definition_py3.py deleted file mode 100644 index 23100a92f942..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_definition_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 MetricDefinition(Model): - """The definition of a metric. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar metric_availabilities: The list of metric availabilities for the - account. - :vartype metric_availabilities: - list[~azure.mgmt.cosmosdb.models.MetricAvailability] - :ivar primary_aggregation_type: The primary aggregation type of the - metric. Possible values include: 'None', 'Average', 'Total', 'Minimimum', - 'Maximum', 'Last' - :vartype primary_aggregation_type: str or - ~azure.mgmt.cosmosdb.models.PrimaryAggregationType - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar resource_uri: The resource uri of the database. - :vartype resource_uri: str - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - """ - - _validation = { - 'metric_availabilities': {'readonly': True}, - 'primary_aggregation_type': {'readonly': True}, - 'resource_uri': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, - 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - } - - def __init__(self, *, unit=None, **kwargs) -> None: - super(MetricDefinition, self).__init__(**kwargs) - self.metric_availabilities = None - self.primary_aggregation_type = None - self.unit = unit - self.resource_uri = None - self.name = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_name.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_name.py deleted file mode 100644 index fd3e3d504c9d..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_name.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 MetricName(Model): - """A metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the metric. - :vartype value: str - :ivar localized_value: The friendly name of the metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_name_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_name_py3.py deleted file mode 100644 index 811d94729969..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_name_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 MetricName(Model): - """A metric name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The name of the metric. - :vartype value: str - :ivar localized_value: The friendly name of the metric. - :vartype localized_value: str - """ - - _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricName, self).__init__(**kwargs) - self.value = None - self.localized_value = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_paged.py deleted file mode 100644 index a4ad91ebb38e..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 MetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`Metric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Metric]'} - } - - def __init__(self, *args, **kwargs): - - super(MetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_py3.py deleted file mode 100644 index 61f368c2e7a4..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 Metric(Model): - """Metric data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time grain to be used to summarize the metric - values. - :vartype time_grain: str - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.cosmosdb.models.MetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - } - - def __init__(self, *, unit=None, **kwargs) -> None: - super(Metric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = unit - self.name = None - self.metric_values = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_value.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_value.py deleted file mode 100644 index ba9585752ce4..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_value.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 MetricValue(Model): - """Represents metrics values. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _count: The number of values for the metric. - :vartype _count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - '_count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - '_count': {'key': '_count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(MetricValue, self).__init__(**kwargs) - self._count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_value_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_value_py3.py deleted file mode 100644 index bbe471459725..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/metric_value_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 MetricValue(Model): - """Represents metrics values. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _count: The number of values for the metric. - :vartype _count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - """ - - _validation = { - '_count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - } - - _attribute_map = { - '_count': {'key': '_count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(MetricValue, self).__init__(**kwargs) - self._count = None - self.average = None - self.maximum = None - self.minimum = None - self.timestamp = None - self.total = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection.py deleted file mode 100644 index 81960b95a5a8..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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 .resource import Resource - - -class MongoDBCollection(Resource): - """An Azure Cosmos DB MongoDB collection. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param mongo_db_collection_id: Required. Name of the Cosmos DB MongoDB - collection - :type mongo_db_collection_id: str - :param shard_key: A key-value pair of shard keys to be applied for the - request. - :type shard_key: dict[str, str] - :param indexes: List of index keys - :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'mongo_db_collection_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_db_collection_id': {'key': 'properties.id', 'type': 'str'}, - 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, - 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, - } - - def __init__(self, **kwargs): - super(MongoDBCollection, self).__init__(**kwargs) - self.mongo_db_collection_id = kwargs.get('mongo_db_collection_id', None) - self.shard_key = kwargs.get('shard_key', None) - self.indexes = kwargs.get('indexes', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters.py deleted file mode 100644 index 7a2c13306802..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 MongoDBCollectionCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB MongoDB collection. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a MongoDB - collection - :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MongoDBCollectionCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters_py3.py deleted file mode 100644 index 75bb425636f9..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 MongoDBCollectionCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB MongoDB collection. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a MongoDB - collection - :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(MongoDBCollectionCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_paged.py deleted file mode 100644 index 23a141813c1d..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 MongoDBCollectionPaged(Paged): - """ - A paging container for iterating over a list of :class:`MongoDBCollection ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MongoDBCollection]'} - } - - def __init__(self, *args, **kwargs): - - super(MongoDBCollectionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_py3.py deleted file mode 100644 index dd5ee81d8f75..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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 .resource_py3 import Resource - - -class MongoDBCollection(Resource): - """An Azure Cosmos DB MongoDB collection. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param mongo_db_collection_id: Required. Name of the Cosmos DB MongoDB - collection - :type mongo_db_collection_id: str - :param shard_key: A key-value pair of shard keys to be applied for the - request. - :type shard_key: dict[str, str] - :param indexes: List of index keys - :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'mongo_db_collection_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_db_collection_id': {'key': 'properties.id', 'type': 'str'}, - 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, - 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, - } - - def __init__(self, *, mongo_db_collection_id: str, location: str=None, tags=None, shard_key=None, indexes=None, **kwargs) -> None: - super(MongoDBCollection, self).__init__(location=location, tags=tags, **kwargs) - self.mongo_db_collection_id = mongo_db_collection_id - self.shard_key = shard_key - self.indexes = indexes diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource.py deleted file mode 100644 index c185d20728e3..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 MongoDBCollectionResource(Model): - """Cosmos DB MongoDB collection resource object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB MongoDB collection - :type id: str - :param shard_key: A key-value pair of shard keys to be applied for the - request. - :type shard_key: dict[str, str] - :param indexes: List of index keys - :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'shard_key': {'key': 'shardKey', 'type': '{str}'}, - 'indexes': {'key': 'indexes', 'type': '[MongoIndex]'}, - } - - def __init__(self, **kwargs): - super(MongoDBCollectionResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.shard_key = kwargs.get('shard_key', None) - self.indexes = kwargs.get('indexes', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource_py3.py deleted file mode 100644 index e8ec98955296..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 MongoDBCollectionResource(Model): - """Cosmos DB MongoDB collection resource object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB MongoDB collection - :type id: str - :param shard_key: A key-value pair of shard keys to be applied for the - request. - :type shard_key: dict[str, str] - :param indexes: List of index keys - :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'shard_key': {'key': 'shardKey', 'type': '{str}'}, - 'indexes': {'key': 'indexes', 'type': '[MongoIndex]'}, - } - - def __init__(self, *, id: str, shard_key=None, indexes=None, **kwargs) -> None: - super(MongoDBCollectionResource, self).__init__(**kwargs) - self.id = id - self.shard_key = shard_key - self.indexes = indexes diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database.py deleted file mode 100644 index 490235867302..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 .resource import Resource - - -class MongoDBDatabase(Resource): - """An Azure Cosmos DB MongoDB database. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param mongo_db_database_id: Required. Name of the Cosmos DB MongoDB - database - :type mongo_db_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'mongo_db_database_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_db_database_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MongoDBDatabase, self).__init__(**kwargs) - self.mongo_db_database_id = kwargs.get('mongo_db_database_id', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters.py deleted file mode 100644 index b0fce2563681..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 MongoDBDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB MongoDB database. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a MongoDB database - :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MongoDBDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters_py3.py deleted file mode 100644 index b5af74515b54..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 MongoDBDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB MongoDB database. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a MongoDB database - :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(MongoDBDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_paged.py deleted file mode 100644 index 2c21682a11d2..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 MongoDBDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`MongoDBDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MongoDBDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(MongoDBDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_py3.py deleted file mode 100644 index 53fab5970c5c..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 .resource_py3 import Resource - - -class MongoDBDatabase(Resource): - """An Azure Cosmos DB MongoDB database. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param mongo_db_database_id: Required. Name of the Cosmos DB MongoDB - database - :type mongo_db_database_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'mongo_db_database_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_db_database_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, mongo_db_database_id: str, location: str=None, tags=None, **kwargs) -> None: - super(MongoDBDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.mongo_db_database_id = mongo_db_database_id diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource.py deleted file mode 100644 index 0364b5c87311..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 MongoDBDatabaseResource(Model): - """Cosmos DB MongoDB database id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB MongoDB database - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MongoDBDatabaseResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource_py3.py deleted file mode 100644 index afaf2e50ce68..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 MongoDBDatabaseResource(Model): - """Cosmos DB MongoDB database id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB MongoDB database - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(MongoDBDatabaseResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index.py deleted file mode 100644 index 0b2c90cd6b0b..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 MongoIndex(Model): - """Cosmos DB MongoDB collection index key. - - :param key: Cosmos DB MongoDB collection index keys - :type key: ~azure.mgmt.cosmosdb.models.MongoIndexKeys - :param options: Cosmos DB MongoDB collection index key options - :type options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'MongoIndexKeys'}, - 'options': {'key': 'options', 'type': 'MongoIndexOptions'}, - } - - def __init__(self, **kwargs): - super(MongoIndex, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.options = kwargs.get('options', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys.py deleted file mode 100644 index 71503206d483..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 MongoIndexKeys(Model): - """Cosmos DB MongoDB collection resource object. - - :param keys: List of keys for each MongoDB collection in the Azure Cosmos - DB service - :type keys: list[str] - """ - - _attribute_map = { - 'keys': {'key': 'keys', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(MongoIndexKeys, self).__init__(**kwargs) - self.keys = kwargs.get('keys', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys_py3.py deleted file mode 100644 index adda5726c0a1..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 MongoIndexKeys(Model): - """Cosmos DB MongoDB collection resource object. - - :param keys: List of keys for each MongoDB collection in the Azure Cosmos - DB service - :type keys: list[str] - """ - - _attribute_map = { - 'keys': {'key': 'keys', 'type': '[str]'}, - } - - def __init__(self, *, keys=None, **kwargs) -> None: - super(MongoIndexKeys, self).__init__(**kwargs) - self.keys = keys diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options.py deleted file mode 100644 index 6918f577ff80..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 MongoIndexOptions(Model): - """Cosmos DB MongoDB collection index options. - - :param expire_after_seconds: Expire after seconds - :type expire_after_seconds: int - :param unique: Is unique or not - :type unique: bool - """ - - _attribute_map = { - 'expire_after_seconds': {'key': 'expireAfterSeconds', 'type': 'int'}, - 'unique': {'key': 'unique', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MongoIndexOptions, self).__init__(**kwargs) - self.expire_after_seconds = kwargs.get('expire_after_seconds', None) - self.unique = kwargs.get('unique', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options_py3.py deleted file mode 100644 index b76263dd17f7..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 MongoIndexOptions(Model): - """Cosmos DB MongoDB collection index options. - - :param expire_after_seconds: Expire after seconds - :type expire_after_seconds: int - :param unique: Is unique or not - :type unique: bool - """ - - _attribute_map = { - 'expire_after_seconds': {'key': 'expireAfterSeconds', 'type': 'int'}, - 'unique': {'key': 'unique', 'type': 'bool'}, - } - - def __init__(self, *, expire_after_seconds: int=None, unique: bool=None, **kwargs) -> None: - super(MongoIndexOptions, self).__init__(**kwargs) - self.expire_after_seconds = expire_after_seconds - self.unique = unique diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_py3.py deleted file mode 100644 index 380dd454e06f..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 MongoIndex(Model): - """Cosmos DB MongoDB collection index key. - - :param key: Cosmos DB MongoDB collection index keys - :type key: ~azure.mgmt.cosmosdb.models.MongoIndexKeys - :param options: Cosmos DB MongoDB collection index key options - :type options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'MongoIndexKeys'}, - 'options': {'key': 'options', 'type': 'MongoIndexOptions'}, - } - - def __init__(self, *, key=None, options=None, **kwargs) -> None: - super(MongoIndex, self).__init__(**kwargs) - self.key = key - self.options = options diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation.py deleted file mode 100644 index e0445c09f516..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.cosmosdb.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_display.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_display.py deleted file mode 100644 index 3fc650540a64..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_display.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.ResourceProvider - :type provider: str - :param resource: Resource on which the operation is performed: Profile, - endpoint, etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - :param description: Description of operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'Provider', 'type': 'str'}, - 'resource': {'key': 'Resource', 'type': 'str'}, - 'operation': {'key': 'Operation', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_display_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_display_py3.py deleted file mode 100644 index 7a2edcb7cd56..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_display_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.ResourceProvider - :type provider: str - :param resource: Resource on which the operation is performed: Profile, - endpoint, etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - :param description: Description of operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'Provider', 'type': 'str'}, - 'resource': {'key': 'Resource', 'type': 'str'}, - 'operation': {'key': 'Operation', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_paged.py deleted file mode 100644 index 7332ac68e4e1..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_py3.py deleted file mode 100644 index 06e896c83984..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.cosmosdb.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_metric.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_metric.py deleted file mode 100644 index c18fed6e6bfe..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_metric.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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 .metric import Metric - - -class PartitionMetric(Metric): - """The metric values for a single partition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time grain to be used to summarize the metric - values. - :vartype time_grain: str - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.cosmosdb.models.MetricValue] - :ivar partition_id: The partition id (GUID identifier) of the metric - values. - :vartype partition_id: str - :ivar partition_key_range_id: The partition key range id (integer - identifier) of the metric values. - :vartype partition_key_range_id: str - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'partition_id': {'readonly': True}, - 'partition_key_range_id': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - 'partition_id': {'key': 'partitionId', 'type': 'str'}, - 'partition_key_range_id': {'key': 'partitionKeyRangeId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartitionMetric, self).__init__(**kwargs) - self.partition_id = None - self.partition_key_range_id = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_metric_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_metric_paged.py deleted file mode 100644 index edce53740319..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 PartitionMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`PartitionMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PartitionMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(PartitionMetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_metric_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_metric_py3.py deleted file mode 100644 index 875351ddd481..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_metric_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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 .metric_py3 import Metric - - -class PartitionMetric(Metric): - """The metric values for a single partition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time grain to be used to summarize the metric - values. - :vartype time_grain: str - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - :ivar metric_values: The metric values for the specified time window and - timestep. - :vartype metric_values: list[~azure.mgmt.cosmosdb.models.MetricValue] - :ivar partition_id: The partition id (GUID identifier) of the metric - values. - :vartype partition_id: str - :ivar partition_key_range_id: The partition key range id (integer - identifier) of the metric values. - :vartype partition_key_range_id: str - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - 'partition_id': {'readonly': True}, - 'partition_key_range_id': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, - 'partition_id': {'key': 'partitionId', 'type': 'str'}, - 'partition_key_range_id': {'key': 'partitionKeyRangeId', 'type': 'str'}, - } - - def __init__(self, *, unit=None, **kwargs) -> None: - super(PartitionMetric, self).__init__(unit=unit, **kwargs) - self.partition_id = None - self.partition_key_range_id = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_usage.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_usage.py deleted file mode 100644 index aed8ead18a65..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_usage.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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 .usage import Usage - - -class PartitionUsage(Usage): - """The partition level usage data for a usage request. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - :ivar quota_period: The quota period used to summarize the usage values. - :vartype quota_period: str - :ivar limit: Maximum value for this metric - :vartype limit: long - :ivar current_value: Current value for this metric - :vartype current_value: long - :ivar partition_id: The partition id (GUID identifier) of the usages. - :vartype partition_id: str - :ivar partition_key_range_id: The partition key range id (integer - identifier) of the usages. - :vartype partition_key_range_id: str - """ - - _validation = { - 'name': {'readonly': True}, - 'quota_period': {'readonly': True}, - 'limit': {'readonly': True}, - 'current_value': {'readonly': True}, - 'partition_id': {'readonly': True}, - 'partition_key_range_id': {'readonly': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'partition_id': {'key': 'partitionId', 'type': 'str'}, - 'partition_key_range_id': {'key': 'partitionKeyRangeId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartitionUsage, self).__init__(**kwargs) - self.partition_id = None - self.partition_key_range_id = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_usage_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_usage_paged.py deleted file mode 100644 index 2fbbc8eb4ac7..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 PartitionUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`PartitionUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PartitionUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(PartitionUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_usage_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_usage_py3.py deleted file mode 100644 index c4d5b203f445..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/partition_usage_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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 .usage_py3 import Usage - - -class PartitionUsage(Usage): - """The partition level usage data for a usage request. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - :ivar quota_period: The quota period used to summarize the usage values. - :vartype quota_period: str - :ivar limit: Maximum value for this metric - :vartype limit: long - :ivar current_value: Current value for this metric - :vartype current_value: long - :ivar partition_id: The partition id (GUID identifier) of the usages. - :vartype partition_id: str - :ivar partition_key_range_id: The partition key range id (integer - identifier) of the usages. - :vartype partition_key_range_id: str - """ - - _validation = { - 'name': {'readonly': True}, - 'quota_period': {'readonly': True}, - 'limit': {'readonly': True}, - 'current_value': {'readonly': True}, - 'partition_id': {'readonly': True}, - 'partition_key_range_id': {'readonly': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'partition_id': {'key': 'partitionId', 'type': 'str'}, - 'partition_key_range_id': {'key': 'partitionKeyRangeId', 'type': 'str'}, - } - - def __init__(self, *, unit=None, **kwargs) -> None: - super(PartitionUsage, self).__init__(unit=unit, **kwargs) - self.partition_id = None - self.partition_key_range_id = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric.py deleted file mode 100644 index 183b1cedab90..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 PercentileMetric(Model): - """Percentile Metric data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time grain to be used to summarize the metric - values. - :vartype time_grain: str - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - :ivar metric_values: The percentile metric values for the specified time - window and timestep. - :vartype metric_values: - list[~azure.mgmt.cosmosdb.models.PercentileMetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[PercentileMetricValue]'}, - } - - def __init__(self, **kwargs): - super(PercentileMetric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = kwargs.get('unit', None) - self.name = None - self.metric_values = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_paged.py deleted file mode 100644 index 4cd146af973e..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 PercentileMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`PercentileMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PercentileMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(PercentileMetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_py3.py deleted file mode 100644 index 665dad9c9a04..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 PercentileMetric(Model): - """Percentile Metric data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: The start time for the metric (ISO-8601 format). - :vartype start_time: datetime - :ivar end_time: The end time for the metric (ISO-8601 format). - :vartype end_time: datetime - :ivar time_grain: The time grain to be used to summarize the metric - values. - :vartype time_grain: str - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - :ivar metric_values: The percentile metric values for the specified time - window and timestep. - :vartype metric_values: - list[~azure.mgmt.cosmosdb.models.PercentileMetricValue] - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'time_grain': {'readonly': True}, - 'name': {'readonly': True}, - 'metric_values': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'metric_values': {'key': 'metricValues', 'type': '[PercentileMetricValue]'}, - } - - def __init__(self, *, unit=None, **kwargs) -> None: - super(PercentileMetric, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.time_grain = None - self.unit = unit - self.name = None - self.metric_values = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_value.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_value.py deleted file mode 100644 index 5e11e347b3c5..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_value.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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 .metric_value import MetricValue - - -class PercentileMetricValue(MetricValue): - """Represents percentile metrics values. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _count: The number of values for the metric. - :vartype _count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - :ivar p10: The 10th percentile value for the metric. - :vartype p10: float - :ivar p25: The 25th percentile value for the metric. - :vartype p25: float - :ivar p50: The 50th percentile value for the metric. - :vartype p50: float - :ivar p75: The 75th percentile value for the metric. - :vartype p75: float - :ivar p90: The 90th percentile value for the metric. - :vartype p90: float - :ivar p95: The 95th percentile value for the metric. - :vartype p95: float - :ivar p99: The 99th percentile value for the metric. - :vartype p99: float - """ - - _validation = { - '_count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - 'p10': {'readonly': True}, - 'p25': {'readonly': True}, - 'p50': {'readonly': True}, - 'p75': {'readonly': True}, - 'p90': {'readonly': True}, - 'p95': {'readonly': True}, - 'p99': {'readonly': True}, - } - - _attribute_map = { - '_count': {'key': '_count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - 'p10': {'key': 'P10', 'type': 'float'}, - 'p25': {'key': 'P25', 'type': 'float'}, - 'p50': {'key': 'P50', 'type': 'float'}, - 'p75': {'key': 'P75', 'type': 'float'}, - 'p90': {'key': 'P90', 'type': 'float'}, - 'p95': {'key': 'P95', 'type': 'float'}, - 'p99': {'key': 'P99', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(PercentileMetricValue, self).__init__(**kwargs) - self.p10 = None - self.p25 = None - self.p50 = None - self.p75 = None - self.p90 = None - self.p95 = None - self.p99 = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_value_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_value_py3.py deleted file mode 100644 index 7daee7f4b6b3..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/percentile_metric_value_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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 .metric_value_py3 import MetricValue - - -class PercentileMetricValue(MetricValue): - """Represents percentile metrics values. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _count: The number of values for the metric. - :vartype _count: float - :ivar average: The average value of the metric. - :vartype average: float - :ivar maximum: The max value of the metric. - :vartype maximum: float - :ivar minimum: The min value of the metric. - :vartype minimum: float - :ivar timestamp: The metric timestamp (ISO-8601 format). - :vartype timestamp: datetime - :ivar total: The total value of the metric. - :vartype total: float - :ivar p10: The 10th percentile value for the metric. - :vartype p10: float - :ivar p25: The 25th percentile value for the metric. - :vartype p25: float - :ivar p50: The 50th percentile value for the metric. - :vartype p50: float - :ivar p75: The 75th percentile value for the metric. - :vartype p75: float - :ivar p90: The 90th percentile value for the metric. - :vartype p90: float - :ivar p95: The 95th percentile value for the metric. - :vartype p95: float - :ivar p99: The 99th percentile value for the metric. - :vartype p99: float - """ - - _validation = { - '_count': {'readonly': True}, - 'average': {'readonly': True}, - 'maximum': {'readonly': True}, - 'minimum': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'total': {'readonly': True}, - 'p10': {'readonly': True}, - 'p25': {'readonly': True}, - 'p50': {'readonly': True}, - 'p75': {'readonly': True}, - 'p90': {'readonly': True}, - 'p95': {'readonly': True}, - 'p99': {'readonly': True}, - } - - _attribute_map = { - '_count': {'key': '_count', 'type': 'float'}, - 'average': {'key': 'average', 'type': 'float'}, - 'maximum': {'key': 'maximum', 'type': 'float'}, - 'minimum': {'key': 'minimum', 'type': 'float'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'total': {'key': 'total', 'type': 'float'}, - 'p10': {'key': 'P10', 'type': 'float'}, - 'p25': {'key': 'P25', 'type': 'float'}, - 'p50': {'key': 'P50', 'type': 'float'}, - 'p75': {'key': 'P75', 'type': 'float'}, - 'p90': {'key': 'P90', 'type': 'float'}, - 'p95': {'key': 'P95', 'type': 'float'}, - 'p99': {'key': 'P99', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(PercentileMetricValue, self).__init__(**kwargs) - self.p10 = None - self.p25 = None - self.p50 = None - self.p75 = None - self.p90 = None - self.p95 = None - self.p99 = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/region_for_online_offline.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/region_for_online_offline.py deleted file mode 100644 index 0d4194905dda..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/region_for_online_offline.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 RegionForOnlineOffline(Model): - """Cosmos DB region to online or offline. - - All required parameters must be populated in order to send to Azure. - - :param region: Required. Cosmos DB region, with spaces between words and - each word capitalized. - :type region: str - """ - - _validation = { - 'region': {'required': True}, - } - - _attribute_map = { - 'region': {'key': 'region', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegionForOnlineOffline, self).__init__(**kwargs) - self.region = kwargs.get('region', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/region_for_online_offline_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/region_for_online_offline_py3.py deleted file mode 100644 index 2eafcd11d29a..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/region_for_online_offline_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 RegionForOnlineOffline(Model): - """Cosmos DB region to online or offline. - - All required parameters must be populated in order to send to Azure. - - :param region: Required. Cosmos DB region, with spaces between words and - each word capitalized. - :type region: str - """ - - _validation = { - 'region': {'required': True}, - } - - _attribute_map = { - 'region': {'key': 'region', 'type': 'str'}, - } - - def __init__(self, *, region: str, **kwargs) -> None: - super(RegionForOnlineOffline, self).__init__(**kwargs) - self.region = region diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/resource.py deleted file mode 100644 index 2974ab9647e4..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 Resource(Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/resource_py3.py deleted file mode 100644 index 9b7141be5779..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/resource_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 Resource(Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container.py deleted file mode 100644 index 493de87a639d..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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 .resource import Resource - - -class SqlContainer(Resource): - """An Azure Cosmos DB container. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param sql_container_id: Required. Name of the Cosmos DB SQL container - :type sql_container_id: str - :param indexing_policy: The configuration of the indexing policy. By - default, the indexing is automatic for all document paths within the - container - :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy - :param partition_key: The configuration of the partition key to be used - for partitioning data into multiple partitions - :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey - :param default_ttl: Default time to live - :type default_ttl: int - :param unique_key_policy: The unique key policy configuration for - specifying uniqueness constraints on documents in the collection in the - Azure Cosmos DB service. - :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy - :param conflict_resolution_policy: The conflict resolution policy for the - container. - :type conflict_resolution_policy: - ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sql_container_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_container_id': {'key': 'properties.id', 'type': 'str'}, - 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SqlContainer, self).__init__(**kwargs) - self.sql_container_id = kwargs.get('sql_container_id', None) - self.indexing_policy = kwargs.get('indexing_policy', None) - self.partition_key = kwargs.get('partition_key', None) - self.default_ttl = kwargs.get('default_ttl', None) - self.unique_key_policy = kwargs.get('unique_key_policy', None) - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self._rid = kwargs.get('_rid', None) - self._ts = kwargs.get('_ts', None) - self._etag = kwargs.get('_etag', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters.py deleted file mode 100644 index a8811e3921b9..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 SqlContainerCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB container. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a container - :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(SqlContainerCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters_py3.py deleted file mode 100644 index 1c8aa8931ae2..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 SqlContainerCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB container. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a container - :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(SqlContainerCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_paged.py deleted file mode 100644 index 2c0e864195c2..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 SqlContainerPaged(Paged): - """ - A paging container for iterating over a list of :class:`SqlContainer ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SqlContainer]'} - } - - def __init__(self, *args, **kwargs): - - super(SqlContainerPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_py3.py deleted file mode 100644 index 6b6b7872fdf6..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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 .resource_py3 import Resource - - -class SqlContainer(Resource): - """An Azure Cosmos DB container. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param sql_container_id: Required. Name of the Cosmos DB SQL container - :type sql_container_id: str - :param indexing_policy: The configuration of the indexing policy. By - default, the indexing is automatic for all document paths within the - container - :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy - :param partition_key: The configuration of the partition key to be used - for partitioning data into multiple partitions - :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey - :param default_ttl: Default time to live - :type default_ttl: int - :param unique_key_policy: The unique key policy configuration for - specifying uniqueness constraints on documents in the collection in the - Azure Cosmos DB service. - :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy - :param conflict_resolution_policy: The conflict resolution policy for the - container. - :type conflict_resolution_policy: - ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sql_container_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_container_id': {'key': 'properties.id', 'type': 'str'}, - 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, - } - - def __init__(self, *, sql_container_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: - super(SqlContainer, self).__init__(location=location, tags=tags, **kwargs) - self.sql_container_id = sql_container_id - self.indexing_policy = indexing_policy - self.partition_key = partition_key - self.default_ttl = default_ttl - self.unique_key_policy = unique_key_policy - self.conflict_resolution_policy = conflict_resolution_policy - self._rid = _rid - self._ts = _ts - self._etag = _etag diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource.py deleted file mode 100644 index c2122e923895..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 SqlContainerResource(Model): - """Cosmos DB SQL container resource object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB SQL container - :type id: str - :param indexing_policy: The configuration of the indexing policy. By - default, the indexing is automatic for all document paths within the - container - :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy - :param partition_key: The configuration of the partition key to be used - for partitioning data into multiple partitions - :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey - :param default_ttl: Default time to live - :type default_ttl: int - :param unique_key_policy: The unique key policy configuration for - specifying uniqueness constraints on documents in the collection in the - Azure Cosmos DB service. - :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy - :param conflict_resolution_policy: The conflict resolution policy for the - container. - :type conflict_resolution_policy: - ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - } - - def __init__(self, **kwargs): - super(SqlContainerResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.indexing_policy = kwargs.get('indexing_policy', None) - self.partition_key = kwargs.get('partition_key', None) - self.default_ttl = kwargs.get('default_ttl', None) - self.unique_key_policy = kwargs.get('unique_key_policy', None) - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource_py3.py deleted file mode 100644 index 9c112bad6507..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 SqlContainerResource(Model): - """Cosmos DB SQL container resource object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB SQL container - :type id: str - :param indexing_policy: The configuration of the indexing policy. By - default, the indexing is automatic for all document paths within the - container - :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy - :param partition_key: The configuration of the partition key to be used - for partitioning data into multiple partitions - :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey - :param default_ttl: Default time to live - :type default_ttl: int - :param unique_key_policy: The unique key policy configuration for - specifying uniqueness constraints on documents in the collection in the - Azure Cosmos DB service. - :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy - :param conflict_resolution_policy: The conflict resolution policy for the - container. - :type conflict_resolution_policy: - ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - } - - def __init__(self, *, id: str, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, **kwargs) -> None: - super(SqlContainerResource, self).__init__(**kwargs) - self.id = id - self.indexing_policy = indexing_policy - self.partition_key = partition_key - self.default_ttl = default_ttl - self.unique_key_policy = unique_key_policy - self.conflict_resolution_policy = conflict_resolution_policy diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database.py deleted file mode 100644 index bcd3b6845e6f..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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 .resource import Resource - - -class SqlDatabase(Resource): - """An Azure Cosmos DB SQL database. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param sql_database_id: Required. Name of the Cosmos DB SQL database - :type sql_database_id: str - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str - :param _colls: A system generated property that specified the addressable - path of the collections resource. - :type _colls: str - :param _users: A system generated property that specifies the addressable - path of the users resource. - :type _users: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sql_database_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_database_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, - '_colls': {'key': 'properties._colls', 'type': 'str'}, - '_users': {'key': 'properties._users', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SqlDatabase, self).__init__(**kwargs) - self.sql_database_id = kwargs.get('sql_database_id', None) - self._rid = kwargs.get('_rid', None) - self._ts = kwargs.get('_ts', None) - self._etag = kwargs.get('_etag', None) - self._colls = kwargs.get('_colls', None) - self._users = kwargs.get('_users', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_create_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_create_update_parameters.py deleted file mode 100644 index 26325eb6b0d4..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_create_update_parameters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 SqlDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB SQL database. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a SQL database - :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(SqlDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_create_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_create_update_parameters_py3.py deleted file mode 100644 index 99d5c43f00f5..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_create_update_parameters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 SqlDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB SQL database. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a SQL database - :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(SqlDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_paged.py deleted file mode 100644 index c455b7e6b0c8..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 SqlDatabasePaged(Paged): - """ - A paging container for iterating over a list of :class:`SqlDatabase ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SqlDatabase]'} - } - - def __init__(self, *args, **kwargs): - - super(SqlDatabasePaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_py3.py deleted file mode 100644 index 7fd40eadd9c1..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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 .resource_py3 import Resource - - -class SqlDatabase(Resource): - """An Azure Cosmos DB SQL database. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param sql_database_id: Required. Name of the Cosmos DB SQL database - :type sql_database_id: str - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str - :param _colls: A system generated property that specified the addressable - path of the collections resource. - :type _colls: str - :param _users: A system generated property that specifies the addressable - path of the users resource. - :type _users: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sql_database_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_database_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, - '_colls': {'key': 'properties._colls', 'type': 'str'}, - '_users': {'key': 'properties._users', 'type': 'str'}, - } - - def __init__(self, *, sql_database_id: str, location: str=None, tags=None, _rid: str=None, _ts=None, _etag: str=None, _colls: str=None, _users: str=None, **kwargs) -> None: - super(SqlDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.sql_database_id = sql_database_id - self._rid = _rid - self._ts = _ts - self._etag = _etag - self._colls = _colls - self._users = _users diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_resource.py deleted file mode 100644 index aa127d833169..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_resource.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 SqlDatabaseResource(Model): - """Cosmos DB SQL database id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB SQL database - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SqlDatabaseResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_resource_py3.py deleted file mode 100644 index 5eee3add3acf..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_database_resource_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 SqlDatabaseResource(Model): - """Cosmos DB SQL database id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB SQL database - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(SqlDatabaseResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table.py deleted file mode 100644 index 9e9471cdacfc..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 .resource import Resource - - -class Table(Resource): - """An Azure Cosmos DB Table. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param table_id: Required. Name of the Cosmos DB table - :type table_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'table_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'table_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Table, self).__init__(**kwargs) - self.table_id = kwargs.get('table_id', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_create_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_create_update_parameters.py deleted file mode 100644 index d137cbd174ab..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_create_update_parameters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 TableCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Table. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Table - :type resource: ~azure.mgmt.cosmosdb.models.TableResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TableCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_create_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_create_update_parameters_py3.py deleted file mode 100644 index 8df45b13e2ac..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_create_update_parameters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 TableCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Table. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Table - :type resource: ~azure.mgmt.cosmosdb.models.TableResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(TableCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_paged.py deleted file mode 100644 index 3594d381ac93..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 TablePaged(Paged): - """ - A paging container for iterating over a list of :class:`Table ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Table]'} - } - - def __init__(self, *args, **kwargs): - - super(TablePaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_py3.py deleted file mode 100644 index a715fae85b02..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 .resource_py3 import Resource - - -class Table(Resource): - """An Azure Cosmos DB Table. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param table_id: Required. Name of the Cosmos DB table - :type table_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'table_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'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'table_id': {'key': 'properties.id', 'type': 'str'}, - } - - def __init__(self, *, table_id: str, location: str=None, tags=None, **kwargs) -> None: - super(Table, self).__init__(location=location, tags=tags, **kwargs) - self.table_id = table_id diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_resource.py deleted file mode 100644 index 5f61db6973aa..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_resource.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 TableResource(Model): - """Cosmos DB table id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB table - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TableResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_resource_py3.py deleted file mode 100644 index d39d83656ec2..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/table_resource_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 TableResource(Model): - """Cosmos DB table id object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB table - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(TableResource, self).__init__(**kwargs) - self.id = id diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput.py deleted file mode 100644 index 40aa89e8adce..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 .resource import Resource - - -class Throughput(Resource): - """An Azure Cosmos DB resource throughput. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param throughput: Required. Value of the Cosmos DB resource throughput - :type throughput: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'throughput': {'required': 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}'}, - 'throughput': {'key': 'properties.throughput', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Throughput, self).__init__(**kwargs) - self.throughput = kwargs.get('throughput', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_py3.py deleted file mode 100644 index 6ed7d4252424..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 .resource_py3 import Resource - - -class Throughput(Resource): - """An Azure Cosmos DB resource throughput. - - 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: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param throughput: Required. Value of the Cosmos DB resource throughput - :type throughput: int - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'throughput': {'required': 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}'}, - 'throughput': {'key': 'properties.throughput', 'type': 'int'}, - } - - def __init__(self, *, throughput: int, location: str=None, tags=None, **kwargs) -> None: - super(Throughput, self).__init__(location=location, tags=tags, **kwargs) - self.throughput = throughput diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_resource.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_resource.py deleted file mode 100644 index e3a44627755c..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_resource.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 ThroughputResource(Model): - """Cosmos DB resource throughput object. - - All required parameters must be populated in order to send to Azure. - - :param throughput: Required. Value of the Cosmos DB resource throughput - :type throughput: int - """ - - _validation = { - 'throughput': {'required': True}, - } - - _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ThroughputResource, self).__init__(**kwargs) - self.throughput = kwargs.get('throughput', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_resource_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_resource_py3.py deleted file mode 100644 index e44bb9b13544..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_resource_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 ThroughputResource(Model): - """Cosmos DB resource throughput object. - - All required parameters must be populated in order to send to Azure. - - :param throughput: Required. Value of the Cosmos DB resource throughput - :type throughput: int - """ - - _validation = { - 'throughput': {'required': True}, - } - - _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - } - - def __init__(self, *, throughput: int, **kwargs) -> None: - super(ThroughputResource, self).__init__(**kwargs) - self.throughput = throughput diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_update_parameters.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_update_parameters.py deleted file mode 100644 index 8a1e3aa91df1..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_update_parameters.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 ThroughputUpdateParameters(Model): - """Parameters to update Cosmos DB resource throughput. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a resource - throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - """ - - _validation = { - 'resource': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'ThroughputResource'}, - } - - def __init__(self, **kwargs): - super(ThroughputUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_update_parameters_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_update_parameters_py3.py deleted file mode 100644 index 9a7f4f1f3f01..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/throughput_update_parameters_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 ThroughputUpdateParameters(Model): - """Parameters to update Cosmos DB resource throughput. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a resource - throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - """ - - _validation = { - 'resource': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'ThroughputResource'}, - } - - def __init__(self, *, resource, **kwargs) -> None: - super(ThroughputUpdateParameters, self).__init__(**kwargs) - self.resource = resource diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key.py deleted file mode 100644 index 4208cbc7965e..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 UniqueKey(Model): - """The unique key on that enforces uniqueness constraint on documents in the - collection in the Azure Cosmos DB service. - - :param paths: List of paths must be unique for each document in the Azure - Cosmos DB service - :type paths: list[str] - """ - - _attribute_map = { - 'paths': {'key': 'paths', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(UniqueKey, self).__init__(**kwargs) - self.paths = kwargs.get('paths', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key_policy.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key_policy.py deleted file mode 100644 index 40b22c3f41e5..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key_policy.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 UniqueKeyPolicy(Model): - """The unique key policy configuration for specifying uniqueness constraints - on documents in the collection in the Azure Cosmos DB service. - - :param unique_keys: List of unique keys on that enforces uniqueness - constraint on documents in the collection in the Azure Cosmos DB service. - :type unique_keys: list[~azure.mgmt.cosmosdb.models.UniqueKey] - """ - - _attribute_map = { - 'unique_keys': {'key': 'uniqueKeys', 'type': '[UniqueKey]'}, - } - - def __init__(self, **kwargs): - super(UniqueKeyPolicy, self).__init__(**kwargs) - self.unique_keys = kwargs.get('unique_keys', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key_policy_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key_policy_py3.py deleted file mode 100644 index d5d8b90941b0..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key_policy_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 UniqueKeyPolicy(Model): - """The unique key policy configuration for specifying uniqueness constraints - on documents in the collection in the Azure Cosmos DB service. - - :param unique_keys: List of unique keys on that enforces uniqueness - constraint on documents in the collection in the Azure Cosmos DB service. - :type unique_keys: list[~azure.mgmt.cosmosdb.models.UniqueKey] - """ - - _attribute_map = { - 'unique_keys': {'key': 'uniqueKeys', 'type': '[UniqueKey]'}, - } - - def __init__(self, *, unique_keys=None, **kwargs) -> None: - super(UniqueKeyPolicy, self).__init__(**kwargs) - self.unique_keys = unique_keys diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key_py3.py deleted file mode 100644 index d64e814da1f8..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/unique_key_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 UniqueKey(Model): - """The unique key on that enforces uniqueness constraint on documents in the - collection in the Azure Cosmos DB service. - - :param paths: List of paths must be unique for each document in the Azure - Cosmos DB service - :type paths: list[str] - """ - - _attribute_map = { - 'paths': {'key': 'paths', 'type': '[str]'}, - } - - def __init__(self, *, paths=None, **kwargs) -> None: - super(UniqueKey, self).__init__(**kwargs) - self.paths = paths diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/usage.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/usage.py deleted file mode 100644 index f6a463373352..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/usage.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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): - """The usage data for a usage request. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - :ivar quota_period: The quota period used to summarize the usage values. - :vartype quota_period: str - :ivar limit: Maximum value for this metric - :vartype limit: long - :ivar current_value: Current value for this metric - :vartype current_value: long - """ - - _validation = { - 'name': {'readonly': True}, - 'quota_period': {'readonly': True}, - 'limit': {'readonly': True}, - 'current_value': {'readonly': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(Usage, self).__init__(**kwargs) - self.unit = kwargs.get('unit', None) - self.name = None - self.quota_period = None - self.limit = None - self.current_value = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/usage_paged.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/usage_paged.py deleted file mode 100644 index dba4e1cb4ecd..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/usage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 UsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`Usage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Usage]'} - } - - def __init__(self, *args, **kwargs): - - super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/usage_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/usage_py3.py deleted file mode 100644 index 0361d0bae5ad..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/usage_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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): - """The usage data for a usage request. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param unit: The unit of the metric. Possible values include: 'Count', - 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', - 'Milliseconds' - :type unit: str or ~azure.mgmt.cosmosdb.models.UnitType - :ivar name: The name information for the metric. - :vartype name: ~azure.mgmt.cosmosdb.models.MetricName - :ivar quota_period: The quota period used to summarize the usage values. - :vartype quota_period: str - :ivar limit: Maximum value for this metric - :vartype limit: long - :ivar current_value: Current value for this metric - :vartype current_value: long - """ - - _validation = { - 'name': {'readonly': True}, - 'quota_period': {'readonly': True}, - 'limit': {'readonly': True}, - 'current_value': {'readonly': True}, - } - - _attribute_map = { - 'unit': {'key': 'unit', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'MetricName'}, - 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - } - - def __init__(self, *, unit=None, **kwargs) -> None: - super(Usage, self).__init__(**kwargs) - self.unit = unit - self.name = None - self.quota_period = None - self.limit = None - self.current_value = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/virtual_network_rule.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/virtual_network_rule.py deleted file mode 100644 index 0783593d217e..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/virtual_network_rule.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVNetServiceEndpoint', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(VirtualNetworkRule, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/virtual_network_rule_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/virtual_network_rule_py3.py deleted file mode 100644 index b85ed8569f57..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/virtual_network_rule_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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 - :param ignore_missing_vnet_service_endpoint: Create firewall rule before - the virtual network has vnet service endpoint enabled. - :type ignore_missing_vnet_service_endpoint: bool - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVNetServiceEndpoint', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None: - super(VirtualNetworkRule, self).__init__(**kwargs) - self.id = id - self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py index 880f85de97b8..5b015813966f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py @@ -9,19 +9,19 @@ # regenerated. # -------------------------------------------------------------------------- -from .database_accounts_operations import DatabaseAccountsOperations -from .operations import Operations -from .database_operations import DatabaseOperations -from .collection_operations import CollectionOperations -from .collection_region_operations import CollectionRegionOperations -from .database_account_region_operations import DatabaseAccountRegionOperations -from .percentile_source_target_operations import PercentileSourceTargetOperations -from .percentile_target_operations import PercentileTargetOperations -from .percentile_operations import PercentileOperations -from .collection_partition_region_operations import CollectionPartitionRegionOperations -from .collection_partition_operations import CollectionPartitionOperations -from .partition_key_range_id_operations import PartitionKeyRangeIdOperations -from .partition_key_range_id_region_operations import PartitionKeyRangeIdRegionOperations +from ._database_accounts_operations import DatabaseAccountsOperations +from ._operations import Operations +from ._database_operations import DatabaseOperations +from ._collection_operations import CollectionOperations +from ._collection_region_operations import CollectionRegionOperations +from ._database_account_region_operations import DatabaseAccountRegionOperations +from ._percentile_source_target_operations import PercentileSourceTargetOperations +from ._percentile_target_operations import PercentileTargetOperations +from ._percentile_operations import PercentileOperations +from ._collection_partition_region_operations import CollectionPartitionRegionOperations +from ._collection_partition_operations import CollectionPartitionOperations +from ._partition_key_range_id_operations import PartitionKeyRangeIdOperations +from ._partition_key_range_id_region_operations import PartitionKeyRangeIdRegionOperations __all__ = [ 'DatabaseAccountsOperations', diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py similarity index 92% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py index 6405dded524d..0ce710ceed2c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py @@ -19,6 +19,8 @@ class CollectionOperations(object): """CollectionOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,15 +67,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.MetricPaged[~azure.mgmt.cosmosdb.models.Metric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str') } @@ -100,6 +101,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -110,12 +116,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics'} @@ -147,15 +151,14 @@ def list_usages( ~azure.mgmt.cosmosdb.models.UsagePaged[~azure.mgmt.cosmosdb.models.Usage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_usages.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str') } @@ -183,6 +186,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -193,12 +201,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages'} @@ -225,15 +231,14 @@ def list_metric_definitions( ~azure.mgmt.cosmosdb.models.MetricDefinitionPaged[~azure.mgmt.cosmosdb.models.MetricDefinition] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str') } @@ -259,6 +264,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -269,12 +279,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_partition_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py similarity index 92% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_partition_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py index 4b50575a8080..7348d68a0737 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_partition_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py @@ -19,6 +19,8 @@ class CollectionPartitionOperations(object): """CollectionPartitionOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,15 +67,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.PartitionMetricPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str') } @@ -100,6 +101,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -110,12 +116,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics'} @@ -147,15 +151,14 @@ def list_usages( ~azure.mgmt.cosmosdb.models.PartitionUsagePaged[~azure.mgmt.cosmosdb.models.PartitionUsage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_usages.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str') } @@ -183,6 +186,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -193,12 +201,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PartitionUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PartitionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PartitionUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_partition_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py similarity index 92% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_partition_region_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py index ee0114b6834d..f4451ad00060 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_partition_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py @@ -19,6 +19,8 @@ class CollectionPartitionRegionOperations(object): """CollectionPartitionRegionOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -68,15 +70,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.PartitionMetricPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'region': self._serialize.url("region", region, 'str'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str') @@ -104,6 +105,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -114,12 +120,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py similarity index 92% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_region_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py index 52f7f1696eb9..16d0130581c3 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/collection_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py @@ -19,6 +19,8 @@ class CollectionRegionOperations(object): """CollectionRegionOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -68,15 +70,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.MetricPaged[~azure.mgmt.cosmosdb.models.Metric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'region': self._serialize.url("region", region, 'str'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str') @@ -104,6 +105,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -114,12 +120,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_account_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py similarity index 91% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_account_region_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py index 114759936361..882503b0bca2 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_account_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py @@ -19,6 +19,8 @@ class DatabaseAccountRegionOperations(object): """DatabaseAccountRegionOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -64,15 +66,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.MetricPaged[~azure.mgmt.cosmosdb.models.Metric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'region': self._serialize.url("region", region, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -108,12 +114,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py similarity index 96% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_accounts_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py index 6c2b1f58d263..6e831db4ba66 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py @@ -21,6 +21,8 @@ class DatabaseAccountsOperations(object): """DatabaseAccountsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +65,7 @@ def get( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -91,7 +93,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAccount', response) @@ -112,7 +113,7 @@ def _patch_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -215,7 +216,7 @@ def _create_or_update_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -317,7 +318,7 @@ def _delete_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -398,7 +399,7 @@ def _failover_priority_change_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -496,8 +497,7 @@ def list( ~azure.mgmt.cosmosdb.models.DatabaseAccountPaged[~azure.mgmt.cosmosdb.models.DatabaseAccount] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -526,6 +526,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -536,12 +541,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts'} @@ -563,8 +566,7 @@ def list_by_resource_group( ~azure.mgmt.cosmosdb.models.DatabaseAccountPaged[~azure.mgmt.cosmosdb.models.DatabaseAccount] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -594,6 +596,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -604,12 +611,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts'} @@ -639,7 +644,7 @@ def list_keys( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -667,7 +672,6 @@ def list_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAccountListKeysResult', response) @@ -704,7 +708,7 @@ def list_connection_strings( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -732,7 +736,6 @@ def list_connection_strings( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAccountListConnectionStringsResult', response) @@ -753,7 +756,7 @@ def _offline_region_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -842,7 +845,7 @@ def _online_region_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -947,7 +950,7 @@ def get_read_only_keys( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -975,7 +978,6 @@ def get_read_only_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAccountListReadOnlyKeysResult', response) @@ -1012,7 +1014,7 @@ def list_read_only_keys( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -1040,7 +1042,6 @@ def list_read_only_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DatabaseAccountListReadOnlyKeysResult', response) @@ -1061,7 +1062,7 @@ def _regenerate_key_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -1162,7 +1163,7 @@ def check_name_exists( # Construct URL url = self.check_name_exists.metadata['url'] path_format_arguments = { - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -1219,15 +1220,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.MetricPaged[~azure.mgmt.cosmosdb.models.Metric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -1252,6 +1252,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1262,12 +1267,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics'} @@ -1294,15 +1297,14 @@ def list_usages( ~azure.mgmt.cosmosdb.models.UsagePaged[~azure.mgmt.cosmosdb.models.Usage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_usages.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -1328,6 +1330,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1338,12 +1345,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages'} @@ -1366,15 +1371,14 @@ def list_metric_definitions( ~azure.mgmt.cosmosdb.models.MetricDefinitionPaged[~azure.mgmt.cosmosdb.models.MetricDefinition] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -1398,6 +1402,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1408,12 +1417,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions'} @@ -1437,15 +1444,14 @@ def list_sql_databases( ~azure.mgmt.cosmosdb.models.SqlDatabasePaged[~azure.mgmt.cosmosdb.models.SqlDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_sql_databases.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -1469,6 +1475,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1479,12 +1490,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SqlDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SqlDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SqlDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_sql_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases'} @@ -1515,7 +1524,7 @@ def get_sql_database( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1544,7 +1553,6 @@ def get_sql_database( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SqlDatabase', response) @@ -1565,7 +1573,7 @@ def _create_update_sql_database_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1673,7 +1681,7 @@ def _delete_sql_database_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1774,7 +1782,7 @@ def get_sql_database_throughput( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1803,7 +1811,6 @@ def get_sql_database_throughput( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Throughput', response) @@ -1824,7 +1831,7 @@ def _update_sql_database_throughput_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1941,15 +1948,14 @@ def list_sql_containers( ~azure.mgmt.cosmosdb.models.SqlContainerPaged[~azure.mgmt.cosmosdb.models.SqlContainer] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_sql_containers.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1974,6 +1980,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1984,12 +1995,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SqlContainerPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SqlContainerPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SqlContainerPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_sql_containers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers'} @@ -2022,7 +2031,7 @@ def get_sql_container( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'containerName': self._serialize.url("container_name", container_name, 'str') } @@ -2052,7 +2061,6 @@ def get_sql_container( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SqlContainer', response) @@ -2073,7 +2081,7 @@ def _create_update_sql_container_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'containerName': self._serialize.url("container_name", container_name, 'str') } @@ -2185,7 +2193,7 @@ def _delete_sql_container_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'containerName': self._serialize.url("container_name", container_name, 'str') } @@ -2292,7 +2300,7 @@ def get_sql_container_throughput( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'containerName': self._serialize.url("container_name", container_name, 'str') } @@ -2322,7 +2330,6 @@ def get_sql_container_throughput( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Throughput', response) @@ -2343,7 +2350,7 @@ def _update_sql_container_throughput_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'containerName': self._serialize.url("container_name", container_name, 'str') } @@ -2462,15 +2469,14 @@ def list_mongo_db_databases( ~azure.mgmt.cosmosdb.models.MongoDBDatabasePaged[~azure.mgmt.cosmosdb.models.MongoDBDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_mongo_db_databases.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -2494,6 +2500,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -2504,12 +2515,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MongoDBDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MongoDBDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MongoDBDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_mongo_db_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases'} @@ -2540,7 +2549,7 @@ def get_mongo_db_database( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2569,7 +2578,6 @@ def get_mongo_db_database( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('MongoDBDatabase', response) @@ -2590,7 +2598,7 @@ def _create_update_mongo_db_database_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2698,7 +2706,7 @@ def _delete_mongo_db_database_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2799,7 +2807,7 @@ def get_mongo_db_database_throughput( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2828,7 +2836,6 @@ def get_mongo_db_database_throughput( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Throughput', response) @@ -2849,7 +2856,7 @@ def _update_mongo_db_database_throughput_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2966,15 +2973,14 @@ def list_mongo_db_collections( ~azure.mgmt.cosmosdb.models.MongoDBCollectionPaged[~azure.mgmt.cosmosdb.models.MongoDBCollection] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_mongo_db_collections.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2999,6 +3005,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -3009,12 +3020,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MongoDBCollectionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MongoDBCollectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MongoDBCollectionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_mongo_db_collections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections'} @@ -3047,7 +3056,7 @@ def get_mongo_db_collection( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'collectionName': self._serialize.url("collection_name", collection_name, 'str') } @@ -3077,7 +3086,6 @@ def get_mongo_db_collection( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('MongoDBCollection', response) @@ -3098,7 +3106,7 @@ def _create_update_mongo_db_collection_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'collectionName': self._serialize.url("collection_name", collection_name, 'str') } @@ -3210,7 +3218,7 @@ def _delete_mongo_db_collection_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'collectionName': self._serialize.url("collection_name", collection_name, 'str') } @@ -3317,7 +3325,7 @@ def get_mongo_db_collection_throughput( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'collectionName': self._serialize.url("collection_name", collection_name, 'str') } @@ -3347,7 +3355,6 @@ def get_mongo_db_collection_throughput( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Throughput', response) @@ -3368,7 +3375,7 @@ def _update_mongo_db_collection_throughput_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'collectionName': self._serialize.url("collection_name", collection_name, 'str') } @@ -3486,15 +3493,14 @@ def list_tables( ~azure.mgmt.cosmosdb.models.TablePaged[~azure.mgmt.cosmosdb.models.Table] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_tables.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -3518,6 +3524,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -3528,12 +3539,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.TablePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.TablePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.TablePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_tables.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables'} @@ -3564,7 +3573,7 @@ def get_table( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3593,7 +3602,6 @@ def get_table( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Table', response) @@ -3614,7 +3622,7 @@ def _create_update_table_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3722,7 +3730,7 @@ def _delete_table_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3823,7 +3831,7 @@ def get_table_throughput( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3852,7 +3860,6 @@ def get_table_throughput( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Throughput', response) @@ -3873,7 +3880,7 @@ def _update_table_throughput_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3988,15 +3995,14 @@ def list_cassandra_keyspaces( ~azure.mgmt.cosmosdb.models.CassandraKeyspacePaged[~azure.mgmt.cosmosdb.models.CassandraKeyspace] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_cassandra_keyspaces.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -4020,6 +4026,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -4030,12 +4041,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CassandraKeyspacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CassandraKeyspacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CassandraKeyspacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_cassandra_keyspaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces'} @@ -4066,7 +4075,7 @@ def get_cassandra_keyspace( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4095,7 +4104,6 @@ def get_cassandra_keyspace( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CassandraKeyspace', response) @@ -4116,7 +4124,7 @@ def _create_update_cassandra_keyspace_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4224,7 +4232,7 @@ def _delete_cassandra_keyspace_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4325,7 +4333,7 @@ def get_cassandra_keyspace_throughput( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4354,7 +4362,6 @@ def get_cassandra_keyspace_throughput( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Throughput', response) @@ -4375,7 +4382,7 @@ def _update_cassandra_keyspace_throughput_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4492,15 +4499,14 @@ def list_cassandra_tables( ~azure.mgmt.cosmosdb.models.CassandraTablePaged[~azure.mgmt.cosmosdb.models.CassandraTable] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_cassandra_tables.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4525,6 +4531,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -4535,12 +4546,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.CassandraTablePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.CassandraTablePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.CassandraTablePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_cassandra_tables.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables'} @@ -4573,7 +4582,7 @@ def get_cassandra_table( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str') } @@ -4603,7 +4612,6 @@ def get_cassandra_table( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CassandraTable', response) @@ -4624,7 +4632,7 @@ def _create_update_cassandra_table_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str') } @@ -4736,7 +4744,7 @@ def _delete_cassandra_table_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str') } @@ -4843,7 +4851,7 @@ def get_cassandra_table_throughput( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str') } @@ -4873,7 +4881,6 @@ def get_cassandra_table_throughput( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Throughput', response) @@ -4894,7 +4901,7 @@ def _update_cassandra_table_throughput_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), 'tableName': self._serialize.url("table_name", table_name, 'str') } @@ -5013,15 +5020,14 @@ def list_gremlin_databases( ~azure.mgmt.cosmosdb.models.GremlinDatabasePaged[~azure.mgmt.cosmosdb.models.GremlinDatabase] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_gremlin_databases.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -5045,6 +5051,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -5055,12 +5066,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GremlinDatabasePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GremlinDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GremlinDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_gremlin_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases'} @@ -5091,7 +5100,7 @@ def get_gremlin_database( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -5120,7 +5129,6 @@ def get_gremlin_database( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GremlinDatabase', response) @@ -5141,7 +5149,7 @@ def _create_update_gremlin_database_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -5249,7 +5257,7 @@ def _delete_gremlin_database_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -5350,7 +5358,7 @@ def get_gremlin_database_throughput( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -5379,7 +5387,6 @@ def get_gremlin_database_throughput( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Throughput', response) @@ -5400,7 +5407,7 @@ def _update_gremlin_database_throughput_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -5517,15 +5524,14 @@ def list_gremlin_graphs( ~azure.mgmt.cosmosdb.models.GremlinGraphPaged[~azure.mgmt.cosmosdb.models.GremlinGraph] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_gremlin_graphs.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -5550,6 +5556,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -5560,12 +5571,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.GremlinGraphPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.GremlinGraphPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.GremlinGraphPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_gremlin_graphs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs'} @@ -5598,7 +5607,7 @@ def get_gremlin_graph( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'graphName': self._serialize.url("graph_name", graph_name, 'str') } @@ -5628,7 +5637,6 @@ def get_gremlin_graph( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('GremlinGraph', response) @@ -5649,7 +5657,7 @@ def _create_update_gremlin_graph_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'graphName': self._serialize.url("graph_name", graph_name, 'str') } @@ -5761,7 +5769,7 @@ def _delete_gremlin_graph_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'graphName': self._serialize.url("graph_name", graph_name, 'str') } @@ -5868,7 +5876,7 @@ def get_gremlin_graph_throughput( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'graphName': self._serialize.url("graph_name", graph_name, 'str') } @@ -5898,7 +5906,6 @@ def get_gremlin_graph_throughput( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Throughput', response) @@ -5919,7 +5926,7 @@ def _update_gremlin_graph_throughput_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), 'graphName': self._serialize.url("graph_name", graph_name, 'str') } diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py similarity index 92% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py index ad0157377a49..226048cb6f1c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py @@ -19,6 +19,8 @@ class DatabaseOperations(object): """DatabaseOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,15 +65,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.MetricPaged[~azure.mgmt.cosmosdb.models.Metric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -97,6 +98,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -107,12 +113,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics'} @@ -141,15 +145,14 @@ def list_usages( ~azure.mgmt.cosmosdb.models.UsagePaged[~azure.mgmt.cosmosdb.models.Usage] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_usages.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -176,6 +179,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -186,12 +194,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages'} @@ -216,15 +222,14 @@ def list_metric_definitions( ~azure.mgmt.cosmosdb.models.MetricDefinitionPaged[~azure.mgmt.cosmosdb.models.MetricDefinition] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metric_definitions.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -249,6 +254,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -259,12 +269,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py similarity index 90% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py index 083e13901b83..fc8994661650 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.cosmosdb.models.OperationPaged[~azure.mgmt.cosmosdb.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -87,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.DocumentDB/operations'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/partition_key_range_id_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py similarity index 92% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/partition_key_range_id_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py index a0860fa84e71..657f9b252730 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/partition_key_range_id_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py @@ -19,6 +19,8 @@ class PartitionKeyRangeIdOperations(object): """PartitionKeyRangeIdOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -68,15 +70,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.PartitionMetricPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str'), 'partitionKeyRangeId': self._serialize.url("partition_key_range_id", partition_key_range_id, 'str') @@ -104,6 +105,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -114,12 +120,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/partition_key_range_id_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py similarity index 92% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/partition_key_range_id_region_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py index 2067f60b402e..e79d4faa16fb 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/partition_key_range_id_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py @@ -19,6 +19,8 @@ class PartitionKeyRangeIdRegionOperations(object): """PartitionKeyRangeIdRegionOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -71,15 +73,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.PartitionMetricPaged[~azure.mgmt.cosmosdb.models.PartitionMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'region': self._serialize.url("region", region, 'str'), 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str'), @@ -108,6 +109,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -118,12 +124,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PartitionMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/percentile_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py similarity index 91% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/percentile_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py index 07dead5e3111..f091bfcb9b9e 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/percentile_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py @@ -19,6 +19,8 @@ class PercentileOperations(object): """PercentileOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -62,15 +64,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.PercentileMetricPaged[~azure.mgmt.cosmosdb.models.PercentileMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3) + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') } url = self._client.format_url(url, **path_format_arguments) @@ -95,6 +96,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -105,12 +111,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PercentileMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PercentileMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PercentileMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/percentile_source_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py similarity index 92% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/percentile_source_target_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py index b2b667e70751..abc142c32f5f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/percentile_source_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py @@ -19,6 +19,8 @@ class PercentileSourceTargetOperations(object): """PercentileSourceTargetOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -68,15 +70,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.PercentileMetricPaged[~azure.mgmt.cosmosdb.models.PercentileMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'sourceRegion': self._serialize.url("source_region", source_region, 'str'), 'targetRegion': self._serialize.url("target_region", target_region, 'str') } @@ -103,6 +104,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -113,12 +119,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PercentileMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PercentileMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PercentileMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/percentile_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py similarity index 91% rename from sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/percentile_target_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py index 58f5674bfdb3..5717ef99c4ad 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/percentile_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py @@ -19,6 +19,8 @@ class PercentileTargetOperations(object): """PercentileTargetOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,15 +67,14 @@ def list_metrics( ~azure.mgmt.cosmosdb.models.PercentileMetricPaged[~azure.mgmt.cosmosdb.models.PercentileMetric] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_metrics.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), 'targetRegion': self._serialize.url("target_region", target_region, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -99,6 +100,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -109,12 +115,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PercentileMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.PercentileMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.PercentileMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py index 981739e4ff95..e4f3d5055303 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.7.0" +VERSION = "0.8.0" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/setup.py b/sdk/cosmos/azure-mgmt-cosmosdb/setup.py index 3a758d591ac2..d3abdad94735 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/setup.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',