Skip to content

Commit

Permalink
CodeGen from PR 3486 in test-repo-billy/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 49ce2bba0df1a6ccf9a197f59b180e5832eb339f into 2ad400fcd7d7055b38957f542ffbe1a72290023e
  • Loading branch information
SDKAuto committed Aug 19, 2024
1 parent 344e74f commit d3fd9a7
Show file tree
Hide file tree
Showing 131 changed files with 4,407 additions and 2,494 deletions.
24 changes: 12 additions & 12 deletions sdk/containerservice/azure-mgmt-containerservicefleet/_meta.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"commit": "a013dabbe84aeb3f5d48b0e30d15fdfbb6a8d062",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"commit": "18ba82173f314b4535738a756cdbc42a0d2dd5f8",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.13.7",
"@autorest/python@6.17.0",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/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/modelerfour@4.27.0 --version=3.9.7 --version-tolerant=False",
"autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/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.17.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md",
"package-2023-06-preview": "2024-04-17 10:47:28 +0800 c4e661cdf92c8f579574008d0cd11874cc303da0 preview/2023-06-15-preview/fleets.json",
"package-2023-03-preview": "2024-04-17 10:47:28 +0800 c4e661cdf92c8f579574008d0cd11874cc303da0 preview/2023-03-15-preview/fleets.json",
"package-2022-09-preview": "2024-04-03 11:54:30 -0700 aaf40b00d0d15db7d3252beeeac634da9dc09099 preview/2022-09-02-preview/fleets.json",
"package-2023-06-preview": "2024-08-19 15:54:51 +0800 49ce2bba0df1a6ccf9a197f59b180e5832eb339f preview/2023-06-15-preview/fleets.json",
"package-2023-03-preview": "2024-08-19 15:54:51 +0800 49ce2bba0df1a6ccf9a197f59b180e5832eb339f preview/2023-03-15-preview/fleets.json",
"package-2022-09-preview": "2024-08-19 15:54:51 +0800 49ce2bba0df1a6ccf9a197f59b180e5832eb339f preview/2022-09-02-preview/fleets.json",
"package-2022-07-preview": "2023-02-15 15:17:59 +0800 67527326606bd3c71700e2b96ff3c9ce9e655e29 preview/2022-07-02-preview/fleets.json",
"package-2022-06-preview": "2023-02-15 15:17:59 +0800 67527326606bd3c71700e2b96ff3c9ce9e655e29 preview/2022-06-02-preview/fleets.json",
"package-2023-08-preview": "2024-04-23 16:19:44 -0700 bce261b592674cd74a6603ea65b8561fb20ed154 preview/2023-08-15-preview/fleets.json",
"package-2023-10": "2024-04-23 16:19:44 -0700 bce261b592674cd74a6603ea65b8561fb20ed154 stable/2023-10-15/fleets.json",
"package-2024-02-preview": "2024-04-23 16:19:44 -0700 bce261b592674cd74a6603ea65b8561fb20ed154 preview/2024-02-02-preview/fleets.json",
"package-2024-04": "2024-04-23 16:19:44 -0700 bce261b592674cd74a6603ea65b8561fb20ed154 stable/2024-04-01/fleets.json"
"package-2023-08-preview": "2024-08-19 15:54:51 +0800 49ce2bba0df1a6ccf9a197f59b180e5832eb339f preview/2023-08-15-preview/fleets.json",
"package-2023-10": "2024-08-19 15:54:51 +0800 49ce2bba0df1a6ccf9a197f59b180e5832eb339f stable/2023-10-15/fleets.json",
"package-2024-02-preview": "2024-08-19 15:54:51 +0800 49ce2bba0df1a6ccf9a197f59b180e5832eb339f preview/2024-02-02-preview/fleets.json",
"package-2024-04": "2024-08-19 15:54:51 +0800 49ce2bba0df1a6ccf9a197f59b180e5832eb339f stable/2024-04-01/fleets.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# --------------------------------------------------------------------------

from typing import Any, Optional, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.mgmt.core import ARMPipelineClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def _json_attemp(data):
# context otherwise.
_LOGGER.critical("Wasn't XML not JSON, failing")
raise DeserializationError("XML is invalid") from err
elif content_type.startswith("text/"):
return data_as_str
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))

@classmethod
Expand Down Expand Up @@ -1447,7 +1449,7 @@ def _deserialize(self, target_obj, data):
elif isinstance(response, type) and issubclass(response, Enum):
return self.deserialize_enum(data, response)

if data is None:
if data is None or data is CoreNull:
return data
try:
attributes = response._attribute_map # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# --------------------------------------------------------------------------

from typing import Any, Optional, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.mgmt.core import AsyncARMPipelineClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse
Expand Down Expand Up @@ -117,7 +118,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "ContainerServiceFleetMgmtClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"azure_arm": true,
"has_public_lro_operations": true,
"client_side_validation": false,
"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\": [\"ContainerServiceFleetMgmtClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"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\": [\"ContainerServiceFleetMgmtClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
"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\": [\"ContainerServiceFleetMgmtClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"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\": [\"ContainerServiceFleetMgmtClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, Awaitable, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import AsyncHttpResponse, HttpRequest
Expand Down Expand Up @@ -120,7 +121,7 @@ def _send_request(
async def close(self) -> None:
await self._client.close()

async def __aenter__(self) -> "ContainerServiceFleetMgmtClient":
async def __aenter__(self) -> Self:
await self._client.__aenter__()
return self

Expand Down
Loading

0 comments on commit d3fd9a7

Please sign in to comment.