Skip to content

Commit eab722a

Browse files
author
SDKAuto
committed
CodeGen from PR 22937 in Azure/azure-rest-api-specs
Merge ff354bf8148ea368ef0806d599074ba253ec6c13 into 296625765bab7a7830cb91df3c257e686f87915f
1 parent a826f67 commit eab722a

File tree

320 files changed

+3503
-20169
lines changed

Some content is hidden

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

320 files changed

+3503
-20169
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "1e7b408f3323e7f5424745718fe62c7a043a2337",
2+
"commit": "3c5b43691132360fe8986291d9c464c1b41cbb99",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/[email protected].0",
6+
"@autorest/[email protected].7",
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].0 --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].7 --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/_configuration.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
@@ -35,14 +29,14 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t
3529
:type credential: ~azure.core.credentials.TokenCredential
3630
:param subscription_id: The ID of the target subscription. Required.
3731
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2022-11-15-preview". Note that overriding
39-
this default value may result in unsupported behavior.
32+
:keyword api_version: Api Version. Default value is "2023-03-15". Note that overriding this
33+
default value may result in unsupported behavior.
4034
:paramtype api_version: str
4135
"""
4236

4337
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4438
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2022-11-15-preview"] = kwargs.pop("api_version", "2022-11-15-preview")
39+
api_version: str = kwargs.pop("api_version", "2023-03-15")
4640

4741
if credential is None:
4842
raise ValueError("Parameter 'credential' must not be None.")

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

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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-11-15-preview". Note that overriding
169-
this default value may result in unsupported behavior.
162+
:keyword api_version: Api Version. Default value is "2023-03-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.
@@ -182,7 +176,7 @@ def __init__(
182176
self._config = CosmosDBManagementClientConfiguration(
183177
credential=credential, subscription_id=subscription_id, **kwargs
184178
)
185-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
179+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
186180

187181
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
188182
self._serialize = Serializer(client_models)
@@ -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
)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
629629
if xml_desc.get("attr", False):
630630
if xml_ns:
631631
ET.register_namespace(xml_prefix, xml_ns)
632-
xml_name = "{}{}".format(xml_ns, xml_name)
632+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
633633
serialized.set(xml_name, new_attr) # type: ignore
634634
continue
635635
if xml_desc.get("text", False):
@@ -1271,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type):
12711271
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
12721272
xml_ns = internal_type_xml_map.get("ns", None)
12731273
if xml_ns:
1274-
xml_name = "{}{}".format(xml_ns, xml_name)
1274+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12751275
return xml_name
12761276

12771277

@@ -1295,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data):
12951295
# Integrate namespace if necessary
12961296
xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None))
12971297
if xml_ns:
1298-
xml_name = "{}{}".format(xml_ns, xml_name)
1298+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12991299

13001300
# If it's an attribute, that's simple
13011301
if xml_desc.get("attr", False):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "9.1.0b1"
9+
VERSION = "0.7.0"

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from .._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials_async import AsyncTokenCredential
@@ -35,14 +29,14 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t
3529
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3630
:param subscription_id: The ID of the target subscription. Required.
3731
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2022-11-15-preview". Note that overriding
39-
this default value may result in unsupported behavior.
32+
:keyword api_version: Api Version. Default value is "2023-03-15". Note that overriding this
33+
default value may result in unsupported behavior.
4034
:paramtype api_version: str
4135
"""
4236

4337
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
4438
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2022-11-15-preview"] = kwargs.pop("api_version", "2022-11-15-preview")
39+
api_version: str = kwargs.pop("api_version", "2023-03-15")
4640

