Skip to content

Commit f173fc2

Browse files
author
SDKAuto
committed
CodeGen from PR 33281 in Azure/azure-rest-api-specs
Merge c15fb8037ade459e2d8d8bb0a85d694944d603f6 into e673dda54e4d3be70af0f3251dbbcbb25564cf38
1 parent 1541021 commit f173fc2

File tree

5 files changed

+29
-27
lines changed

5 files changed

+29
-27
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": "2343b1ef6b94debd74b13dd01bd63a58fb43af24",
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/_models_py3.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2901,9 +2901,9 @@ class ClusterResourceProperties(_serialization.Model):
29012901
:ivar delegated_management_subnet_id: Resource id of a subnet that this cluster's management
29022902
service should have its network interface attached to. The subnet must be routable to all
29032903
subnets that will be delegated to data centers. The resource id must be of the form
2904-
'/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource
2905-
group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual
2906-
network>`/subnets/:code:`<subnet>`'.
2904+
'/subscriptions/\\ :code:`<subscription id>`/resourceGroups/\\ :code:`<resource
2905+
group>`/providers/Microsoft.Network/virtualNetworks/\\ :code:`<virtual network>`/subnets/\\
2906+
:code:`<subnet>`'.
29072907
:vartype delegated_management_subnet_id: str
29082908
:ivar cassandra_version: Which version of Cassandra should this cluster converge to running
29092909
(e.g., 3.11). When updated, the cluster may take some time to migrate to the new version.
@@ -3055,9 +3055,9 @@ def __init__( # pylint: disable=too-many-locals
30553055
:keyword delegated_management_subnet_id: Resource id of a subnet that this cluster's management
30563056
service should have its network interface attached to. The subnet must be routable to all
30573057
subnets that will be delegated to data centers. The resource id must be of the form
3058-
'/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource
3059-
group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual
3060-
network>`/subnets/:code:`<subnet>`'.
3058+
'/subscriptions/\\ :code:`<subscription id>`/resourceGroups/\\ :code:`<resource
3059+
group>`/providers/Microsoft.Network/virtualNetworks/\\ :code:`<virtual network>`/subnets/\\
3060+
:code:`<subnet>`'.
30613061
:paramtype delegated_management_subnet_id: str
30623062
:keyword cassandra_version: Which version of Cassandra should this cluster converge to running
30633063
(e.g., 3.11). When updated, the cluster may take some time to migrate to the new version.
@@ -5678,10 +5678,10 @@ class DataCenterResourceProperties(_serialization.Model):
56785678
:ivar delegated_subnet_id: Resource id of a subnet the nodes in this data center should have
56795679
their network interfaces connected to. The subnet must be in the same region specified in
56805680
'dataCenterLocation' and must be able to route to the subnet specified in the cluster's
5681-
'delegatedManagementSubnetId' property. This resource id will be of the form
5682-
'/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource
5683-
group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual
5684-
network>`/subnets/:code:`<subnet>`'.
5681+
'delegatedManagementSubnetId' property. This resource id will be of the form '/subscriptions/\\
5682+
:code:`<subscription id>`/resourceGroups/\\ :code:`<resource
5683+
group>`/providers/Microsoft.Network/virtualNetworks/\\ :code:`<virtual network>`/subnets/\\
5684+
:code:`<subnet>`'.
56855685
:vartype delegated_subnet_id: str
56865686
:ivar node_count: The number of nodes the data center should have. This is the desired number.
56875687
After it is set, it may take some time for the data center to be scaled to match. To monitor
@@ -5779,10 +5779,10 @@ def __init__(
57795779
:keyword delegated_subnet_id: Resource id of a subnet the nodes in this data center should have
57805780
their network interfaces connected to. The subnet must be in the same region specified in
57815781
'dataCenterLocation' and must be able to route to the subnet specified in the cluster's
5782-
'delegatedManagementSubnetId' property. This resource id will be of the form
5783-
'/subscriptions/:code:`<subscription id>`/resourceGroups/:code:`<resource
5784-
group>`/providers/Microsoft.Network/virtualNetworks/:code:`<virtual
5785-
network>`/subnets/:code:`<subnet>`'.
5782+
'delegatedManagementSubnetId' property. This resource id will be of the form '/subscriptions/\\
5783+
:code:`<subscription id>`/resourceGroups/\\ :code:`<resource
5784+
group>`/providers/Microsoft.Network/virtualNetworks/\\ :code:`<virtual network>`/subnets/\\
5785+
:code:`<subnet>`'.
57865786
:paramtype delegated_subnet_id: str
57875787
:keyword node_count: The number of nodes the data center should have. This is the desired
57885788
number. After it is set, it may take some time for the data center to be scaled to match. To

sdk/cosmos/azure-mgmt-cosmosdb/generated_samples/throughput_pool/cosmos_db_throughput_pool_list.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ def main():
3030
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
3131
)
3232

33-
response = client.throughput_pools.list_by_resource_group(
34-
resource_group_name="rgName",
35-
)
33+
response = client.throughput_pools.list()
3634
for item in response:
3735
print(item)
3836

0 commit comments

Comments
 (0)