Skip to content

Commit 0069cb4

Browse files
author
SDKAuto
committed
CodeGen from PR 21333 in Azure/azure-rest-api-specs
Merge ed8ea06348ad545fbc47692a302cfbba05928f72 into 7b47689d4efc098f25f46781f05f22179c153314
1 parent 247bd47 commit 0069cb4

File tree

313 files changed

+9311
-21812
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

313 files changed

+9311
-21812
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "21426cf85836ec17aaa4f20f58324a8666925e34",
2+
"commit": "d23c961f4894c1de5b67f82664af35e2b8c48d76",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/[email protected].1",
6+
"@autorest/[email protected].16",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected].1 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected].16 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/cosmos-db/resource-manager/readme.md"
1111
}

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
try:
1515
from ._patch import __all__ as _patch_all
16-
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
16+
from ._patch import * # pylint: disable=unused-wildcard-import
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t
3535
:type credential: ~azure.core.credentials.TokenCredential
3636
:param subscription_id: The ID of the target subscription. Required.
3737
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2022-08-15-preview". Note that overriding
39-
this default value may result in unsupported behavior.
38+
:keyword api_version: Api Version. Default value is "2022-11-15". Note that overriding this
39+
default value may result in unsupported behavior.
4040
:paramtype api_version: str
4141
"""
4242

4343
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4444
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
45-
api_version = kwargs.pop("api_version", "2022-08-15-preview") # type: Literal["2022-08-15-preview"]
45+
api_version: Literal["2022-11-15"] = kwargs.pop("api_version", "2022-11-15")
4646

4747
if credential is None:
4848
raise ValueError("Parameter 'credential' must not be None.")
@@ -56,10 +56,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5656
kwargs.setdefault("sdk_moniker", "mgmt-cosmosdb/{}".format(VERSION))
5757
self._configure(**kwargs)
5858

59-
def _configure(
60-
self, **kwargs # type: Any
61-
):
62-
# type: (...) -> None
59+
def _configure(self, **kwargs: Any) -> None:
6360
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
6461
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
6562
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from azure.core.rest import HttpRequest, HttpResponse
1313
from azure.mgmt.core import ARMPipelineClient
1414

15-
from . import models
15+
from . import models as _models
1616
from ._configuration import CosmosDBManagementClientConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
@@ -23,11 +23,9 @@
2323
CollectionPartitionOperations,
2424
CollectionPartitionRegionOperations,
2525
CollectionRegionOperations,
26-
DataTransferJobsOperations,
2726
DatabaseAccountRegionOperations,
2827
DatabaseAccountsOperations,
2928
DatabaseOperations,
30-
GraphResourcesOperations,
3129
GremlinResourcesOperations,
3230
LocationsOperations,
3331
MongoDBResourcesOperations,
@@ -95,8 +93,6 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
9593
:ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations
9694
:vartype partition_key_range_id_region:
9795
azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdRegionOperations
98-
:ivar graph_resources: GraphResourcesOperations operations
99-
:vartype graph_resources: azure.mgmt.cosmosdb.operations.GraphResourcesOperations
10096
:ivar sql_resources: SqlResourcesOperations operations
10197
:vartype sql_resources: azure.mgmt.cosmosdb.operations.SqlResourcesOperations
10298
:ivar mongo_db_resources: MongoDBResourcesOperations operations
@@ -109,8 +105,6 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
109105
:vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations
110106
:ivar locations: LocationsOperations operations
111107
:vartype locations: azure.mgmt.cosmosdb.operations.LocationsOperations
112-
:ivar data_transfer_jobs: DataTransferJobsOperations operations
113-
:vartype data_transfer_jobs: azure.mgmt.cosmosdb.operations.DataTransferJobsOperations
114108
:ivar cassandra_clusters: CassandraClustersOperations operations
115109
:vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations
116110
:ivar cassandra_data_centers: CassandraDataCentersOperations operations
@@ -165,8 +159,8 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
165159
:type subscription_id: str
166160
:param base_url: Service URL. Default value is "https://management.azure.com".
167161
:type base_url: str
168-
:keyword api_version: Api Version. Default value is "2022-08-15-preview". Note that overriding
169-
this default value may result in unsupported behavior.
162+
:keyword api_version: Api Version. Default value is "2022-11-15". Note that overriding this
163+
default value may result in unsupported behavior.
170164
:paramtype api_version: str
171165
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
172166
Retry-After header is present.
@@ -184,7 +178,7 @@ def __init__(
184178
)
185179
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
186180

187-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
181+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
188182
self._serialize = Serializer(client_models)
189183
self._deserialize = Deserializer(client_models)
190184
self._serialize.client_side_validation = False
@@ -219,7 +213,6 @@ def __init__(
219213
self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(
220214
self._client, self._config, self._serialize, self._deserialize
221215
)
222-
self.graph_resources = GraphResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
223216
self.sql_resources = SqlResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
224217
self.mongo_db_resources = MongoDBResourcesOperations(
225218
self._client, self._config, self._serialize, self._deserialize
@@ -232,9 +225,6 @@ def __init__(
232225
self._client, self._config, self._serialize, self._deserialize
233226
)
234227
self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize)
235-
self.data_transfer_jobs = DataTransferJobsOperations(
236-
self._client, self._config, self._serialize, self._deserialize
237-
)
238228
self.cassandra_clusters = CassandraClustersOperations(
239229
self._client, self._config, self._serialize, self._deserialize
240230
)
@@ -310,15 +300,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
310300
request_copy.url = self._client.format_url(request_copy.url)
311301
return self._client.send_request(request_copy, **kwargs)
312302

313-
def close(self):
314-
# type: () -> None
303+
def close(self) -> None:
315304
self._client.close()
316305

317-
def __enter__(self):
318-
# type: () -> CosmosDBManagementClient
306+
def __enter__(self) -> "CosmosDBManagementClient":
319307
self._client.__enter__()
320308
return self
321309

322-
def __exit__(self, *exc_details):
323-
# type: (Any) -> None
310+
def __exit__(self, *exc_details) -> None:
324311
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)