Skip to content

Commit

Permalink
[AutoPR cosmos-db/resource-manager] Rename Gremlin container by graph (
Browse files Browse the repository at this point in the history
…#4941)

* Generated from cdf503be9781e3833dabc4607cc59c5d59c21370

Rename Gremlin container by graph

* Generated from 8133c0ddc061fa40abb3a9fa9324242b7c6ad6ce

Replace mongo with mongodb

* Generated from 5f17be643cbf4c0f823a0d9b0b90bea17a84f0ab

Update file name by git mv as windows doesn't work
  • Loading branch information
AutorestCI authored Apr 26, 2019
1 parent 8a2d53a commit d7a99cc
Show file tree
Hide file tree
Showing 36 changed files with 954 additions and 520 deletions.
77 changes: 44 additions & 33 deletions azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
from .unique_key_py3 import UniqueKey
from .unique_key_policy_py3 import UniqueKeyPolicy
from .conflict_resolution_policy_py3 import ConflictResolutionPolicy
from .container_py3 import Container
from .mongo_database_py3 import MongoDatabase
from .mongo_collection_py3 import MongoCollection
from .sql_container_py3 import SqlContainer
from .mongo_db_database_py3 import MongoDBDatabase
from .mongo_db_collection_py3 import MongoDBCollection
from .table_py3 import Table
from .cassandra_keyspace_py3 import CassandraKeyspace
from .cassandra_table_py3 import CassandraTable
from .gremlin_database_py3 import GremlinDatabase
from .gremlin_graph_py3 import GremlinGraph
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .failover_policies_py3 import FailoverPolicies
from .region_for_online_offline_py3 import RegionForOnlineOffline
Expand All @@ -46,15 +47,15 @@
from .database_account_regenerate_key_parameters_py3 import DatabaseAccountRegenerateKeyParameters
from .sql_database_resource_py3 import SqlDatabaseResource
from .sql_database_create_update_parameters_py3 import SqlDatabaseCreateUpdateParameters
from .container_resource_py3 import ContainerResource
from .container_create_update_parameters_py3 import ContainerCreateUpdateParameters
from .mongo_database_resource_py3 import MongoDatabaseResource
from .mongo_database_create_update_parameters_py3 import MongoDatabaseCreateUpdateParameters
from .sql_container_resource_py3 import SqlContainerResource
from .sql_container_create_update_parameters_py3 import SqlContainerCreateUpdateParameters
from .mongo_db_database_resource_py3 import MongoDBDatabaseResource
from .mongo_db_database_create_update_parameters_py3 import MongoDBDatabaseCreateUpdateParameters
from .mongo_index_keys_py3 import MongoIndexKeys
from .mongo_index_options_py3 import MongoIndexOptions
from .mongo_index_py3 import MongoIndex
from .mongo_collection_resource_py3 import MongoCollectionResource
from .mongo_collection_create_update_parameters_py3 import MongoCollectionCreateUpdateParameters
from .mongo_db_collection_resource_py3 import MongoDBCollectionResource
from .mongo_db_collection_create_update_parameters_py3 import MongoDBCollectionCreateUpdateParameters
from .table_resource_py3 import TableResource
from .table_create_update_parameters_py3 import TableCreateUpdateParameters
from .cassandra_keyspace_resource_py3 import CassandraKeyspaceResource
Expand All @@ -67,6 +68,8 @@
from .cassandra_table_create_update_parameters_py3 import CassandraTableCreateUpdateParameters
from .gremlin_database_resource_py3 import GremlinDatabaseResource
from .gremlin_database_create_update_parameters_py3 import GremlinDatabaseCreateUpdateParameters
from .gremlin_graph_resource_py3 import GremlinGraphResource
from .gremlin_graph_create_update_parameters_py3 import GremlinGraphCreateUpdateParameters
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .metric_name_py3 import MetricName
Expand Down Expand Up @@ -95,13 +98,14 @@
from .unique_key import UniqueKey
from .unique_key_policy import UniqueKeyPolicy
from .conflict_resolution_policy import ConflictResolutionPolicy
from .container import Container
from .mongo_database import MongoDatabase
from .mongo_collection import MongoCollection
from .sql_container import SqlContainer
from .mongo_db_database import MongoDBDatabase
from .mongo_db_collection import MongoDBCollection
from .table import Table
from .cassandra_keyspace import CassandraKeyspace
from .cassandra_table import CassandraTable
from .gremlin_database import GremlinDatabase
from .gremlin_graph import GremlinGraph
from .error_response import ErrorResponse, ErrorResponseException
from .failover_policies import FailoverPolicies
from .region_for_online_offline import RegionForOnlineOffline
Expand All @@ -116,15 +120,15 @@
from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters
from .sql_database_resource import SqlDatabaseResource
from .sql_database_create_update_parameters import SqlDatabaseCreateUpdateParameters
from .container_resource import ContainerResource
from .container_create_update_parameters import ContainerCreateUpdateParameters
from .mongo_database_resource import MongoDatabaseResource
from .mongo_database_create_update_parameters import MongoDatabaseCreateUpdateParameters
from .sql_container_resource import SqlContainerResource
from .sql_container_create_update_parameters import SqlContainerCreateUpdateParameters
from .mongo_db_database_resource import MongoDBDatabaseResource
from .mongo_db_database_create_update_parameters import MongoDBDatabaseCreateUpdateParameters
from .mongo_index_keys import MongoIndexKeys
from .mongo_index_options import MongoIndexOptions
from .mongo_index import MongoIndex
from .mongo_collection_resource import MongoCollectionResource
from .mongo_collection_create_update_parameters import MongoCollectionCreateUpdateParameters
from .mongo_db_collection_resource import MongoDBCollectionResource
from .mongo_db_collection_create_update_parameters import MongoDBCollectionCreateUpdateParameters
from .table_resource import TableResource
from .table_create_update_parameters import TableCreateUpdateParameters
from .cassandra_keyspace_resource import CassandraKeyspaceResource
Expand All @@ -137,6 +141,8 @@
from .cassandra_table_create_update_parameters import CassandraTableCreateUpdateParameters
from .gremlin_database_resource import GremlinDatabaseResource
from .gremlin_database_create_update_parameters import GremlinDatabaseCreateUpdateParameters
from .gremlin_graph_resource import GremlinGraphResource
from .gremlin_graph_create_update_parameters import GremlinGraphCreateUpdateParameters
from .operation_display import OperationDisplay
from .operation import Operation
from .metric_name import MetricName
Expand All @@ -154,13 +160,14 @@
from .usage_paged import UsagePaged
from .metric_definition_paged import MetricDefinitionPaged
from .sql_database_paged import SqlDatabasePaged
from .container_paged import ContainerPaged
from .mongo_database_paged import MongoDatabasePaged
from .mongo_collection_paged import MongoCollectionPaged
from .sql_container_paged import SqlContainerPaged
from .mongo_db_database_paged import MongoDBDatabasePaged
from .mongo_db_collection_paged import MongoDBCollectionPaged
from .table_paged import TablePaged
from .cassandra_keyspace_paged import CassandraKeyspacePaged
from .cassandra_table_paged import CassandraTablePaged
from .gremlin_database_paged import GremlinDatabasePaged
from .gremlin_graph_paged import GremlinGraphPaged
from .operation_paged import OperationPaged
from .percentile_metric_paged import PercentileMetricPaged
from .partition_metric_paged import PartitionMetricPaged
Expand Down Expand Up @@ -195,13 +202,14 @@
'UniqueKey',
'UniqueKeyPolicy',
'ConflictResolutionPolicy',
'Container',
'MongoDatabase',
'MongoCollection',
'SqlContainer',
'MongoDBDatabase',
'MongoDBCollection',
'Table',
'CassandraKeyspace',
'CassandraTable',
'GremlinDatabase',
'GremlinGraph',
'ErrorResponse', 'ErrorResponseException',
'FailoverPolicies',
'RegionForOnlineOffline',
Expand All @@ -216,15 +224,15 @@
'DatabaseAccountRegenerateKeyParameters',
'SqlDatabaseResource',
'SqlDatabaseCreateUpdateParameters',
'ContainerResource',
'ContainerCreateUpdateParameters',
'MongoDatabaseResource',
'MongoDatabaseCreateUpdateParameters',
'SqlContainerResource',
'SqlContainerCreateUpdateParameters',
'MongoDBDatabaseResource',
'MongoDBDatabaseCreateUpdateParameters',
'MongoIndexKeys',
'MongoIndexOptions',
'MongoIndex',
'MongoCollectionResource',
'MongoCollectionCreateUpdateParameters',
'MongoDBCollectionResource',
'MongoDBCollectionCreateUpdateParameters',
'TableResource',
'TableCreateUpdateParameters',
'CassandraKeyspaceResource',
Expand All @@ -237,6 +245,8 @@
'CassandraTableCreateUpdateParameters',
'GremlinDatabaseResource',
'GremlinDatabaseCreateUpdateParameters',
'GremlinGraphResource',
'GremlinGraphCreateUpdateParameters',
'OperationDisplay',
'Operation',
'MetricName',
Expand All @@ -254,13 +264,14 @@
'UsagePaged',
'MetricDefinitionPaged',
'SqlDatabasePaged',
'ContainerPaged',
'MongoDatabasePaged',
'MongoCollectionPaged',
'SqlContainerPaged',
'MongoDBDatabasePaged',
'MongoDBCollectionPaged',
'TablePaged',
'CassandraKeyspacePaged',
'CassandraTablePaged',
'GremlinDatabasePaged',
'GremlinGraphPaged',
'OperationPaged',
'PercentileMetricPaged',
'PartitionMetricPaged',
Expand Down
96 changes: 96 additions & 0 deletions azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource


class GremlinGraph(Resource):
"""An Azure Cosmos DB Gremlin graph.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: The unique resource identifier of the database account.
:vartype id: str
:ivar name: The name of the database account.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:param location: The location of the resource group to which the resource
belongs.
:type location: str
:param tags:
:type tags: dict[str, str]
:param gremlin_graph_id: Required. Name of the Cosmos DB Gremlin graph
:type gremlin_graph_id: str
:param indexing_policy: The configuration of the indexing policy. By
default, the indexing is automatic for all document paths within the graph
:type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy
:param partition_key: The configuration of the partition key to be used
for partitioning data into multiple partitions
:type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey
:param default_ttl: Default time to live
:type default_ttl: int
:param unique_key_policy: The unique key policy configuration for
specifying uniqueness constraints on documents in the collection in the
Azure Cosmos DB service.
:type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy
:param conflict_resolution_policy: The conflict resolution policy for the
graph.
:type conflict_resolution_policy:
~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy
:param _rid: A system generated property. A unique identifier.
:type _rid: str
:param _ts: A system generated property that denotes the last updated
timestamp of the resource.
:type _ts: object
:param _etag: A system generated property representing the resource etag
required for optimistic concurrency control.
:type _etag: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'gremlin_graph_id': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'gremlin_graph_id': {'key': 'properties.id', 'type': 'str'},
'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'},
'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'},
'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'},
'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'},
'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'},
'_rid': {'key': 'properties._rid', 'type': 'str'},
'_ts': {'key': 'properties._ts', 'type': 'object'},
'_etag': {'key': 'properties._etag', 'type': 'str'},
}

def __init__(self, **kwargs):
super(GremlinGraph, self).__init__(**kwargs)
self.gremlin_graph_id = kwargs.get('gremlin_graph_id', None)
self.indexing_policy = kwargs.get('indexing_policy', None)
self.partition_key = kwargs.get('partition_key', None)
self.default_ttl = kwargs.get('default_ttl', None)
self.unique_key_policy = kwargs.get('unique_key_policy', None)
self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None)
self._rid = kwargs.get('_rid', None)
self._ts = kwargs.get('_ts', None)
self._etag = kwargs.get('_etag', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class GremlinGraphCreateUpdateParameters(Model):
"""Parameters to create and update Cosmos DB Gremlin graph.
All required parameters must be populated in order to send to Azure.
:param resource: Required. The standard JSON format of a Gremlin graph
:type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource
:param options: Required. A key-value pair of options to be applied for
the request. This corresponds to the headers sent with the request.
:type options: dict[str, str]
"""

_validation = {
'resource': {'required': True},
'options': {'required': True},
}

_attribute_map = {
'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'},
'options': {'key': 'properties.options', 'type': '{str}'},
}

def __init__(self, **kwargs):
super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs)
self.resource = kwargs.get('resource', None)
self.options = kwargs.get('options', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class GremlinGraphCreateUpdateParameters(Model):
"""Parameters to create and update Cosmos DB Gremlin graph.
All required parameters must be populated in order to send to Azure.
:param resource: Required. The standard JSON format of a Gremlin graph
:type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource
:param options: Required. A key-value pair of options to be applied for
the request. This corresponds to the headers sent with the request.
:type options: dict[str, str]
"""

_validation = {
'resource': {'required': True},
'options': {'required': True},
}

_attribute_map = {
'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'},
'options': {'key': 'properties.options', 'type': '{str}'},
}

def __init__(self, *, resource, options, **kwargs) -> None:
super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs)
self.resource = resource
self.options = options
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
from msrest.paging import Paged


class ContainerPaged(Paged):
class GremlinGraphPaged(Paged):
"""
A paging container for iterating over a list of :class:`Container <azure.mgmt.cosmosdb.models.Container>` object
A paging container for iterating over a list of :class:`GremlinGraph <azure.mgmt.cosmosdb.models.GremlinGraph>` object
"""

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

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

super(ContainerPaged, self).__init__(*args, **kwargs)
super(GremlinGraphPaged, self).__init__(*args, **kwargs)
Loading

0 comments on commit d7a99cc

Please sign in to comment.