Skip to content

Commit 27399f6

Browse files
author
SDKAuto
committed
CodeGen from PR 30740 in Azure/azure-rest-api-specs
Merge 1f9d11ddf5bd01850ae6135c55f6325e914de54a into 39cc29c14aa67059b22e1fca64eafa53c9c3a593
1 parent 66d1575 commit 27399f6

File tree

662 files changed

+41116
-13484
lines changed

Some content is hidden

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

662 files changed

+41116
-13484
lines changed

sdk/resources/azure-mgmt-resource/_meta.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"commit": "0f21c214f0f5b4180ec71655b36b8fbd40fd1ceb",
2+
"commit": "37ea2dcf8dd1eaf4127031267826639f9f08fe7c",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.16",
6+
"@autorest/python@6.19.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/resources/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.16 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/resources/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/resources/resource-manager/readme.md",
1111
"package-privatelinks-2020-05": "2022-03-18 16:14:07 -0700 2c68b6f0c9566d97d9d590a31b0d46997622eef7 Microsoft.Authorization/stable/2020-05-01/privateLinks.json",
1212
"package-features-2021-07": "2022-03-06 17:36:42 -0800 6a57e9cedc87cafd2dc9e4f3e8af62b5725e3d22 Microsoft.Features/stable/2021-07-01/features.json",
@@ -61,5 +61,7 @@
6161
"package-templatespecs-2019-06-preview": "2020-10-19 17:06:28 -0700 86d04dae5f34cbe19217e546cbc14d67664c7124 Microsoft.Resources/preview/2019-06-01-preview/templateSpecs.json",
6262
"package-deploymentstacks-2024-03": "2024-05-02 13:16:57 -0400 88cc082d66e2b481ed99a17d44edffaeb6254eec Microsoft.Resources/stable/2024-03-01/deploymentStacks.json",
6363
"package-deploymentstacks-2022-08-preview": "2024-05-02 13:16:57 -0400 88cc082d66e2b481ed99a17d44edffaeb6254eec Microsoft.Resources/preview/2022-08-01-preview/deploymentStacks.json",
64-
"package-changes-2022-05": "2022-04-24 21:43:30 -0700 91b36e26db23dffc149d968333c29f9a2f131702 Microsoft.Resources/stable/2022-05-01/changes.json"
64+
"package-changes-2022-05": "2022-04-24 21:43:30 -0700 91b36e26db23dffc149d968333c29f9a2f131702 Microsoft.Resources/stable/2022-05-01/changes.json",
65+
"package-policy-2023-04-only": "2024-06-12 20:54:26 -0700 412364b282e52b50eadc3cd88d56d283b6c8712a Microsoft.Authorization/stable/2023-04-01/policySetDefinitions.json",
66+
"package-databoundaries-2024-08": "2024-08-22 09:22:07 -0700 a6074b7654c388dec49c9969d0136cfeb03575c9 Microsoft.Resources/stable/2024-08-01/dataBoundaries.json"
6567
}

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_changes_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# --------------------------------------------------------------------------
1111

1212
from typing import Any, Optional, TYPE_CHECKING
13+
from typing_extensions import Self
1314

1415
from azure.core.pipeline import policies
1516
from azure.mgmt.core import ARMPipelineClient

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_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
@@ -1447,7 +1449,7 @@ def _deserialize(self, target_obj, data):
14471449
elif isinstance(response, type) and issubclass(response, Enum):
14481450
return self.deserialize_enum(data, response)
14491451

1450-
if data is None:
1452+
if data is None or data is CoreNull:
14511453
return data
14521454
try:
14531455
attributes = response._attribute_map # type: ignore

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/aio/_changes_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# --------------------------------------------------------------------------
1111

1212
from typing import Any, Optional, TYPE_CHECKING
13+
from typing_extensions import Self
1314

1415
from azure.core.pipeline import policies
1516
from azure.mgmt.core import AsyncARMPipelineClient

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_changes_client.py

Lines changed: 2 additions & 1 deletion
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
@@ -100,7 +101,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
100101
def close(self) -> None:
101102
self._client.close()
102103

103-
def __enter__(self) -> "ChangesClient":
104+
def __enter__(self) -> Self:
104105
self._client.__enter__()
105106
return self
106107

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"azure_arm": true,
1111
"has_public_lro_operations": false,
1212
"client_side_validation": false,
13-
"sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ChangesClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
14-
"async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ChangesClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
13+
"sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ChangesClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
14+
"async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ChangesClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_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 = "23.1.1"
9+
VERSION = "1.0.0b1"

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/_changes_client.py

