diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/HISTORY.rst b/sdk/cosmos/azure-mgmt-cosmosdb/HISTORY.rst index 93a85b999fba..be67bcb5f2a5 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/HISTORY.rst +++ b/sdk/cosmos/azure-mgmt-cosmosdb/HISTORY.rst @@ -3,6 +3,65 @@ Release History =============== +0.11.0 (2019-12-07) ++++++++++++++++++++ + +**Features** + +- Model GremlinDatabaseGetResults has a new parameter resource +- Model ThroughputSettingsGetResults has a new parameter resource +- Model SqlStoredProcedureGetResults has a new parameter resource +- Model MongoDBDatabaseGetResults has a new parameter resource +- Model SqlUserDefinedFunctionGetResults has a new parameter resource +- Model TableGetResults has a new parameter resource +- Model IndexingPolicy has a new parameter composite_indexes +- Model IndexingPolicy has a new parameter spatial_indexes +- Model CassandraKeyspaceGetResults has a new parameter resource +- Model SqlDatabaseGetResults has a new parameter resource + +**Breaking changes** + +- Model GremlinDatabaseGetResults no longer has parameter _etag +- Model GremlinDatabaseGetResults no longer has parameter gremlin_database_get_results_id +- Model GremlinDatabaseGetResults no longer has parameter _ts +- Model GremlinDatabaseGetResults no longer has parameter _rid +- Model ThroughputSettingsGetResults no longer has parameter minimum_throughput +- Model ThroughputSettingsGetResults no longer has parameter offer_replace_pending +- Model ThroughputSettingsGetResults no longer has parameter throughput +- Model SqlStoredProcedureGetResults no longer has parameter _etag +- Model SqlStoredProcedureGetResults no longer has parameter _ts +- Model SqlStoredProcedureGetResults no longer has parameter _rid +- Model SqlStoredProcedureGetResults no longer has parameter body +- Model SqlStoredProcedureGetResults no longer has parameter sql_stored_procedure_get_results_id +- Model MongoDBDatabaseGetResults no longer has parameter _etag +- Model MongoDBDatabaseGetResults no longer has parameter mongo_db_database_get_results_id +- Model MongoDBDatabaseGetResults no longer has parameter _ts +- Model MongoDBDatabaseGetResults no longer has parameter _rid +- Model SqlUserDefinedFunctionGetResults no longer has parameter _etag +- Model SqlUserDefinedFunctionGetResults no longer has parameter sql_user_defined_function_get_results_id +- Model SqlUserDefinedFunctionGetResults no longer has parameter _ts +- Model SqlUserDefinedFunctionGetResults no longer has parameter _rid +- Model SqlUserDefinedFunctionGetResults no longer has parameter body +- Model TableGetResults no longer has parameter _etag +- Model TableGetResults no longer has parameter table_get_results_id +- Model TableGetResults no longer has parameter _ts +- Model TableGetResults no longer has parameter _rid +- Model CassandraKeyspaceGetResults no longer has parameter _etag +- Model CassandraKeyspaceGetResults no longer has parameter cassandra_keyspace_get_results_id +- Model CassandraKeyspaceGetResults no longer has parameter _ts +- Model CassandraKeyspaceGetResults no longer has parameter _rid +- Model SqlDatabaseGetResults no longer has parameter _colls +- Model SqlDatabaseGetResults no longer has parameter _etag +- Model SqlDatabaseGetResults no longer has parameter _users +- Model SqlDatabaseGetResults no longer has parameter sql_database_get_results_id +- Model SqlDatabaseGetResults no longer has parameter _rid +- Model SqlDatabaseGetResults no longer has parameter _ts +- Model GremlinGraphGetResults has a new signature +- Model CassandraTableGetResults has a new signature +- Model SqlTriggerGetResults has a new signature +- Model SqlContainerGetResults has a new signature +- Model MongoDBCollectionGetResults has a new signature + 0.10.0 (2019-11-13) +++++++++++++++++++ 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 449671dcb078..7ca7646f0ce4 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 @@ -15,15 +15,18 @@ from ._models_py3 import AzureEntityResource from ._models_py3 import Capability from ._models_py3 import CassandraKeyspaceCreateUpdateParameters + from ._models_py3 import CassandraKeyspaceGetPropertiesResource from ._models_py3 import CassandraKeyspaceGetResults from ._models_py3 import CassandraKeyspaceResource from ._models_py3 import CassandraPartitionKey from ._models_py3 import CassandraSchema from ._models_py3 import CassandraTableCreateUpdateParameters + from ._models_py3 import CassandraTableGetPropertiesResource from ._models_py3 import CassandraTableGetResults from ._models_py3 import CassandraTableResource from ._models_py3 import ClusterKey from ._models_py3 import Column + from ._models_py3 import CompositePath from ._models_py3 import ConflictResolutionPolicy from ._models_py3 import ConsistencyPolicy from ._models_py3 import ContainerPartitionKey @@ -41,9 +44,11 @@ from ._models_py3 import FailoverPolicies from ._models_py3 import FailoverPolicy from ._models_py3 import GremlinDatabaseCreateUpdateParameters + from ._models_py3 import GremlinDatabaseGetPropertiesResource from ._models_py3 import GremlinDatabaseGetResults from ._models_py3 import GremlinDatabaseResource from ._models_py3 import GremlinGraphCreateUpdateParameters + from ._models_py3 import GremlinGraphGetPropertiesResource from ._models_py3 import GremlinGraphGetResults from ._models_py3 import GremlinGraphResource from ._models_py3 import IncludedPath @@ -56,9 +61,11 @@ from ._models_py3 import MetricName from ._models_py3 import MetricValue from ._models_py3 import MongoDBCollectionCreateUpdateParameters + from ._models_py3 import MongoDBCollectionGetPropertiesResource from ._models_py3 import MongoDBCollectionGetResults from ._models_py3 import MongoDBCollectionResource from ._models_py3 import MongoDBDatabaseCreateUpdateParameters + from ._models_py3 import MongoDBDatabaseGetPropertiesResource from ._models_py3 import MongoDBDatabaseGetResults from ._models_py3 import MongoDBDatabaseResource from ._models_py3 import MongoIndex @@ -77,24 +84,32 @@ from ._models_py3 import ProxyResource from ._models_py3 import RegionForOnlineOffline from ._models_py3 import Resource + from ._models_py3 import SpatialSpec from ._models_py3 import SqlContainerCreateUpdateParameters + from ._models_py3 import SqlContainerGetPropertiesResource from ._models_py3 import SqlContainerGetResults from ._models_py3 import SqlContainerResource from ._models_py3 import SqlDatabaseCreateUpdateParameters + from ._models_py3 import SqlDatabaseGetPropertiesResource from ._models_py3 import SqlDatabaseGetResults from ._models_py3 import SqlDatabaseResource from ._models_py3 import SqlStoredProcedureCreateUpdateParameters + from ._models_py3 import SqlStoredProcedureGetPropertiesResource from ._models_py3 import SqlStoredProcedureGetResults from ._models_py3 import SqlStoredProcedureResource from ._models_py3 import SqlTriggerCreateUpdateParameters + from ._models_py3 import SqlTriggerGetPropertiesResource from ._models_py3 import SqlTriggerGetResults from ._models_py3 import SqlTriggerResource from ._models_py3 import SqlUserDefinedFunctionCreateUpdateParameters + from ._models_py3 import SqlUserDefinedFunctionGetPropertiesResource from ._models_py3 import SqlUserDefinedFunctionGetResults from ._models_py3 import SqlUserDefinedFunctionResource from ._models_py3 import TableCreateUpdateParameters + from ._models_py3 import TableGetPropertiesResource from ._models_py3 import TableGetResults from ._models_py3 import TableResource + from ._models_py3 import ThroughputSettingsGetPropertiesResource from ._models_py3 import ThroughputSettingsGetResults from ._models_py3 import ThroughputSettingsResource from ._models_py3 import ThroughputSettingsUpdateParameters @@ -109,15 +124,18 @@ from ._models import AzureEntityResource from ._models import Capability from ._models import CassandraKeyspaceCreateUpdateParameters + from ._models import CassandraKeyspaceGetPropertiesResource from ._models import CassandraKeyspaceGetResults from ._models import CassandraKeyspaceResource from ._models import CassandraPartitionKey from ._models import CassandraSchema from ._models import CassandraTableCreateUpdateParameters + from ._models import CassandraTableGetPropertiesResource from ._models import CassandraTableGetResults from ._models import CassandraTableResource from ._models import ClusterKey from ._models import Column + from ._models import CompositePath from ._models import ConflictResolutionPolicy from ._models import ConsistencyPolicy from ._models import ContainerPartitionKey @@ -135,9 +153,11 @@ from ._models import FailoverPolicies from ._models import FailoverPolicy from ._models import GremlinDatabaseCreateUpdateParameters + from ._models import GremlinDatabaseGetPropertiesResource from ._models import GremlinDatabaseGetResults from ._models import GremlinDatabaseResource from ._models import GremlinGraphCreateUpdateParameters + from ._models import GremlinGraphGetPropertiesResource from ._models import GremlinGraphGetResults from ._models import GremlinGraphResource from ._models import IncludedPath @@ -150,9 +170,11 @@ from ._models import MetricName from ._models import MetricValue from ._models import MongoDBCollectionCreateUpdateParameters + from ._models import MongoDBCollectionGetPropertiesResource from ._models import MongoDBCollectionGetResults from ._models import MongoDBCollectionResource from ._models import MongoDBDatabaseCreateUpdateParameters + from ._models import MongoDBDatabaseGetPropertiesResource from ._models import MongoDBDatabaseGetResults from ._models import MongoDBDatabaseResource from ._models import MongoIndex @@ -171,24 +193,32 @@ from ._models import ProxyResource from ._models import RegionForOnlineOffline from ._models import Resource + from ._models import SpatialSpec from ._models import SqlContainerCreateUpdateParameters + from ._models import SqlContainerGetPropertiesResource from ._models import SqlContainerGetResults from ._models import SqlContainerResource from ._models import SqlDatabaseCreateUpdateParameters + from ._models import SqlDatabaseGetPropertiesResource from ._models import SqlDatabaseGetResults from ._models import SqlDatabaseResource from ._models import SqlStoredProcedureCreateUpdateParameters + from ._models import SqlStoredProcedureGetPropertiesResource from ._models import SqlStoredProcedureGetResults from ._models import SqlStoredProcedureResource from ._models import SqlTriggerCreateUpdateParameters + from ._models import SqlTriggerGetPropertiesResource from ._models import SqlTriggerGetResults from ._models import SqlTriggerResource from ._models import SqlUserDefinedFunctionCreateUpdateParameters + from ._models import SqlUserDefinedFunctionGetPropertiesResource from ._models import SqlUserDefinedFunctionGetResults from ._models import SqlUserDefinedFunctionResource from ._models import TableCreateUpdateParameters + from ._models import TableGetPropertiesResource from ._models import TableGetResults from ._models import TableResource + from ._models import ThroughputSettingsGetPropertiesResource from ._models import ThroughputSettingsGetResults from ._models import ThroughputSettingsResource from ._models import ThroughputSettingsUpdateParameters @@ -227,6 +257,8 @@ IndexingMode, DataType, IndexKind, + CompositePathSortOrder, + SpatialType, PartitionKind, ConflictResolutionMode, TriggerType, @@ -242,15 +274,18 @@ 'AzureEntityResource', 'Capability', 'CassandraKeyspaceCreateUpdateParameters', + 'CassandraKeyspaceGetPropertiesResource', 'CassandraKeyspaceGetResults', 'CassandraKeyspaceResource', 'CassandraPartitionKey', 'CassandraSchema', 'CassandraTableCreateUpdateParameters', + 'CassandraTableGetPropertiesResource', 'CassandraTableGetResults', 'CassandraTableResource', 'ClusterKey', 'Column', + 'CompositePath', 'ConflictResolutionPolicy', 'ConsistencyPolicy', 'ContainerPartitionKey', @@ -268,9 +303,11 @@ 'FailoverPolicies', 'FailoverPolicy', 'GremlinDatabaseCreateUpdateParameters', + 'GremlinDatabaseGetPropertiesResource', 'GremlinDatabaseGetResults', 'GremlinDatabaseResource', 'GremlinGraphCreateUpdateParameters', + 'GremlinGraphGetPropertiesResource', 'GremlinGraphGetResults', 'GremlinGraphResource', 'IncludedPath', @@ -283,9 +320,11 @@ 'MetricName', 'MetricValue', 'MongoDBCollectionCreateUpdateParameters', + 'MongoDBCollectionGetPropertiesResource', 'MongoDBCollectionGetResults', 'MongoDBCollectionResource', 'MongoDBDatabaseCreateUpdateParameters', + 'MongoDBDatabaseGetPropertiesResource', 'MongoDBDatabaseGetResults', 'MongoDBDatabaseResource', 'MongoIndex', @@ -304,24 +343,32 @@ 'ProxyResource', 'RegionForOnlineOffline', 'Resource', + 'SpatialSpec', 'SqlContainerCreateUpdateParameters', + 'SqlContainerGetPropertiesResource', 'SqlContainerGetResults', 'SqlContainerResource', 'SqlDatabaseCreateUpdateParameters', + 'SqlDatabaseGetPropertiesResource', 'SqlDatabaseGetResults', 'SqlDatabaseResource', 'SqlStoredProcedureCreateUpdateParameters', + 'SqlStoredProcedureGetPropertiesResource', 'SqlStoredProcedureGetResults', 'SqlStoredProcedureResource', 'SqlTriggerCreateUpdateParameters', + 'SqlTriggerGetPropertiesResource', 'SqlTriggerGetResults', 'SqlTriggerResource', 'SqlUserDefinedFunctionCreateUpdateParameters', + 'SqlUserDefinedFunctionGetPropertiesResource', 'SqlUserDefinedFunctionGetResults', 'SqlUserDefinedFunctionResource', 'TableCreateUpdateParameters', + 'TableGetPropertiesResource', 'TableGetResults', 'TableResource', + 'ThroughputSettingsGetPropertiesResource', 'ThroughputSettingsGetResults', 'ThroughputSettingsResource', 'ThroughputSettingsUpdateParameters', @@ -359,6 +406,8 @@ 'IndexingMode', 'DataType', 'IndexKind', + 'CompositePathSortOrder', + 'SpatialType', 'PartitionKind', 'ConflictResolutionMode', 'TriggerType', diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py index 0386fbe056dc..f9d4a719a2dc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py @@ -62,6 +62,20 @@ class IndexKind(str, Enum): spatial = "Spatial" +class CompositePathSortOrder(str, Enum): + + ascending = "Ascending" + descending = "Descending" + + +class SpatialType(str, Enum): + + point = "Point" + line_string = "LineString" + polygon = "Polygon" + multi_polygon = "MultiPolygon" + + class PartitionKind(str, Enum): hash = "Hash" 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 index 5d216069add1..69faed807597 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py @@ -231,14 +231,54 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class CassandraKeyspaceGetResults(ARMResourceProperties): - """An Azure Cosmos DB Cassandra keyspace. +class CassandraKeyspaceGetPropertiesResource(Model): + """CassandraKeyspaceGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB Cassandra keyspace + :type id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CassandraKeyspaceGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self._rid = None + self._ts = None + self._etag = None + + +class CassandraKeyspaceGetResults(ARMResourceProperties): + """An Azure Cosmos DB Cassandra keyspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -250,27 +290,15 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param cassandra_keyspace_get_results_id: Required. Name of the Cosmos DB - Cassandra keyspace - :type cassandra_keyspace_get_results_id: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'cassandra_keyspace_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -279,18 +307,12 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'cassandra_keyspace_get_results_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceGetPropertiesResource'}, } def __init__(self, **kwargs): super(CassandraKeyspaceGetResults, self).__init__(**kwargs) - self.cassandra_keyspace_get_results_id = kwargs.get('cassandra_keyspace_get_results_id', None) - self._rid = None - self._ts = None - self._etag = None + self.resource = kwargs.get('resource', None) class CassandraKeyspaceResource(Model): @@ -406,28 +428,16 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class CassandraTableGetResults(ARMResourceProperties): - """An Azure Cosmos DB Cassandra table. +class CassandraTableGetPropertiesResource(Model): + """CassandraTableGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_get_results_id: Required. Name of the Cosmos DB - Cassandra table - :type cassandra_table_get_results_id: str + :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 @@ -443,10 +453,7 @@ class CassandraTableGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'cassandra_table_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -454,21 +461,16 @@ class CassandraTableGetResults(ARMResourceProperties): _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_get_results_id': {'key': 'properties.id', 'type': 'str'}, - 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, - 'schema': {'key': 'properties.schema', 'type': 'CassandraSchema'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, + 'schema': {'key': 'schema', 'type': 'CassandraSchema'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(CassandraTableGetResults, self).__init__(**kwargs) - self.cassandra_table_get_results_id = kwargs.get('cassandra_table_get_results_id', None) + super(CassandraTableGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) self.default_ttl = kwargs.get('default_ttl', None) self.schema = kwargs.get('schema', None) self._rid = None @@ -476,6 +478,48 @@ def __init__(self, **kwargs): self._etag = None +class CassandraTableGetResults(ARMResourceProperties): + """An Azure Cosmos DB Cassandra table. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'CassandraTableGetPropertiesResource'}, + } + + def __init__(self, **kwargs): + super(CassandraTableGetResults, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + + class CassandraTableResource(Model): """Cosmos DB Cassandra table resource object. @@ -555,6 +599,28 @@ def __init__(self, **kwargs): self.type = kwargs.get('type', None) +class CompositePath(Model): + """CompositePath. + + :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 order: Sort order for composite paths. Possible values include: + 'Ascending', 'Descending' + :type order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompositePath, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.order = kwargs.get('order', None) + + class ConflictResolutionPolicy(Model): """The conflict resolution policy for the container. @@ -1320,14 +1386,54 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class GremlinDatabaseGetResults(ARMResourceProperties): - """An Azure Cosmos DB Gremlin database. +class GremlinDatabaseGetPropertiesResource(Model): + """GremlinDatabaseGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB Gremlin database + :type id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GremlinDatabaseGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self._rid = None + self._ts = None + self._etag = None + + +class GremlinDatabaseGetResults(ARMResourceProperties): + """An Azure Cosmos DB Gremlin database. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -1339,27 +1445,15 @@ class GremlinDatabaseGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param gremlin_database_get_results_id: Required. Name of the Cosmos DB - Gremlin database - :type gremlin_database_get_results_id: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'gremlin_database_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -1368,18 +1462,12 @@ class GremlinDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'gremlin_database_get_results_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseGetPropertiesResource'}, } def __init__(self, **kwargs): super(GremlinDatabaseGetResults, self).__init__(**kwargs) - self.gremlin_database_get_results_id = kwargs.get('gremlin_database_get_results_id', None) - self._rid = None - self._ts = None - self._etag = None + self.resource = kwargs.get('resource', None) class GremlinDatabaseResource(Model): @@ -1454,28 +1542,16 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class GremlinGraphGetResults(ARMResourceProperties): - """An Azure Cosmos DB Gremlin graph. +class GremlinGraphGetPropertiesResource(Model): + """GremlinGraphGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_get_results_id: Required. Name of the Cosmos DB - Gremlin graph - :type gremlin_graph_get_results_id: str + :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 @@ -1503,10 +1579,7 @@ class GremlinGraphGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'gremlin_graph_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -1514,24 +1587,19 @@ class GremlinGraphGetResults(ARMResourceProperties): _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_get_results_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'}, + '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'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(GremlinGraphGetResults, self).__init__(**kwargs) - self.gremlin_graph_get_results_id = kwargs.get('gremlin_graph_get_results_id', None) + super(GremlinGraphGetPropertiesResource, 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) @@ -1542,33 +1610,75 @@ def __init__(self, **kwargs): self._etag = None -class GremlinGraphResource(Model): - """Cosmos DB Gremlin graph resource object. - - All required parameters must be populated in order to send to Azure. +class GremlinGraphGetResults(ARMResourceProperties): + """An Azure Cosmos DB Gremlin graph. - :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 - """ + Variables are only populated by the server, and will be ignored when + sending a request. - _validation = { - 'id': {'required': True}, + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphGetPropertiesResource'}, + } + + def __init__(self, **kwargs): + super(GremlinGraphGetResults, self).__init__(**kwargs) + self.resource = kwargs.get('resource', 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 = { @@ -1650,6 +1760,11 @@ class IndexingPolicy(Model): :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] + :param composite_indexes: List of composite path list + :type composite_indexes: + list[list[~azure.mgmt.cosmosdb.models.CompositePath]] + :param spatial_indexes: List of spatial specifics + :type spatial_indexes: list[~azure.mgmt.cosmosdb.models.SpatialSpec] """ _attribute_map = { @@ -1657,6 +1772,8 @@ class IndexingPolicy(Model): 'indexing_mode': {'key': 'indexingMode', 'type': 'str'}, 'included_paths': {'key': 'includedPaths', 'type': '[IncludedPath]'}, 'excluded_paths': {'key': 'excludedPaths', 'type': '[ExcludedPath]'}, + 'composite_indexes': {'key': 'compositeIndexes', 'type': '[[CompositePath]]'}, + 'spatial_indexes': {'key': 'spatialIndexes', 'type': '[SpatialSpec]'}, } def __init__(self, **kwargs): @@ -1665,6 +1782,8 @@ def __init__(self, **kwargs): self.indexing_mode = kwargs.get('indexing_mode', "Consistent") self.included_paths = kwargs.get('included_paths', None) self.excluded_paths = kwargs.get('excluded_paths', None) + self.composite_indexes = kwargs.get('composite_indexes', None) + self.spatial_indexes = kwargs.get('spatial_indexes', None) class Location(Model): @@ -1975,28 +2094,16 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class MongoDBCollectionGetResults(ARMResourceProperties): - """An Azure Cosmos DB MongoDB collection. +class MongoDBCollectionGetPropertiesResource(Model): + """MongoDBCollectionGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_get_results_id: Required. Name of the Cosmos DB - MongoDB collection - :type mongo_db_collection_get_results_id: str + :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] @@ -2013,10 +2120,7 @@ class MongoDBCollectionGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'mongo_db_collection_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -2024,21 +2128,16 @@ class MongoDBCollectionGetResults(ARMResourceProperties): _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_get_results_id': {'key': 'properties.id', 'type': 'str'}, - 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, - 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'shard_key': {'key': 'shardKey', 'type': '{str}'}, + 'indexes': {'key': 'indexes', 'type': '[MongoIndex]'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(MongoDBCollectionGetResults, self).__init__(**kwargs) - self.mongo_db_collection_get_results_id = kwargs.get('mongo_db_collection_get_results_id', None) + super(MongoDBCollectionGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) self.shard_key = kwargs.get('shard_key', None) self.indexes = kwargs.get('indexes', None) self._rid = None @@ -2046,6 +2145,48 @@ def __init__(self, **kwargs): self._etag = None +class MongoDBCollectionGetResults(ARMResourceProperties): + """An Azure Cosmos DB MongoDB collection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionGetPropertiesResource'}, + } + + def __init__(self, **kwargs): + super(MongoDBCollectionGetResults, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + + class MongoDBCollectionResource(Model): """Cosmos DB MongoDB collection resource object. @@ -2127,14 +2268,54 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class MongoDBDatabaseGetResults(ARMResourceProperties): - """An Azure Cosmos DB MongoDB database. +class MongoDBDatabaseGetPropertiesResource(Model): + """MongoDBDatabaseGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB MongoDB database + :type id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MongoDBDatabaseGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self._rid = None + self._ts = None + self._etag = None + + +class MongoDBDatabaseGetResults(ARMResourceProperties): + """An Azure Cosmos DB MongoDB database. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -2146,27 +2327,15 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param mongo_db_database_get_results_id: Required. Name of the Cosmos DB - MongoDB database - :type mongo_db_database_get_results_id: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'mongo_db_database_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -2175,18 +2344,12 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_db_database_get_results_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseGetPropertiesResource'}, } def __init__(self, **kwargs): super(MongoDBDatabaseGetResults, self).__init__(**kwargs) - self.mongo_db_database_get_results_id = kwargs.get('mongo_db_database_get_results_id', None) - self._rid = None - self._ts = None - self._etag = None + self.resource = kwargs.get('resource', None) class MongoDBDatabaseResource(Model): @@ -2784,6 +2947,27 @@ def __init__(self, **kwargs): self.region = kwargs.get('region', None) +class SpatialSpec(Model): + """SpatialSpec. + + :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 types: List of path's spatial type + :type types: list[str or ~azure.mgmt.cosmosdb.models.SpatialType] + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'types': {'key': 'types', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SpatialSpec, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.types = kwargs.get('types', None) + + class SqlContainerCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB container. @@ -2834,28 +3018,16 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class SqlContainerGetResults(ARMResourceProperties): - """An Azure Cosmos DB container. +class SqlContainerGetPropertiesResource(Model): + """SqlContainerGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_get_results_id: Required. Name of the Cosmos DB SQL - container - :type sql_container_get_results_id: str + :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 @@ -2884,10 +3056,7 @@ class SqlContainerGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sql_container_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -2895,24 +3064,19 @@ class SqlContainerGetResults(ARMResourceProperties): _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_get_results_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'}, + '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'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(SqlContainerGetResults, self).__init__(**kwargs) - self.sql_container_get_results_id = kwargs.get('sql_container_get_results_id', None) + super(SqlContainerGetPropertiesResource, 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) @@ -2923,29 +3087,71 @@ def __init__(self, **kwargs): self._etag = None -class SqlContainerResource(Model): - """Cosmos DB SQL container resource object. +class SqlContainerGetResults(ARMResourceProperties): + """An Azure Cosmos DB container. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when + sending a request. - :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: + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlContainerGetPropertiesResource'}, + } + + def __init__(self, **kwargs): + super(SqlContainerGetResults, self).__init__(**kwargs) + self.resource = kwargs.get('resource', 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 """ @@ -3022,28 +3228,16 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class SqlDatabaseGetResults(ARMResourceProperties): - """An Azure Cosmos DB SQL database. +class SqlDatabaseGetPropertiesResource(Model): + """SqlDatabaseGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_get_results_id: Required. Name of the Cosmos DB SQL - database - :type sql_database_get_results_id: str + :param id: Required. Name of the Cosmos DB SQL database + :type id: str :ivar _rid: A system generated property. A unique identifier. :vartype _rid: str :ivar _ts: A system generated property that denotes the last updated @@ -3061,10 +3255,7 @@ class SqlDatabaseGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sql_database_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -3072,21 +3263,16 @@ class SqlDatabaseGetResults(ARMResourceProperties): _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_get_results_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'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + '_colls': {'key': '_colls', 'type': 'str'}, + '_users': {'key': '_users', 'type': 'str'}, } def __init__(self, **kwargs): - super(SqlDatabaseGetResults, self).__init__(**kwargs) - self.sql_database_get_results_id = kwargs.get('sql_database_get_results_id', None) + super(SqlDatabaseGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) self._rid = None self._ts = None self._etag = None @@ -3094,6 +3280,48 @@ def __init__(self, **kwargs): self._users = kwargs.get('_users', None) +class SqlDatabaseGetResults(ARMResourceProperties): + """An Azure Cosmos DB SQL database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseGetPropertiesResource'}, + } + + def __init__(self, **kwargs): + super(SqlDatabaseGetResults, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + + class SqlDatabaseResource(Model): """Cosmos DB SQL database resource object. @@ -3166,14 +3394,58 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class SqlStoredProcedureGetResults(ARMResourceProperties): - """An Azure Cosmos DB storedProcedure. +class SqlStoredProcedureGetPropertiesResource(Model): + """SqlStoredProcedureGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB SQL storedProcedure + :type id: str + :param body: Body of the Stored Procedure + :type body: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlStoredProcedureGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.body = kwargs.get('body', None) + self._rid = None + self._ts = None + self._etag = None + + +class SqlStoredProcedureGetResults(ARMResourceProperties): + """An Azure Cosmos DB storedProcedure. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -3185,29 +3457,15 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param sql_stored_procedure_get_results_id: Required. Name of the Cosmos - DB SQL storedProcedure - :type sql_stored_procedure_get_results_id: str - :param body: Body of the Stored Procedure - :type body: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'sql_stored_procedure_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -3216,20 +3474,12 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_stored_procedure_get_results_id': {'key': 'properties.id', 'type': 'str'}, - 'body': {'key': 'properties.body', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureGetPropertiesResource'}, } def __init__(self, **kwargs): super(SqlStoredProcedureGetResults, self).__init__(**kwargs) - self.sql_stored_procedure_get_results_id = kwargs.get('sql_stored_procedure_get_results_id', None) - self.body = kwargs.get('body', None) - self._rid = None - self._ts = None - self._etag = None + self.resource = kwargs.get('resource', None) class SqlStoredProcedureResource(Model): @@ -3308,28 +3558,16 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class SqlTriggerGetResults(ARMResourceProperties): - """An Azure Cosmos DB trigger. +class SqlTriggerGetPropertiesResource(Model): + """SqlTriggerGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_trigger_get_results_id: Required. Name of the Cosmos DB SQL - trigger - :type sql_trigger_get_results_id: str + :param id: Required. Name of the Cosmos DB SQL trigger + :type id: str :param body: Body of the Trigger :type body: str :param trigger_type: Type of the Trigger. Possible values include: 'Pre', @@ -3350,10 +3588,7 @@ class SqlTriggerGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sql_trigger_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -3361,22 +3596,17 @@ class SqlTriggerGetResults(ARMResourceProperties): _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_trigger_get_results_id': {'key': 'properties.id', 'type': 'str'}, - 'body': {'key': 'properties.body', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'trigger_operation': {'key': 'properties.triggerOperation', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + 'trigger_type': {'key': 'triggerType', 'type': 'str'}, + 'trigger_operation': {'key': 'triggerOperation', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(SqlTriggerGetResults, self).__init__(**kwargs) - self.sql_trigger_get_results_id = kwargs.get('sql_trigger_get_results_id', None) + super(SqlTriggerGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) self.body = kwargs.get('body', None) self.trigger_type = kwargs.get('trigger_type', None) self.trigger_operation = kwargs.get('trigger_operation', None) @@ -3385,6 +3615,48 @@ def __init__(self, **kwargs): self._etag = None +class SqlTriggerGetResults(ARMResourceProperties): + """An Azure Cosmos DB trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.SqlTriggerGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerGetPropertiesResource'}, + } + + def __init__(self, **kwargs): + super(SqlTriggerGetResults, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + + class SqlTriggerResource(Model): """Cosmos DB SQL trigger resource object. @@ -3473,14 +3745,58 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class SqlUserDefinedFunctionGetResults(ARMResourceProperties): - """An Azure Cosmos DB userDefinedFunction. +class SqlUserDefinedFunctionGetPropertiesResource(Model): + """SqlUserDefinedFunctionGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB SQL userDefinedFunction + :type id: str + :param body: Body of the User Defined Function + :type body: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlUserDefinedFunctionGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.body = kwargs.get('body', None) + self._rid = None + self._ts = None + self._etag = None + + +class SqlUserDefinedFunctionGetResults(ARMResourceProperties): + """An Azure Cosmos DB userDefinedFunction. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -3492,29 +3808,15 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param sql_user_defined_function_get_results_id: Required. Name of the - Cosmos DB SQL userDefinedFunction - :type sql_user_defined_function_get_results_id: str - :param body: Body of the User Defined Function - :type body: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'sql_user_defined_function_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -3523,20 +3825,12 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_user_defined_function_get_results_id': {'key': 'properties.id', 'type': 'str'}, - 'body': {'key': 'properties.body', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionGetPropertiesResource'}, } def __init__(self, **kwargs): super(SqlUserDefinedFunctionGetResults, self).__init__(**kwargs) - self.sql_user_defined_function_get_results_id = kwargs.get('sql_user_defined_function_get_results_id', None) - self.body = kwargs.get('body', None) - self._rid = None - self._ts = None - self._etag = None + self.resource = kwargs.get('resource', None) class SqlUserDefinedFunctionResource(Model): @@ -3615,14 +3909,54 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) -class TableGetResults(ARMResourceProperties): - """An Azure Cosmos DB Table. +class TableGetPropertiesResource(Model): + """TableGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB table + :type id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TableGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self._rid = None + self._ts = None + self._etag = None + + +class TableGetResults(ARMResourceProperties): + """An Azure Cosmos DB Table. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -3634,26 +3968,14 @@ class TableGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param table_get_results_id: Required. Name of the Cosmos DB table - :type table_get_results_id: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: ~azure.mgmt.cosmosdb.models.TableGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'table_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -3662,18 +3984,12 @@ class TableGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'table_get_results_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'TableGetPropertiesResource'}, } def __init__(self, **kwargs): super(TableGetResults, self).__init__(**kwargs) - self.table_get_results_id = kwargs.get('table_get_results_id', None) - self._rid = None - self._ts = None - self._etag = None + self.resource = kwargs.get('resource', None) class TableResource(Model): @@ -3698,14 +4014,64 @@ def __init__(self, **kwargs): self.id = kwargs.get('id', None) -class ThroughputSettingsGetResults(ARMResourceProperties): - """An Azure Cosmos DB resource throughput. +class ThroughputSettingsGetPropertiesResource(Model): + """ThroughputSettingsGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param throughput: Required. Value of the Cosmos DB resource throughput + :type throughput: int + :ivar minimum_throughput: The minimum throughput of the resource + :vartype minimum_throughput: str + :ivar offer_replace_pending: The throughput replace is pending + :vartype offer_replace_pending: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'throughput': {'required': True}, + 'minimum_throughput': {'readonly': True}, + 'offer_replace_pending': {'readonly': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, + 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ThroughputSettingsGetPropertiesResource, self).__init__(**kwargs) + self.throughput = kwargs.get('throughput', None) + self.minimum_throughput = None + self.offer_replace_pending = None + self._rid = None + self._ts = None + self._etag = None + + +class ThroughputSettingsGetResults(ARMResourceProperties): + """An Azure Cosmos DB resource throughput. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -3717,21 +4083,15 @@ class ThroughputSettingsGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param throughput: Required. Value of the Cosmos DB resource throughput - :type throughput: int - :ivar minimum_throughput: The minimum throughput of the resource - :vartype minimum_throughput: str - :ivar offer_replace_pending: The throughput replace is pending - :vartype offer_replace_pending: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'throughput': {'required': True}, - 'minimum_throughput': {'readonly': True}, - 'offer_replace_pending': {'readonly': True}, } _attribute_map = { @@ -3740,16 +4100,12 @@ class ThroughputSettingsGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'throughput': {'key': 'properties.throughput', 'type': 'int'}, - 'minimum_throughput': {'key': 'properties.minimumThroughput', 'type': 'str'}, - 'offer_replace_pending': {'key': 'properties.offerReplacePending', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsGetPropertiesResource'}, } def __init__(self, **kwargs): super(ThroughputSettingsGetResults, self).__init__(**kwargs) - self.throughput = kwargs.get('throughput', None) - self.minimum_throughput = None - self.offer_replace_pending = None + self.resource = kwargs.get('resource', None) class ThroughputSettingsResource(Model): 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 index 901e45c34a6f..73fa8bf4efde 100644 --- 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 @@ -231,14 +231,54 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class CassandraKeyspaceGetResults(ARMResourceProperties): - """An Azure Cosmos DB Cassandra keyspace. +class CassandraKeyspaceGetPropertiesResource(Model): + """CassandraKeyspaceGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB Cassandra keyspace + :type id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(CassandraKeyspaceGetPropertiesResource, self).__init__(**kwargs) + self.id = id + self._rid = None + self._ts = None + self._etag = None + + +class CassandraKeyspaceGetResults(ARMResourceProperties): + """An Azure Cosmos DB Cassandra keyspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -250,27 +290,15 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param cassandra_keyspace_get_results_id: Required. Name of the Cosmos DB - Cassandra keyspace - :type cassandra_keyspace_get_results_id: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'cassandra_keyspace_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -279,18 +307,12 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'cassandra_keyspace_get_results_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceGetPropertiesResource'}, } - def __init__(self, *, cassandra_keyspace_get_results_id: str, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: super(CassandraKeyspaceGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.cassandra_keyspace_get_results_id = cassandra_keyspace_get_results_id - self._rid = None - self._ts = None - self._etag = None + self.resource = resource class CassandraKeyspaceResource(Model): @@ -406,28 +428,16 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class CassandraTableGetResults(ARMResourceProperties): - """An Azure Cosmos DB Cassandra table. +class CassandraTableGetPropertiesResource(Model): + """CassandraTableGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_get_results_id: Required. Name of the Cosmos DB - Cassandra table - :type cassandra_table_get_results_id: str + :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 @@ -443,10 +453,7 @@ class CassandraTableGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'cassandra_table_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -454,21 +461,16 @@ class CassandraTableGetResults(ARMResourceProperties): _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_get_results_id': {'key': 'properties.id', 'type': 'str'}, - 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, - 'schema': {'key': 'properties.schema', 'type': 'CassandraSchema'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, + 'schema': {'key': 'schema', 'type': 'CassandraSchema'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, } - def __init__(self, *, cassandra_table_get_results_id: str, location: str=None, tags=None, default_ttl: int=None, schema=None, **kwargs) -> None: - super(CassandraTableGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.cassandra_table_get_results_id = cassandra_table_get_results_id + def __init__(self, *, id: str, default_ttl: int=None, schema=None, **kwargs) -> None: + super(CassandraTableGetPropertiesResource, self).__init__(**kwargs) + self.id = id self.default_ttl = default_ttl self.schema = schema self._rid = None @@ -476,6 +478,48 @@ def __init__(self, *, cassandra_table_get_results_id: str, location: str=None, t self._etag = None +class CassandraTableGetResults(ARMResourceProperties): + """An Azure Cosmos DB Cassandra table. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'CassandraTableGetPropertiesResource'}, + } + + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + super(CassandraTableGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + + class CassandraTableResource(Model): """Cosmos DB Cassandra table resource object. @@ -555,6 +599,28 @@ def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: self.type = type +class CompositePath(Model): + """CompositePath. + + :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 order: Sort order for composite paths. Possible values include: + 'Ascending', 'Descending' + :type order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, order=None, **kwargs) -> None: + super(CompositePath, self).__init__(**kwargs) + self.path = path + self.order = order + + class ConflictResolutionPolicy(Model): """The conflict resolution policy for the container. @@ -1320,14 +1386,54 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class GremlinDatabaseGetResults(ARMResourceProperties): - """An Azure Cosmos DB Gremlin database. +class GremlinDatabaseGetPropertiesResource(Model): + """GremlinDatabaseGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB Gremlin database + :type id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(GremlinDatabaseGetPropertiesResource, self).__init__(**kwargs) + self.id = id + self._rid = None + self._ts = None + self._etag = None + + +class GremlinDatabaseGetResults(ARMResourceProperties): + """An Azure Cosmos DB Gremlin database. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -1339,27 +1445,15 @@ class GremlinDatabaseGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param gremlin_database_get_results_id: Required. Name of the Cosmos DB - Gremlin database - :type gremlin_database_get_results_id: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'gremlin_database_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -1368,18 +1462,12 @@ class GremlinDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'gremlin_database_get_results_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseGetPropertiesResource'}, } - def __init__(self, *, gremlin_database_get_results_id: str, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: super(GremlinDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.gremlin_database_get_results_id = gremlin_database_get_results_id - self._rid = None - self._ts = None - self._etag = None + self.resource = resource class GremlinDatabaseResource(Model): @@ -1454,28 +1542,16 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class GremlinGraphGetResults(ARMResourceProperties): - """An Azure Cosmos DB Gremlin graph. +class GremlinGraphGetPropertiesResource(Model): + """GremlinGraphGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_get_results_id: Required. Name of the Cosmos DB - Gremlin graph - :type gremlin_graph_get_results_id: str + :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 @@ -1503,10 +1579,7 @@ class GremlinGraphGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'gremlin_graph_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -1514,24 +1587,19 @@ class GremlinGraphGetResults(ARMResourceProperties): _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_get_results_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_get_results_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, **kwargs) -> None: - super(GremlinGraphGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.gremlin_graph_get_results_id = gremlin_graph_get_results_id + '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'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + 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(GremlinGraphGetPropertiesResource, self).__init__(**kwargs) + self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key self.default_ttl = default_ttl @@ -1542,30 +1610,72 @@ def __init__(self, *, gremlin_graph_get_results_id: str, location: str=None, tag self._etag = None -class GremlinGraphResource(Model): - """Cosmos DB Gremlin graph resource object. - - All required parameters must be populated in order to send to Azure. +class GremlinGraphGetResults(ARMResourceProperties): + """An Azure Cosmos DB Gremlin graph. - :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 - """ + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphGetPropertiesResource'}, + } + + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + super(GremlinGraphGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + + +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}, @@ -1650,6 +1760,11 @@ class IndexingPolicy(Model): :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] + :param composite_indexes: List of composite path list + :type composite_indexes: + list[list[~azure.mgmt.cosmosdb.models.CompositePath]] + :param spatial_indexes: List of spatial specifics + :type spatial_indexes: list[~azure.mgmt.cosmosdb.models.SpatialSpec] """ _attribute_map = { @@ -1657,14 +1772,18 @@ class IndexingPolicy(Model): 'indexing_mode': {'key': 'indexingMode', 'type': 'str'}, 'included_paths': {'key': 'includedPaths', 'type': '[IncludedPath]'}, 'excluded_paths': {'key': 'excludedPaths', 'type': '[ExcludedPath]'}, + 'composite_indexes': {'key': 'compositeIndexes', 'type': '[[CompositePath]]'}, + 'spatial_indexes': {'key': 'spatialIndexes', 'type': '[SpatialSpec]'}, } - def __init__(self, *, automatic: bool=None, indexing_mode="Consistent", included_paths=None, excluded_paths=None, **kwargs) -> None: + def __init__(self, *, automatic: bool=None, indexing_mode="Consistent", included_paths=None, excluded_paths=None, composite_indexes=None, spatial_indexes=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 + self.composite_indexes = composite_indexes + self.spatial_indexes = spatial_indexes class Location(Model): @@ -1975,28 +2094,16 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class MongoDBCollectionGetResults(ARMResourceProperties): - """An Azure Cosmos DB MongoDB collection. +class MongoDBCollectionGetPropertiesResource(Model): + """MongoDBCollectionGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_get_results_id: Required. Name of the Cosmos DB - MongoDB collection - :type mongo_db_collection_get_results_id: str + :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] @@ -2013,10 +2120,7 @@ class MongoDBCollectionGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'mongo_db_collection_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -2024,21 +2128,16 @@ class MongoDBCollectionGetResults(ARMResourceProperties): _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_get_results_id': {'key': 'properties.id', 'type': 'str'}, - 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, - 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'shard_key': {'key': 'shardKey', 'type': '{str}'}, + 'indexes': {'key': 'indexes', 'type': '[MongoIndex]'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, } - def __init__(self, *, mongo_db_collection_get_results_id: str, location: str=None, tags=None, shard_key=None, indexes=None, **kwargs) -> None: - super(MongoDBCollectionGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.mongo_db_collection_get_results_id = mongo_db_collection_get_results_id + def __init__(self, *, id: str, shard_key=None, indexes=None, **kwargs) -> None: + super(MongoDBCollectionGetPropertiesResource, self).__init__(**kwargs) + self.id = id self.shard_key = shard_key self.indexes = indexes self._rid = None @@ -2046,6 +2145,48 @@ def __init__(self, *, mongo_db_collection_get_results_id: str, location: str=Non self._etag = None +class MongoDBCollectionGetResults(ARMResourceProperties): + """An Azure Cosmos DB MongoDB collection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionGetPropertiesResource'}, + } + + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + super(MongoDBCollectionGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + + class MongoDBCollectionResource(Model): """Cosmos DB MongoDB collection resource object. @@ -2127,14 +2268,54 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class MongoDBDatabaseGetResults(ARMResourceProperties): - """An Azure Cosmos DB MongoDB database. +class MongoDBDatabaseGetPropertiesResource(Model): + """MongoDBDatabaseGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB MongoDB database + :type id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(MongoDBDatabaseGetPropertiesResource, self).__init__(**kwargs) + self.id = id + self._rid = None + self._ts = None + self._etag = None + + +class MongoDBDatabaseGetResults(ARMResourceProperties): + """An Azure Cosmos DB MongoDB database. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -2146,27 +2327,15 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param mongo_db_database_get_results_id: Required. Name of the Cosmos DB - MongoDB database - :type mongo_db_database_get_results_id: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'mongo_db_database_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -2175,18 +2344,12 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_db_database_get_results_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseGetPropertiesResource'}, } - def __init__(self, *, mongo_db_database_get_results_id: str, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: super(MongoDBDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.mongo_db_database_get_results_id = mongo_db_database_get_results_id - self._rid = None - self._ts = None - self._etag = None + self.resource = resource class MongoDBDatabaseResource(Model): @@ -2784,6 +2947,27 @@ def __init__(self, *, region: str, **kwargs) -> None: self.region = region +class SpatialSpec(Model): + """SpatialSpec. + + :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 types: List of path's spatial type + :type types: list[str or ~azure.mgmt.cosmosdb.models.SpatialType] + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'types': {'key': 'types', 'type': '[str]'}, + } + + def __init__(self, *, path: str=None, types=None, **kwargs) -> None: + super(SpatialSpec, self).__init__(**kwargs) + self.path = path + self.types = types + + class SqlContainerCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB container. @@ -2834,28 +3018,16 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class SqlContainerGetResults(ARMResourceProperties): - """An Azure Cosmos DB container. +class SqlContainerGetPropertiesResource(Model): + """SqlContainerGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_get_results_id: Required. Name of the Cosmos DB SQL - container - :type sql_container_get_results_id: str + :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 @@ -2884,10 +3056,7 @@ class SqlContainerGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sql_container_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -2895,24 +3064,19 @@ class SqlContainerGetResults(ARMResourceProperties): _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_get_results_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_get_results_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, **kwargs) -> None: - super(SqlContainerGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.sql_container_get_results_id = sql_container_get_results_id + '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'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + 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(SqlContainerGetPropertiesResource, self).__init__(**kwargs) + self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key self.default_ttl = default_ttl @@ -2923,30 +3087,72 @@ def __init__(self, *, sql_container_get_results_id: str, location: str=None, tag self._etag = None -class SqlContainerResource(Model): - """Cosmos DB SQL container resource object. +class SqlContainerGetResults(ARMResourceProperties): + """An Azure Cosmos DB container. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when + sending a request. - :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 + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlContainerGetPropertiesResource'}, + } + + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + super(SqlContainerGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + + +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 = { @@ -3022,28 +3228,16 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class SqlDatabaseGetResults(ARMResourceProperties): - """An Azure Cosmos DB SQL database. +class SqlDatabaseGetPropertiesResource(Model): + """SqlDatabaseGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_get_results_id: Required. Name of the Cosmos DB SQL - database - :type sql_database_get_results_id: str + :param id: Required. Name of the Cosmos DB SQL database + :type id: str :ivar _rid: A system generated property. A unique identifier. :vartype _rid: str :ivar _ts: A system generated property that denotes the last updated @@ -3061,10 +3255,7 @@ class SqlDatabaseGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sql_database_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -3072,21 +3263,16 @@ class SqlDatabaseGetResults(ARMResourceProperties): _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_get_results_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'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + '_colls': {'key': '_colls', 'type': 'str'}, + '_users': {'key': '_users', 'type': 'str'}, } - def __init__(self, *, sql_database_get_results_id: str, location: str=None, tags=None, _colls: str=None, _users: str=None, **kwargs) -> None: - super(SqlDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.sql_database_get_results_id = sql_database_get_results_id + def __init__(self, *, id: str, _colls: str=None, _users: str=None, **kwargs) -> None: + super(SqlDatabaseGetPropertiesResource, self).__init__(**kwargs) + self.id = id self._rid = None self._ts = None self._etag = None @@ -3094,6 +3280,48 @@ def __init__(self, *, sql_database_get_results_id: str, location: str=None, tags self._users = _users +class SqlDatabaseGetResults(ARMResourceProperties): + """An Azure Cosmos DB SQL database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseGetPropertiesResource'}, + } + + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + super(SqlDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + + class SqlDatabaseResource(Model): """Cosmos DB SQL database resource object. @@ -3166,14 +3394,58 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class SqlStoredProcedureGetResults(ARMResourceProperties): - """An Azure Cosmos DB storedProcedure. +class SqlStoredProcedureGetPropertiesResource(Model): + """SqlStoredProcedureGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB SQL storedProcedure + :type id: str + :param body: Body of the Stored Procedure + :type body: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, *, id: str, body: str=None, **kwargs) -> None: + super(SqlStoredProcedureGetPropertiesResource, self).__init__(**kwargs) + self.id = id + self.body = body + self._rid = None + self._ts = None + self._etag = None + + +class SqlStoredProcedureGetResults(ARMResourceProperties): + """An Azure Cosmos DB storedProcedure. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -3185,29 +3457,15 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param sql_stored_procedure_get_results_id: Required. Name of the Cosmos - DB SQL storedProcedure - :type sql_stored_procedure_get_results_id: str - :param body: Body of the Stored Procedure - :type body: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'sql_stored_procedure_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -3216,20 +3474,12 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_stored_procedure_get_results_id': {'key': 'properties.id', 'type': 'str'}, - 'body': {'key': 'properties.body', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureGetPropertiesResource'}, } - def __init__(self, *, sql_stored_procedure_get_results_id: str, location: str=None, tags=None, body: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: super(SqlStoredProcedureGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.sql_stored_procedure_get_results_id = sql_stored_procedure_get_results_id - self.body = body - self._rid = None - self._ts = None - self._etag = None + self.resource = resource class SqlStoredProcedureResource(Model): @@ -3308,28 +3558,16 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class SqlTriggerGetResults(ARMResourceProperties): - """An Azure Cosmos DB trigger. +class SqlTriggerGetPropertiesResource(Model): + """SqlTriggerGetPropertiesResource. 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 ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :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_trigger_get_results_id: Required. Name of the Cosmos DB SQL - trigger - :type sql_trigger_get_results_id: str + :param id: Required. Name of the Cosmos DB SQL trigger + :type id: str :param body: Body of the Trigger :type body: str :param trigger_type: Type of the Trigger. Possible values include: 'Pre', @@ -3350,10 +3588,7 @@ class SqlTriggerGetResults(ARMResourceProperties): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'sql_trigger_get_results_id': {'required': True}, + 'id': {'required': True}, '_rid': {'readonly': True}, '_ts': {'readonly': True}, '_etag': {'readonly': True}, @@ -3361,22 +3596,17 @@ class SqlTriggerGetResults(ARMResourceProperties): _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_trigger_get_results_id': {'key': 'properties.id', 'type': 'str'}, - 'body': {'key': 'properties.body', 'type': 'str'}, - 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, - 'trigger_operation': {'key': 'properties.triggerOperation', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + 'trigger_type': {'key': 'triggerType', 'type': 'str'}, + 'trigger_operation': {'key': 'triggerOperation', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, } - def __init__(self, *, sql_trigger_get_results_id: str, location: str=None, tags=None, body: str=None, trigger_type=None, trigger_operation=None, **kwargs) -> None: - super(SqlTriggerGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.sql_trigger_get_results_id = sql_trigger_get_results_id + def __init__(self, *, id: str, body: str=None, trigger_type=None, trigger_operation=None, **kwargs) -> None: + super(SqlTriggerGetPropertiesResource, self).__init__(**kwargs) + self.id = id self.body = body self.trigger_type = trigger_type self.trigger_operation = trigger_operation @@ -3385,6 +3615,48 @@ def __init__(self, *, sql_trigger_get_results_id: str, location: str=None, tags= self._etag = None +class SqlTriggerGetResults(ARMResourceProperties): + """An Azure Cosmos DB trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :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 resource: + :type resource: + ~azure.mgmt.cosmosdb.models.SqlTriggerGetPropertiesResource + """ + + _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}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerGetPropertiesResource'}, + } + + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + super(SqlTriggerGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + + class SqlTriggerResource(Model): """Cosmos DB SQL trigger resource object. @@ -3473,14 +3745,58 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class SqlUserDefinedFunctionGetResults(ARMResourceProperties): - """An Azure Cosmos DB userDefinedFunction. +class SqlUserDefinedFunctionGetPropertiesResource(Model): + """SqlUserDefinedFunctionGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB SQL userDefinedFunction + :type id: str + :param body: Body of the User Defined Function + :type body: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, *, id: str, body: str=None, **kwargs) -> None: + super(SqlUserDefinedFunctionGetPropertiesResource, self).__init__(**kwargs) + self.id = id + self.body = body + self._rid = None + self._ts = None + self._etag = None + + +class SqlUserDefinedFunctionGetResults(ARMResourceProperties): + """An Azure Cosmos DB userDefinedFunction. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -3492,29 +3808,15 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param sql_user_defined_function_get_results_id: Required. Name of the - Cosmos DB SQL userDefinedFunction - :type sql_user_defined_function_get_results_id: str - :param body: Body of the User Defined Function - :type body: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'sql_user_defined_function_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -3523,20 +3825,12 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_user_defined_function_get_results_id': {'key': 'properties.id', 'type': 'str'}, - 'body': {'key': 'properties.body', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionGetPropertiesResource'}, } - def __init__(self, *, sql_user_defined_function_get_results_id: str, location: str=None, tags=None, body: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: super(SqlUserDefinedFunctionGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.sql_user_defined_function_get_results_id = sql_user_defined_function_get_results_id - self.body = body - self._rid = None - self._ts = None - self._etag = None + self.resource = resource class SqlUserDefinedFunctionResource(Model): @@ -3615,14 +3909,54 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options -class TableGetResults(ARMResourceProperties): - """An Azure Cosmos DB Table. +class TableGetPropertiesResource(Model): + """TableGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param id: Required. Name of the Cosmos DB table + :type id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(TableGetPropertiesResource, self).__init__(**kwargs) + self.id = id + self._rid = None + self._ts = None + self._etag = None + + +class TableGetResults(ARMResourceProperties): + """An Azure Cosmos DB Table. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -3634,26 +3968,14 @@ class TableGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param table_get_results_id: Required. Name of the Cosmos DB table - :type table_get_results_id: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: object - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str + :param resource: + :type resource: ~azure.mgmt.cosmosdb.models.TableGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'table_get_results_id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, } _attribute_map = { @@ -3662,18 +3984,12 @@ class TableGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'table_get_results_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'TableGetPropertiesResource'}, } - def __init__(self, *, table_get_results_id: str, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: super(TableGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.table_get_results_id = table_get_results_id - self._rid = None - self._ts = None - self._etag = None + self.resource = resource class TableResource(Model): @@ -3698,14 +4014,64 @@ def __init__(self, *, id: str, **kwargs) -> None: self.id = id -class ThroughputSettingsGetResults(ARMResourceProperties): - """An Azure Cosmos DB resource throughput. +class ThroughputSettingsGetPropertiesResource(Model): + """ThroughputSettingsGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. + :param throughput: Required. Value of the Cosmos DB resource throughput + :type throughput: int + :ivar minimum_throughput: The minimum throughput of the resource + :vartype minimum_throughput: str + :ivar offer_replace_pending: The throughput replace is pending + :vartype offer_replace_pending: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'throughput': {'required': True}, + 'minimum_throughput': {'readonly': True}, + 'offer_replace_pending': {'readonly': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, + 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, + '_rid': {'key': '_rid', 'type': 'str'}, + '_ts': {'key': '_ts', 'type': 'object'}, + '_etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__(self, *, throughput: int, **kwargs) -> None: + super(ThroughputSettingsGetPropertiesResource, self).__init__(**kwargs) + self.throughput = throughput + self.minimum_throughput = None + self.offer_replace_pending = None + self._rid = None + self._ts = None + self._etag = None + + +class ThroughputSettingsGetResults(ARMResourceProperties): + """An Azure Cosmos DB resource throughput. + + Variables are only populated by the server, and will be ignored when + sending a request. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -3717,21 +4083,15 @@ class ThroughputSettingsGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param throughput: Required. Value of the Cosmos DB resource throughput - :type throughput: int - :ivar minimum_throughput: The minimum throughput of the resource - :vartype minimum_throughput: str - :ivar offer_replace_pending: The throughput replace is pending - :vartype offer_replace_pending: str + :param resource: + :type resource: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetPropertiesResource """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'throughput': {'required': True}, - 'minimum_throughput': {'readonly': True}, - 'offer_replace_pending': {'readonly': True}, } _attribute_map = { @@ -3740,16 +4100,12 @@ class ThroughputSettingsGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'throughput': {'key': 'properties.throughput', 'type': 'int'}, - 'minimum_throughput': {'key': 'properties.minimumThroughput', 'type': 'str'}, - 'offer_replace_pending': {'key': 'properties.offerReplacePending', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsGetPropertiesResource'}, } - def __init__(self, *, throughput: int, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: super(ThroughputSettingsGetResults, self).__init__(location=location, tags=tags, **kwargs) - self.throughput = throughput - self.minimum_throughput = None - self.offer_replace_pending = None + self.resource = resource class ThroughputSettingsResource(Model): 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 1f08862acee4..afa3d545c718 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.10.0" +VERSION = "0.11.0"