Skip to content

Commit 223d066

Browse files
author
SDKAuto
committed
CodeGen from PR 30824 in Azure/azure-rest-api-specs
Merge b2fdf5c0b14033037a6029f1b9701143ac199cdc into e605d439dda724fc2fc0274e0a82a3434a1524d7
1 parent d594ee8 commit 223d066

File tree

218 files changed

+8854
-2241
lines changed

Some content is hidden

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

218 files changed

+8854
-2241
lines changed

sdk/cdn/azure-mgmt-cdn/_meta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "de1f3772629b6f4d3ac01548a5f6d719bfb97c9e",
2+
"commit": "6b815c0cae3b7b3b42809a68a22b1d86511ecf7f",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.19",
6+
"@autorest/python@6.19.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/cdn/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.19 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/cdn/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/cdn/resource-manager/readme.md"
1111
}

sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py

Lines changed: 3 additions & 2 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
@@ -100,7 +101,7 @@ class CdnManagementClient(
100101
:type subscription_id: str
101102
:param base_url: Service URL. Default value is "https://management.azure.com".
102103
:type base_url: str
103-
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
104+
:keyword api_version: Api Version. Default value is "2024-09-01". Note that overriding this
104105
default value may result in unsupported behavior.
105106
:paramtype api_version: str
106107
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -196,7 +197,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
196197
def close(self) -> None:
197198
self._client.close()
198199

199-
def __enter__(self) -> "CdnManagementClient":
200+
def __enter__(self) -> Self:
200201
self._client.__enter__()
201202
return self
202203

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-att
2828
:type credential: ~azure.core.credentials.TokenCredential
2929
:param subscription_id: Azure Subscription ID. Required.
3030
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
31+
:keyword api_version: Api Version. Default value is "2024-09-01". Note that overriding this
3232
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", "2024-02-01")
37+
api_version: str = kwargs.pop("api_version", "2024-09-01")
3838

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

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

Lines changed: 2 additions & 0 deletions
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

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
from abc import ABC
99
from typing import TYPE_CHECKING
1010

11-
from azure.core.pipeline.transport import HttpRequest
12-
1311
from ._configuration import CdnManagementClientConfiguration
1412

1513
if TYPE_CHECKING:
@@ -19,14 +17,6 @@
1917
from ._serialization import Deserializer, Serializer
2018

2119

22-
def _convert_request(request, files=None):
23-
data = request.content if not files else None
24-
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
25-
if files:
26-
request.set_formdata_body(files)
27-
return request
28-
29-
3020
class CdnManagementClientMixinABC(ABC):
3121
"""DO NOT use this class. It is for internal typing use only."""
3222

sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_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 = "13.1.1"
9+
VERSION = "2.0.0"

sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_cdn_management_client.py

Lines changed: 3 additions & 2 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
@@ -100,7 +101,7 @@ class CdnManagementClient(
100101
:type subscription_id: str
101102
:param base_url: Service URL. Default value is "https://management.azure.com".
102103
:type base_url: str
103-
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
104+
:keyword api_version: Api Version. Default value is "2024-09-01". Note that overriding this
104105
default value may result in unsupported behavior.
105106
:paramtype api_version: str
106107
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -198,7 +199,7 @@ def _send_request(
198199
async def close(self) -> None:
199200
await self._client.close()
200201

201-
async def __aenter__(self) -> "CdnManagementClient":
202+
async def __aenter__(self) -> Self:
202203
await self._client.__aenter__()
203204
return self
204205

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ class CdnManagementClientConfiguration: # pylint: disable=too-many-instance-att
2828
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
2929
:param subscription_id: Azure Subscription ID. Required.
3030
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
31+
:keyword api_version: Api Version. Default value is "2024-09-01". Note that overriding this
3232
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", "2024-02-01")
37+
api_version: str = kwargs.pop("api_version", "2024-09-01")
3838

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

sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_vendor.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
from abc import ABC
99
from typing import TYPE_CHECKING
1010

11-
from azure.core.pipeline.transport import HttpRequest
12-
1311
from ._configuration import CdnManagementClientConfiguration
1412

1513
if TYPE_CHECKING:

0 commit comments

Comments
 (0)