Lines changed: 2 additions & 1 deletion
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
@@ -102,7 +103,7 @@ def _send_request(
102103
async def close(self) -> None:
103104
await self._client.close()
104105

105-
async def __aenter__(self) -> "ChangesClient":
106+
async def __aenter__(self) -> Self:
106107
await self._client.__aenter__()
107108
return self
108109

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/operations/_operations.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@
2020
map_error,
2121
)
2222
from azure.core.pipeline import PipelineResponse
23-
from azure.core.pipeline.transport import AsyncHttpResponse
24-
from azure.core.rest import HttpRequest
23+
from azure.core.rest import AsyncHttpResponse, HttpRequest
2524
from azure.core.tracing.decorator import distributed_trace
2625
from azure.core.tracing.decorator_async import distributed_trace_async
2726
from azure.core.utils import case_insensitive_dict
2827
from azure.mgmt.core.exceptions import ARMErrorFormat
2928

3029
from ... import models as _models
31-
from ..._vendor import _convert_request
3230
from ...operations._operations import build_changes_get_request, build_changes_list_request
3331

3432
if sys.version_info >= (3, 9):
@@ -119,7 +117,6 @@ def prepare_request(next_link=None):
119117
headers=_headers,
120118
params=_params,
121119
)
122-
_request = _convert_request(_request)
123120
_request.url = self._client.format_url(_request.url)
124121

125122
else:
@@ -135,7 +132,6 @@ def prepare_request(next_link=None):
135132
_request = HttpRequest(
136133
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
137134
)
138-
_request = _convert_request(_request)
139135
_request.url = self._client.format_url(_request.url)
140136
_request.method = "GET"
141137
return _request
@@ -216,7 +212,6 @@ async def get(
216212
headers=_headers,
217213
params=_params,
218214
)
219-
_request = _convert_request(_request)
220215
_request.url = self._client.format_url(_request.url)
221216

222217
_stream = False
@@ -231,7 +226,7 @@ async def get(
231226
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
232227
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
233228

234-
deserialized = self._deserialize("ChangeResourceResult", pipeline_response)
229+
deserialized = self._deserialize("ChangeResourceResult", pipeline_response.http_response)
235230

236231
if cls:
237232
return cls(pipeline_response, deserialized, {}) # type: ignore

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/operations/_operations.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@
2020
)
2121
from azure.core.paging import ItemPaged
2222
from azure.core.pipeline import PipelineResponse
23-
from azure.core.pipeline.transport import HttpResponse
24-
from azure.core.rest import HttpRequest
23+
from azure.core.rest import HttpRequest, HttpResponse
2524
from azure.core.tracing.decorator import distributed_trace
2625
from azure.core.utils import case_insensitive_dict
2726
from azure.mgmt.core.exceptions import ARMErrorFormat
2827

2928
from .. import models as _models
3029
from ..._serialization import Serializer
31-
from .._vendor import _convert_request
3230

3331
if sys.version_info >= (3, 9):
3432
from collections.abc import MutableMapping
@@ -206,7 +204,6 @@ def prepare_request(next_link=None):
206204
headers=_headers,
207205
params=_params,
208206
)
209-
_request = _convert_request(_request)
210207
_request.url = self._client.format_url(_request.url)
211208

212209
else:
@@ -222,7 +219,6 @@ def prepare_request(next_link=None):
222219
_request = HttpRequest(
223220
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
224221
)
225-
_request = _convert_request(_request)
226222
_request.url = self._client.format_url(_request.url)
227223
_request.method = "GET"
228224
return _request
@@ -303,7 +299,6 @@ def get(
303299
headers=_headers,
304300
params=_params,
305301
)
306-
_request = _convert_request(_request)
307302
_request.url = self._client.format_url(_request.url)
308303

309304
_stream = False
@@ -318,7 +313,7 @@ def get(
318313
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
319314
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
320315

321-
deserialized = self._deserialize("ChangeResourceResult", pipeline_response)
316+
deserialized = self._deserialize("ChangeResourceResult", pipeline_response.http_response)
322317

323318
if cls:
324319
return cls(pipeline_response, deserialized, {}) # type: ignore

0 commit comments

Comments
 (0)