Skip to content

Commit 32fdb05

Browse files
azure-sdkmsyyc
andauthored
[AutoRelease] t2-edgezones-2024-07-05-79075(can only be merged by SDK owner) (#36372)
* code and test * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
1 parent 723bdfd commit 32fdb05

20 files changed

+444
-452
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Release History
22

3-
## 1.0.0b1 (2024-05-20)
3+
## 1.0.0b1 (2024-07-05)
4+
5+
### Other Changes
46

57
- Initial version
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"commit": "524eb346ef48d8235b26280ff51a3b08c5bec864",
2+
"commit": "ab064e0047ec560a700d6b501097d99471ad817b",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/edgezones/EdgeZones.Management",
5-
"@azure-tools/typespec-python": "0.23.10",
6-
"@autorest/python": "6.13.17"
5+
"@azure-tools/typespec-python": "0.25.0"
76
}

sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_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
@@ -32,7 +33,7 @@ class EdgeZonesMgmtClient: # pylint: disable=client-accepts-api-version-keyword
3233
:vartype extended_zones: azure.mgmt.edgezones.operations.ExtendedZonesOperations
3334
:param credential: Credential used to authenticate requests to the service. Required.
3435
:type credential: ~azure.core.credentials.TokenCredential
35-
:param subscription_id: The ID of the target subscription. Required.
36+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3637
:type subscription_id: str
3738
:param base_url: Service host. Default value is "https://management.azure.com".
3839
:type base_url: str
@@ -103,7 +104,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
103104
def close(self) -> None:
104105
self._client.close()
105106

106-
def __enter__(self) -> "EdgeZonesMgmtClient":
107+
def __enter__(self) -> Self:
107108
self._client.__enter__()
108109
return self
109110

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class EdgeZonesMgmtClientConfiguration: # pylint: disable=too-many-instance-att
2626
2727
:param credential: Credential used to authenticate requests to the service. 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
3131
:keyword api_version: The API version to use for this operation. Default value is
3232
"2024-04-01-preview". Note that overriding this default value may result in unsupported

sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_model_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,5 +883,6 @@ def rest_discriminator(
883883
*,
884884
name: typing.Optional[str] = None,
885885
type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin
886+
visibility: typing.Optional[typing.List[str]] = None,
886887
) -> typing.Any:
887-
return _RestField(name=name, type=type, is_discriminator=True)
888+
return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility)

sdk/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/_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/edgezones/azure-mgmt-edgezones/azure/mgmt/edgezones/aio/_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
@@ -32,7 +33,7 @@ class EdgeZonesMgmtClient: # pylint: disable=client-accepts-api-version-keyword
3233
:vartype extended_zones: azure.mgmt.edgezones.aio.operations.ExtendedZonesOperations
3334
:param credential: Credential used to authenticate requests to the service. Required.
3435
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
35-
:param subscription_id: The ID of the target subscription. Required.
36+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3637
:type subscription_id: str
3738
:param base_url: Service host. Default value is "https://management.azure.com".
3839
:type base_url: str
@@ -105,7 +106,7 @@ def send_request(
105106
async def close(self) -> None:
106107
await self._client.close()
107108

108-
async def __aenter__(self) -> "EdgeZonesMgmtClient":
109+
async def __aenter__(self) -> Self:
109110
await self._client.__aenter__()
110111
return self
111112

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class EdgeZonesMgmtClientConfiguration: # pylint: disable=too-many-instance-att
2626
2727
:param credential: Credential used to authenticate requests to the service. 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
3131
:keyword api_version: The API version to use for this operation. Default value is
3232
"2024-04-01-preview". Note that overriding this default value may result in unsupported

0 commit comments

Comments
 (0)