Skip to content

Commit 2d36d7a

Browse files
author
SDKAuto
committed
CodeGen from PR 30514 in Azure/azure-rest-api-specs
Merge e53f13c066a3eb57bbe8c506cad2303f2fb7fe8f into 3906cab97616932be970c3292df68c966438628a
1 parent 62ddf8f commit 2d36d7a

File tree

56 files changed

+3102
-861
lines changed

Some content is hidden

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

56 files changed

+3102
-861
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "1f6e89637068d59b5ae935de9a88d5742d12f8e6",
2+
"commit": "ce183066e150dc49f27b52874facd569fcbb24ec",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.7",
6+
"@autorest/python@6.19.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/deviceregistry/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/python@6.13.7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/deviceregistry/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.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/deviceregistry/resource-manager/readme.md"
1111
}

sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_configuration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ class DeviceRegistryMgmtClientConfiguration: # pylint: disable=too-many-instanc
2626
2727
:param credential: Credential needed for the client to connect to Azure. Required.
2828
:type credential: ~azure.core.credentials.TokenCredential
29-
:param subscription_id: The ID of the target subscription. Required.
29+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3030
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2023-11-01-preview". Note that overriding
32-
this default value may result in unsupported behavior.
31+
:keyword api_version: Api Version. Default value is "2024-11-01". Note that overriding this
32+
default value may result in unsupported behavior.
3333
:paramtype api_version: str
3434
"""
3535

3636
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2023-11-01-preview")
37+
api_version: str = kwargs.pop("api_version", "2024-11-01")
3838

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

sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_device_registry_mgmt_client.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
@@ -17,7 +18,13 @@
1718
from . import models as _models
1819
from ._configuration import DeviceRegistryMgmtClientConfiguration
1920
from ._serialization import Deserializer, Serializer
20-
from .operations import AssetEndpointProfilesOperations, AssetsOperations, OperationStatusOperations, Operations
21+
from .operations import (
22+
AssetEndpointProfilesOperations,
23+
AssetsOperations,
24+
BillingContainersOperations,
25+
OperationStatusOperations,
26+
Operations,
27+
)
2128

2229
if TYPE_CHECKING:
2330
# pylint: disable=unused-import,ungrouped-imports
@@ -34,16 +41,18 @@ class DeviceRegistryMgmtClient: # pylint: disable=client-accepts-api-version-ke
3441
azure.mgmt.deviceregistry.operations.AssetEndpointProfilesOperations
3542
:ivar assets: AssetsOperations operations
3643
:vartype assets: azure.mgmt.deviceregistry.operations.AssetsOperations
44+
:ivar billing_containers: BillingContainersOperations operations
45+
:vartype billing_containers: azure.mgmt.deviceregistry.operations.BillingContainersOperations
3746
:ivar operation_status: OperationStatusOperations operations
3847
:vartype operation_status: azure.mgmt.deviceregistry.operations.OperationStatusOperations
3948
:param credential: Credential needed for the client to connect to Azure. Required.
4049
:type credential: ~azure.core.credentials.TokenCredential
41-
:param subscription_id: The ID of the target subscription. Required.
50+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
4251
:type subscription_id: str
4352
:param base_url: Service URL. Default value is "https://management.azure.com".
4453
:type base_url: str
45-
:keyword api_version: Api Version. Default value is "2023-11-01-preview". Note that overriding
46-
this default value may result in unsupported behavior.
54+
:keyword api_version: Api Version. Default value is "2024-11-01". Note that overriding this
55+
default value may result in unsupported behavior.
4756
:paramtype api_version: str
4857
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4958
Retry-After header is present.
@@ -88,6 +97,9 @@ def __init__(
8897
self._client, self._config, self._serialize, self._deserialize
8998
)
9099
self.assets = AssetsOperations(self._client, self._config, self._serialize, self._deserialize)
100+
self.billing_containers = BillingContainersOperations(
101+
self._client, self._config, self._serialize, self._deserialize
102+
)
91103
self.operation_status = OperationStatusOperations(
92104
self._client, self._config, self._serialize, self._deserialize
93105
)
@@ -117,7 +129,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
117129
def close(self) -> None:
118130
self._client.close()
119131

120-
def __enter__(self) -> "DeviceRegistryMgmtClient":
132+
def __enter__(self) -> Self:
121133
self._client.__enter__()
122134
return self
123135

sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_serialization.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ def _json_attemp(data):
144144
# context otherwise.
145145
_LOGGER.critical("Wasn't XML not JSON, failing")
146146
raise DeserializationError("XML is invalid") from err
147+
elif content_type.startswith("text/"):
148+
return data_as_str
147149
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))
148150

149151
@classmethod
@@ -1441,7 +1443,7 @@ def _deserialize(self, target_obj, data):
14411443
elif isinstance(response, type) and issubclass(response, Enum):
14421444
return self.deserialize_enum(data, response)
14431445

1444-
if data is None:
1446+
if data is None or data is CoreNull:
14451447
return data
14461448
try:
14471449
attributes = response._attribute_map # type: ignore

sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_vendor.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/_configuration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ class DeviceRegistryMgmtClientConfiguration: # pylint: disable=too-many-instanc
2626
2727
:param credential: Credential needed for the client to connect to Azure. Required.
2828
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
29-
:param subscription_id: The ID of the target subscription. Required.
29+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3030
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2023-11-01-preview". Note that overriding
32-
this default value may result in unsupported behavior.
31+
:keyword api_version: Api Version. Default value is "2024-11-01". Note that overriding this
32+
default value may result in unsupported behavior.
3333
:paramtype api_version: str
3434
"""
3535

