Skip to content

Commit 68a7de3

Browse files
author
SDKAuto
committed
CodeGen from PR 3515 in test-repo-billy/azure-rest-api-specs
Merge 7d6d5ba7267d56ebb1ec40734557f77e51d4c4a7 into 8df52d62be2e13ba064fd9c0c7874dd6751c8f4f
1 parent b2b0c35 commit 68a7de3

File tree

1,244 files changed

+110367
-7041
lines changed

Some content is hidden

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

1,244 files changed

+110367
-7041
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "44d7a32482656b3a79a2fa11ac27c981f8e0e3cd",
3-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
2+
"commit": "18ead08aadc1b2076249491430ebfe8dc627c090",
3+
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
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/apimanagement/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 --tag=package-2022-08 --use=@autorest/python@6.13.7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/apimanagement/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/apimanagement/resource-manager/readme.md"
1111
}

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py

Lines changed: 311 additions & 12 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ class ApiManagementClientConfiguration: # pylint: disable=too-many-instance-att
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 "2022-08-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", "2022-08-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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#
2626
# --------------------------------------------------------------------------
2727

28+
2829
# This file is used for handwritten extensions to the generated code. Example:
2930
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3031
def patch_sdk():

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_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 ApiManagementClientConfiguration
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 ApiManagementClientMixinABC(ABC):
3121
"""DO NOT use this class. It is for internal typing use only."""
3222

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_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 = "4.0.1"
9+
VERSION = "1.0.0b1"

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py

Lines changed: 317 additions & 12 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ class ApiManagementClientConfiguration: # pylint: disable=too-many-instance-att
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 "2022-08-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", "2022-08-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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#
2626
# --------------------------------------------------------------------------
2727

28+
2829
# This file is used for handwritten extensions to the generated code. Example:
2930
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3031
def patch_sdk():

0 commit comments

Comments
 (0)