Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoRelease] t2-cdn-2024-06-12-45722(can only be merged by SDK owner) #36050

Merged
merged 3 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sdk/cdn/azure-mgmt-cdn/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 13.1.1 (2024-06-12)

### Bugs Fixed

- Fix serialization error when setting model property with `azure.core.serialization.NULL`

## 13.1.0 (2024-04-15)

### Features Added
Expand Down
8 changes: 4 additions & 4 deletions sdk/cdn/azure-mgmt-cdn/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "926540515b9d8059904f023d38c45dda8ba87c9f",
"commit": "de1f3772629b6f4d3ac01548a5f6d719bfb97c9e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.13.7",
"@autorest/python@6.13.19",
"@autorest/modelerfour@4.27.0"
],
"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.7 --use=@autorest/modelerfour@4.27.0 --version=3.9.7 --version-tolerant=False",
"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/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/cdn/resource-manager/readme.md"
}
1 change: 1 addition & 0 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#
# --------------------------------------------------------------------------


# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
Expand Down
2 changes: 1 addition & 1 deletion sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,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
2 changes: 1 addition & 1 deletion sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_version.py
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 = "13.1.0"
VERSION = "13.1.1"
1 change: 1 addition & 0 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#
# --------------------------------------------------------------------------


# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import sys
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand Down Expand Up @@ -41,6 +42,10 @@
)
from .._vendor import CdnManagementClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -85,7 +90,7 @@ def list_by_profile(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AFDDomainListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -169,7 +174,7 @@ async def get(
:rtype: ~azure.mgmt.cdn.models.AFDDomain
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -222,7 +227,7 @@ async def _create_initial(
custom_domain: Union[_models.AFDDomain, IO[bytes]],
**kwargs: Any
) -> _models.AFDDomain:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -438,7 +443,7 @@ async def _update_initial(
custom_domain_update_properties: Union[_models.AFDDomainUpdateParameters, IO[bytes]],
**kwargs: Any
) -> _models.AFDDomain:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -647,7 +652,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any
) -> None:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -757,7 +762,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
async def _refresh_validation_token_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, profile_name: str, custom_domain_name: str, **kwargs: Any
) -> None:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import sys
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand Down Expand Up @@ -43,6 +44,10 @@
)
from .._vendor import CdnManagementClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -87,7 +92,7 @@ def list_by_profile(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AFDEndpointListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -171,7 +176,7 @@ async def get(
:rtype: ~azure.mgmt.cdn.models.AFDEndpoint
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -224,7 +229,7 @@ async def _create_initial(
endpoint: Union[_models.AFDEndpoint, IO[bytes]],
**kwargs: Any
) -> _models.AFDEndpoint:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -443,7 +448,7 @@ async def _update_initial(
endpoint_update_properties: Union[_models.AFDEndpointUpdateParameters, IO[bytes]],
**kwargs: Any
) -> _models.AFDEndpoint:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -661,7 +666,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, profile_name: str, endpoint_name: str, **kwargs: Any
) -> None:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -776,7 +781,7 @@ async def _purge_content_initial( # pylint: disable=inconsistent-return-stateme
contents: Union[_models.AfdPurgeParameters, IO[bytes]],
**kwargs: Any
) -> None:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -999,7 +1004,7 @@ def list_resource_usage(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1156,7 +1161,7 @@ async def validate_custom_domain(
:rtype: ~azure.mgmt.cdn.models.ValidateCustomDomainOutput
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import sys
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand Down Expand Up @@ -41,6 +42,10 @@
)
from .._vendor import CdnManagementClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -85,7 +90,7 @@ def list_by_profile(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AFDOriginGroupListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -168,7 +173,7 @@ async def get(
:rtype: ~azure.mgmt.cdn.models.AFDOriginGroup
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -221,7 +226,7 @@ async def _create_initial(
origin_group: Union[_models.AFDOriginGroup, IO[bytes]],
**kwargs: Any
) -> _models.AFDOriginGroup:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -437,7 +442,7 @@ async def _update_initial(
origin_group_update_properties: Union[_models.AFDOriginGroupUpdateParameters, IO[bytes]],
**kwargs: Any
) -> _models.AFDOriginGroup:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -646,7 +651,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, profile_name: str, origin_group_name: str, **kwargs: Any
) -> None:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -776,7 +781,7 @@ def list_resource_usage(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.UsagesListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import sys
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand Down Expand Up @@ -40,6 +41,10 @@
)
from .._vendor import CdnManagementClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -87,7 +92,7 @@ def list_by_origin_group(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AFDOriginListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -173,7 +178,7 @@ async def get(
:rtype: ~azure.mgmt.cdn.models.AFDOrigin
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -228,7 +233,7 @@ async def _create_initial(
origin: Union[_models.AFDOrigin, IO[bytes]],
**kwargs: Any
) -> _models.AFDOrigin:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -455,7 +460,7 @@ async def _update_initial(
origin_update_properties: Union[_models.AFDOriginUpdateParameters, IO[bytes]],
**kwargs: Any
) -> _models.AFDOrigin:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -674,7 +679,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, profile_name: str, origin_group_name: str, origin_name: str, **kwargs: Any
) -> None:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
Loading