Skip to content

Commit b2cb433

Browse files
author
SDKAuto
committed
CodeGen from PR 31960 in Azure/azure-rest-api-specs
Merge 7a3735e38e93de2f8822813a94bc14be0523d0a1 into b6075dbc2321933382ea91c787ee62c6bdb87e5d
1 parent fcdfb8e commit b2cb433

File tree

7 files changed

+408
-70
lines changed

7 files changed

+408
-70
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "4aad50a36767f7c36673f2c7982bb4055dbf5ed4",
2+
"commit": "264973dc0a2f26294b603ab506ec06c04fdc09c6",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.26.4",
6+
"@autorest/python@6.27.4",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.26.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/cosmos-db/resource-manager/readme.md"
1111
}

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def _create_xml_node(tag, prefix=None, ns=None):
310310
return ET.Element(tag)
311311

312312

313-
class Model(object):
313+
class Model:
314314
"""Mixin for all client request body/response body models to support
315315
serialization and deserialization.
316316
"""
@@ -563,7 +563,7 @@ def _decode_attribute_map_key(key):
563563
return key.replace("\\.", ".")
564564

565565

566-
class Serializer(object): # pylint: disable=too-many-public-methods
566+
class Serializer: # pylint: disable=too-many-public-methods
567567
"""Request object model serializer."""
568568

569569
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
@@ -1441,7 +1441,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
14411441
return children[0]
14421442

14431443

1444-
class Deserializer(object):
1444+
class Deserializer:
14451445
"""Response object model deserializer.
14461446
14471447
:param dict classes: Class type dictionary for deserializing complex types.
@@ -1683,17 +1683,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
16831683
subtype = getattr(response, "_subtype_map", {})
16841684
try:
16851685
readonly = [
1686-
k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
1686+
k
1687+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1688+
if v.get("readonly")
16871689
]
16881690
const = [
1689-
k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
1691+
k
1692+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1693+
if v.get("constant")
16901694
]
16911695
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
16921696
response_obj = response(**kwargs)
16931697
for attr in readonly:
16941698
setattr(response_obj, attr, attrs.get(attr))
16951699
if additional_properties:
1696-
response_obj.additional_properties = additional_properties
1700+
response_obj.additional_properties = additional_properties # type: ignore
16971701
return response_obj
16981702
except TypeError as err:
16991703
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore

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 = "10.0.0b5"
9+
VERSION = "0.7.0"

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
AutoscaleSettings,
2828
AutoscaleSettingsResource,
2929
AzureBlobDataTransferDataSourceSink,
30+
AzureBlobStorageContainerEntity,
3031
BackupInformation,
3132
BackupPolicy,
3233
BackupPolicyMigrationState,
@@ -83,20 +84,26 @@
8384
ConflictResolutionPolicy,
8485
ConnectionError,
8586
ConsistencyPolicy,
87+
ContainerEntity,
8688
ContainerPartitionKey,
8789
ContinuousBackupInformation,
8890
ContinuousBackupRestoreLocation,
8991
ContinuousModeBackupPolicy,
9092
ContinuousModeProperties,
9193
CorsPolicy,
94+
CosmosCassandraContainerEntity,
9295
CosmosCassandraDataTransferDataSourceSink,
96+
CosmosMongoContainerEntity,
9397
CosmosMongoDataTransferDataSourceSink,
98+
CosmosMongoVCoreContainerEntity,
9499
CosmosMongoVCoreDataTransferDataSourceSink,
100+
CosmosSqlContainerEntity,
95101
CosmosSqlDataTransferDataSourceSink,
96102
CreateJobRequest,
97103
CreateUpdateOptions,
98104
DataCenterResource,
99105
DataCenterResourceProperties,
106+
DataTransferContainerDetails,
100107
DataTransferDataSourceSink,
101108
DataTransferJobFeedResults,
102109
DataTransferJobGetResults,
@@ -454,6 +461,7 @@
454461
"AutoscaleSettings",
455462
"AutoscaleSettingsResource",
456463
"AzureBlobDataTransferDataSourceSink",
464+
"AzureBlobStorageContainerEntity",
457465
"BackupInformation",
458466
"BackupPolicy",
459467
"BackupPolicyMigrationState",
@@ -510,20 +518,26 @@
510518
"ConflictResolutionPolicy",
511519
"ConnectionError",
512520
"ConsistencyPolicy",
521+
"ContainerEntity",
513522
"ContainerPartitionKey",
514523
"ContinuousBackupInformation",
515524
"ContinuousBackupRestoreLocation",
516525
"ContinuousModeBackupPolicy",
517526
"ContinuousModeProperties",
518527
"CorsPolicy",
528+
"CosmosCassandraContainerEntity",
519529
"CosmosCassandraDataTransferDataSourceSink",
530+
"CosmosMongoContainerEntity",
520531
"CosmosMongoDataTransferDataSourceSink",
532+
"CosmosMongoVCoreContainerEntity",
521533
"CosmosMongoVCoreDataTransferDataSourceSink",
534+
"CosmosSqlContainerEntity",
522535
"CosmosSqlDataTransferDataSourceSink",
523536
"CreateJobRequest",
524537
"CreateUpdateOptions",
525538
"DataCenterResource",
526539
"DataCenterResourceProperties",
540+
"DataTransferContainerDetails",
527541
"DataTransferDataSourceSink",
528542
"DataTransferJobFeedResults",
529543
"DataTransferJobGetResults",

0 commit comments

Comments
 (0)