Skip to content

Commit

Permalink
CodeGen from PR 14406 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 6002e63ec968096b0ba7c3b54242dec5f0057700 into 7d4caa5
  • Loading branch information
SDKAuto committed May 13, 2021
1 parent 494f407 commit 5ceb5f7
Show file tree
Hide file tree
Showing 56 changed files with 3,395 additions and 8,903 deletions.
1 change: 1 addition & 0 deletions sdk/cosmos/azure-mgmt-cosmosdb/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
14 changes: 7 additions & 7 deletions sdk/cosmos/azure-mgmt-cosmosdb/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"autorest": "3.3.0",
"use": "@autorest/[email protected]",
"commit": "c6a18a2e52c498ab976dddd807221c2a12d5f9d1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --version=3.3.0",
"readme": "specification/cosmos-db/resource-manager/readme.md"
}
"autorest": "3.4.2",
"use": "@autorest/[email protected]",
"commit": "2004633e9c603f365b5e1a6eca1d068b75b23628",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --version=3.4.2",
"readme": "specification/cosmos-db/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-04-01-preview"
self.api_version = "2021-04-15"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,13 @@
from .operations import TableResourcesOperations
from .operations import CassandraResourcesOperations
from .operations import GremlinResourcesOperations
from .operations import RestorableDatabaseAccountsOperations
from .operations import CosmosDBManagementClientOperationsMixin
from .operations import NotebookWorkspacesOperations
from .operations import RestorableSqlDatabasesOperations
from .operations import RestorableSqlContainersOperations
from .operations import RestorableSqlResourcesOperations
from .operations import RestorableMongodbDatabasesOperations
from .operations import RestorableMongodbCollectionsOperations
from .operations import RestorableMongodbResourcesOperations
from .operations import CassandraClustersOperations
from .operations import CassandraDataCentersOperations
from .operations import PrivateLinkResourcesOperations
from .operations import PrivateEndpointConnectionsOperations
from .operations import ServiceOperations
from . import models


class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin):
class CosmosDBManagementClient(object):
"""Azure Cosmos DB Database Service Resource Provider REST API.
:ivar database_accounts: DatabaseAccountsOperations operations
Expand Down Expand Up @@ -93,32 +82,12 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin):
:vartype cassandra_resources: azure.mgmt.cosmosdb.operations.CassandraResourcesOperations
:ivar gremlin_resources: GremlinResourcesOperations operations
:vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations
:ivar restorable_database_accounts: RestorableDatabaseAccountsOperations operations
:vartype restorable_database_accounts: azure.mgmt.cosmosdb.operations.RestorableDatabaseAccountsOperations
:ivar notebook_workspaces: NotebookWorkspacesOperations operations
:vartype notebook_workspaces: azure.mgmt.cosmosdb.operations.NotebookWorkspacesOperations
:ivar restorable_sql_databases: RestorableSqlDatabasesOperations operations
:vartype restorable_sql_databases: azure.mgmt.cosmosdb.operations.RestorableSqlDatabasesOperations
:ivar restorable_sql_containers: RestorableSqlContainersOperations operations
:vartype restorable_sql_containers: azure.mgmt.cosmosdb.operations.RestorableSqlContainersOperations
:ivar restorable_sql_resources: RestorableSqlResourcesOperations operations
:vartype restorable_sql_resources: azure.mgmt.cosmosdb.operations.RestorableSqlResourcesOperations
:ivar restorable_mongodb_databases: RestorableMongodbDatabasesOperations operations
:vartype restorable_mongodb_databases: azure.mgmt.cosmosdb.operations.RestorableMongodbDatabasesOperations
:ivar restorable_mongodb_collections: RestorableMongodbCollectionsOperations operations
:vartype restorable_mongodb_collections: azure.mgmt.cosmosdb.operations.RestorableMongodbCollectionsOperations
:ivar restorable_mongodb_resources: RestorableMongodbResourcesOperations operations
:vartype restorable_mongodb_resources: azure.mgmt.cosmosdb.operations.RestorableMongodbResourcesOperations
:ivar cassandra_clusters: CassandraClustersOperations operations
:vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations
:ivar cassandra_data_centers: CassandraDataCentersOperations operations
:vartype cassandra_data_centers: azure.mgmt.cosmosdb.operations.CassandraDataCentersOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
:vartype private_link_resources: azure.mgmt.cosmosdb.operations.PrivateLinkResourcesOperations
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
:vartype private_endpoint_connections: azure.mgmt.cosmosdb.operations.PrivateEndpointConnectionsOperations
:ivar service: ServiceOperations operations
:vartype service: azure.mgmt.cosmosdb.operations.ServiceOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
Expand Down Expand Up @@ -181,32 +150,12 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.gremlin_resources = GremlinResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.restorable_database_accounts = RestorableDatabaseAccountsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.notebook_workspaces = NotebookWorkspacesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.restorable_sql_databases = RestorableSqlDatabasesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.restorable_sql_containers = RestorableSqlContainersOperations(
self._client, self._config, self._serialize, self._deserialize)
self.restorable_sql_resources = RestorableSqlResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.restorable_mongodb_databases = RestorableMongodbDatabasesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.restorable_mongodb_collections = RestorableMongodbCollectionsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.restorable_mongodb_resources = RestorableMongodbResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.cassandra_clusters = CassandraClustersOperations(
self._client, self._config, self._serialize, self._deserialize)
self.cassandra_data_centers = CassandraDataCentersOperations(
self._client, self._config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.service = ServiceOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
Expand Down
66 changes: 54 additions & 12 deletions sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2021-03-15",
"total_api_version_list": ["2021-03-15"],
"chosen_version": "2021-04-15",
"total_api_version_list": ["2021-04-15"],
"client": {
"name": "CosmosDBManagementClient",
"filename": "_cosmos_db_management_client",
Expand All @@ -9,7 +9,9 @@
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand All @@ -28,28 +30,72 @@
},
"async": {
"credential": {
"signature": "credential, # type: \"AsyncTokenCredential\"",
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"signature": "subscription_id: str,",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
"call": "credential, subscription_id",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url=None, # type: Optional[str]",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url: Optional[str] = None,",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null
"credential_key_header_name": null,
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"database_accounts": "DatabaseAccountsOperations",
Expand All @@ -73,9 +119,5 @@
"notebook_workspaces": "NotebookWorkspacesOperations",
"private_link_resources": "PrivateLinkResourcesOperations",
"private_endpoint_connections": "PrivateEndpointConnectionsOperations"
},
"operation_mixins": {
},
"sync_imports": "None",
"async_imports": "None"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.3.0b1"
VERSION = "0.7.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-04-01-preview"
self.api_version = "2021-04-15"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Loading

0 comments on commit 5ceb5f7

Please sign in to comment.