3636
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2023-11-01-preview")
37+
api_version: str = kwargs.pop("api_version", "2024-11-01")
3838

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

sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/_device_registry_mgmt_client.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from copy import deepcopy
1010
from typing import Any, Awaitable, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import AsyncHttpResponse, HttpRequest
@@ -17,7 +18,13 @@
1718
from .. import models as _models
1819
from .._serialization import Deserializer, Serializer
1920
from ._configuration import DeviceRegistryMgmtClientConfiguration
20-
from .operations import AssetEndpointProfilesOperations, AssetsOperations, OperationStatusOperations, Operations
21+
from .operations import (
22+
AssetEndpointProfilesOperations,
23+
AssetsOperations,
24+
BillingContainersOperations,
25+
OperationStatusOperations,
26+
Operations,
27+
)
2128

2229
if TYPE_CHECKING:
2330
# pylint: disable=unused-import,ungrouped-imports
@@ -34,16 +41,19 @@ class DeviceRegistryMgmtClient: # pylint: disable=client-accepts-api-version-ke
3441
azure.mgmt.deviceregistry.aio.operations.AssetEndpointProfilesOperations
3542
:ivar assets: AssetsOperations operations
3643
:vartype assets: azure.mgmt.deviceregistry.aio.operations.AssetsOperations
44+
:ivar billing_containers: BillingContainersOperations operations
45+
:vartype billing_containers:
46+
azure.mgmt.deviceregistry.aio.operations.BillingContainersOperations
3747
:ivar operation_status: OperationStatusOperations operations
3848
:vartype operation_status: azure.mgmt.deviceregistry.aio.operations.OperationStatusOperations
3949
:param credential: Credential needed for the client to connect to Azure. Required.
4050
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
41-
:param subscription_id: The ID of the target subscription. Required.
51+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
4252
:type subscription_id: str
4353
:param base_url: Service URL. Default value is "https://management.azure.com".
4454
:type base_url: str
45-
:keyword api_version: Api Version. Default value is "2023-11-01-preview". Note that overriding
46-
this default value may result in unsupported behavior.
55+
:keyword api_version: Api Version. Default value is "2024-11-01". Note that overriding this
56+
default value may result in unsupported behavior.
4757
:paramtype api_version: str
4858
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4959
Retry-After header is present.
@@ -88,6 +98,9 @@ def __init__(
8898
self._client, self._config, self._serialize, self._deserialize
8999
)
90100
self.assets = AssetsOperations(self._client, self._config, self._serialize, self._deserialize)
101+
self.billing_containers = BillingContainersOperations(
102+
self._client, self._config, self._serialize, self._deserialize
103+
)
91104
self.operation_status = OperationStatusOperations(
92105
self._client, self._config, self._serialize, self._deserialize
93106
)
@@ -119,7 +132,7 @@ def _send_request(
119132
async def close(self) -> None:
120133
await self._client.close()
121134

122-
async def __aenter__(self) -> "DeviceRegistryMgmtClient":
135+
async def __aenter__(self) -> Self:
123136
await self._client.__aenter__()
124137
return self
125138

sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from ._operations import Operations
1010
from ._asset_endpoint_profiles_operations import AssetEndpointProfilesOperations
1111
from ._assets_operations import AssetsOperations
12+
from ._billing_containers_operations import BillingContainersOperations
1213
from ._operation_status_operations import OperationStatusOperations
1314

1415
from ._patch import __all__ as _patch_all
@@ -19,6 +20,7 @@
1920
"Operations",
2021
"AssetEndpointProfilesOperations",
2122
"AssetsOperations",
23+
"BillingContainersOperations",
2224
"OperationStatusOperations",
2325
]
2426
__all__.extend([p for p in _patch_all if p not in __all__])

0 commit comments

Comments
 (0)