4741
if credential is None:
4842
raise ValueError("Parameter 'credential' must not be None.")

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

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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,
@@ -96,8 +94,6 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
9694
:ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations
9795
:vartype partition_key_range_id_region:
9896
azure.mgmt.cosmosdb.aio.operations.PartitionKeyRangeIdRegionOperations
99-
:ivar graph_resources: GraphResourcesOperations operations
100-
:vartype graph_resources: azure.mgmt.cosmosdb.aio.operations.GraphResourcesOperations
10197
:ivar sql_resources: SqlResourcesOperations operations
10298
:vartype sql_resources: azure.mgmt.cosmosdb.aio.operations.SqlResourcesOperations
10399
:ivar mongo_db_resources: MongoDBResourcesOperations operations
@@ -110,8 +106,6 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
110106
:vartype gremlin_resources: azure.mgmt.cosmosdb.aio.operations.GremlinResourcesOperations
111107
:ivar locations: LocationsOperations operations
112108
:vartype locations: azure.mgmt.cosmosdb.aio.operations.LocationsOperations
113-
:ivar data_transfer_jobs: DataTransferJobsOperations operations
114-
:vartype data_transfer_jobs: azure.mgmt.cosmosdb.aio.operations.DataTransferJobsOperations
115109
:ivar cassandra_clusters: CassandraClustersOperations operations
116110
:vartype cassandra_clusters: azure.mgmt.cosmosdb.aio.operations.CassandraClustersOperations
117111
:ivar cassandra_data_centers: CassandraDataCentersOperations operations
@@ -168,8 +162,8 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
168162
:type subscription_id: str
169163
:param base_url: Service URL. Default value is "https://management.azure.com".
170164
:type base_url: str
171-
:keyword api_version: Api Version. Default value is "2022-11-15-preview". Note that overriding
172-
this default value may result in unsupported behavior.
165+
:keyword api_version: Api Version. Default value is "2023-03-15". Note that overriding this
166+
default value may result in unsupported behavior.
173167
:paramtype api_version: str
174168
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
175169
Retry-After header is present.
@@ -185,7 +179,7 @@ def __init__(
185179
self._config = CosmosDBManagementClientConfiguration(
186180
credential=credential, subscription_id=subscription_id, **kwargs
187181
)
188-
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
182+
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
189183

190184
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
191185
self._serialize = Serializer(client_models)
@@ -222,7 +216,6 @@ def __init__(
222216
self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(
223217
self._client, self._config, self._serialize, self._deserialize
224218
)
225-
self.graph_resources = GraphResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
226219
self.sql_resources = SqlResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
227220
self.mongo_db_resources = MongoDBResourcesOperations(
228221
self._client, self._config, self._serialize, self._deserialize
@@ -235,9 +228,6 @@ def __init__(
235228
self._client, self._config, self._serialize, self._deserialize
236229
)
237230
self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize)
238-
self.data_transfer_jobs = DataTransferJobsOperations(
239-
self._client, self._config, self._serialize, self._deserialize
240-
)
241231
self.cassandra_clusters = CassandraClustersOperations(
242232
self._client, self._config, self._serialize, self._deserialize
243233
)

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@
1919
from ._collection_partition_operations import CollectionPartitionOperations
2020
from ._partition_key_range_id_operations import PartitionKeyRangeIdOperations
2121
from ._partition_key_range_id_region_operations import PartitionKeyRangeIdRegionOperations
22-
from ._graph_resources_operations import GraphResourcesOperations
2322
from ._sql_resources_operations import SqlResourcesOperations
2423
from ._mongo_db_resources_operations import MongoDBResourcesOperations
2524
from ._table_resources_operations import TableResourcesOperations
2625
from ._cassandra_resources_operations import CassandraResourcesOperations
2726
from ._gremlin_resources_operations import GremlinResourcesOperations
2827
from ._locations_operations import LocationsOperations
29-
from ._data_transfer_jobs_operations import DataTransferJobsOperations
3028
from ._cassandra_clusters_operations import CassandraClustersOperations
3129
from ._cassandra_data_centers_operations import CassandraDataCentersOperations
3230
from ._notebook_workspaces_operations import NotebookWorkspacesOperations
@@ -64,14 +62,12 @@
6462
"CollectionPartitionOperations",
6563
"PartitionKeyRangeIdOperations",
6664
"PartitionKeyRangeIdRegionOperations",
67-
"GraphResourcesOperations",
6865
"SqlResourcesOperations",
6966
"MongoDBResourcesOperations",
7067
"TableResourcesOperations",
7168
"CassandraResourcesOperations",
7269
"GremlinResourcesOperations",
7370
"LocationsOperations",
74-
"DataTransferJobsOperations",
7571
"CassandraClustersOperations",
7672
"CassandraDataCentersOperations",
7773
"NotebookWorkspacesOperations",

0 commit comments

Comments
 (0)