Skip to content

Commit 554bc51

Browse files
author
SDKAuto
committed
CodeGen from PR 3576 in test-repo-billy/azure-rest-api-specs
Merge 562fb1af0d7f7c98dbf1aaf024f56821896ef70c into a2547b3666a6b6cf0c7c7515c988daeb343d937e
1 parent 24da367 commit 554bc51

39 files changed

+1240
-4722
lines changed

sdk/appservice/azure-mgmt-web/_meta.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"commit": "ff7b8e12e78b352561e2e470dd045be310a313fa",
3-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
2+
"commit": "2bd40179c2fa02f6b6b274f85125dde82657e874",
3+
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.26.4",
6+
"@autorest/python@6.27.4",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/web/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/azure-sdk-for-python/sdk --use=@autorest/python@6.26.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/web/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.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/web/resource-manager/readme.md",
1111
"package-2023-01": "fatal: invalid object name 'from'. from: WebApps.json",
1212
"package-2022-09": "fatal: invalid object name 'from'. from: WebApps.json",

sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py

Lines changed: 1 addition & 263 deletions
Large diffs are not rendered by default.

sdk/appservice/azure-mgmt-web/azure/mgmt/web/_serialization.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def _create_xml_node(tag, prefix=None, ns=None):
309309
return ET.Element(tag)
310310

311311

312-
class Model(object):
312+
class Model:
313313
"""Mixin for all client request body/response body models to support
314314
serialization and deserialization.
315315
"""
@@ -562,7 +562,7 @@ def _decode_attribute_map_key(key):
562562
return key.replace("\\.", ".")
563563

564564

565-
class Serializer(object): # pylint: disable=too-many-public-methods
565+
class Serializer: # pylint: disable=too-many-public-methods
566566
"""Request object model serializer."""
567567

568568
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
@@ -1440,7 +1440,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
14401440
return children[0]
14411441

14421442

1443-
class Deserializer(object):
1443+
class Deserializer:
14441444
"""Response object model deserializer.
14451445
14461446
:param dict classes: Class type dictionary for deserializing complex types.
@@ -1682,17 +1682,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
16821682
subtype = getattr(response, "_subtype_map", {})
16831683
try:
16841684
readonly = [
1685-
k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
1685+
k
1686+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1687+
if v.get("readonly")
16861688
]
16871689
const = [
1688-
k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
1690+
k
1691+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1692+
if v.get("constant")
16891693
]
16901694
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
16911695
response_obj = response(**kwargs)
16921696
for attr in readonly:
16931697
setattr(response_obj, attr, attrs.get(attr))
16941698
if additional_properties:
1695-
response_obj.additional_properties = additional_properties
1699+
response_obj.additional_properties = additional_properties # type: ignore
16961700
return response_obj
16971701
except TypeError as err:
16981702
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore

sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py

Lines changed: 16 additions & 539 deletions
Large diffs are not rendered by default.

sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_operations_mixin.py

Lines changed: 1 addition & 263 deletions
Large diffs are not rendered by default.

sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_web_site_management_client.py

Lines changed: 16 additions & 539 deletions
Large diffs are not rendered by default.

sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_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 = "0.0.0"
9+
VERSION = "0.42.0"

sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_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 = "0.0.0"
9+
VERSION = "0.42.0"

sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/_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 = "0.0.0"
9+
VERSION = "0.42.0"

sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2022_09_01/aio/operations/_app_service_plans_operations.py

Lines changed: 13 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,7 @@
88
# --------------------------------------------------------------------------
99
from io import IOBase
1010
import sys
11-
from typing import (
12-
Any,
13-
AsyncIterable,
14-
AsyncIterator,
15-
Callable,
16-
Dict,
17-
IO,
18-
List,
19-
Optional,
20-
Type,
21-
TypeVar,
22-
Union,
23-
cast,
24-
overload,
25-
)
11+
from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload
2612
import urllib.parse
2713

2814
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -287,12 +273,9 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode
287273
"""
288274
error_map: MutableMapping = {
289275
401: ClientAuthenticationError,
276+
404: ResourceNotFoundError,
290277
409: ResourceExistsError,
291278
304: ResourceNotModifiedError,
292-
404: cast(
293-
Type[HttpResponseError],
294-
lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
295-
),
296279
}
297280
error_map.update(kwargs.pop("error_map", {}) or {})
298281

@@ -320,7 +303,7 @@ async def get(self, resource_group_name: str, name: str, **kwargs: Any) -> _mode
320303
response = pipeline_response.http_response
321304

322305
if response.status_code not in [200]:
323-
map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
306+
map_error(status_code=response.status_code, response=response, error_map=error_map)
324307
error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
325308
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
326309

@@ -1589,12 +1572,9 @@ async def get_vnet_from_server_farm(
15891572
"""
15901573
error_map: MutableMapping = {
15911574
401: ClientAuthenticationError,
1575+
404: ResourceNotFoundError,
15921576
409: ResourceExistsError,
15931577
304: ResourceNotModifiedError,
1594-
404: cast(
1595-
Type[HttpResponseError],
1596-
lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
1597-
),
15981578
}
15991579
error_map.update(kwargs.pop("error_map", {}) or {})
16001580

@@ -1623,7 +1603,7 @@ async def get_vnet_from_server_farm(
16231603
response = pipeline_response.http_response
16241604

16251605
if response.status_code not in [200]:
1626-
map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
1606+
map_error(status_code=response.status_code, response=response, error_map=error_map)
16271607
error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
16281608
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
16291609

@@ -1938,12 +1918,9 @@ async def get_route_for_vnet(
19381918
"""
19391919
error_map: MutableMapping = {
19401920
401: ClientAuthenticationError,
1921+
404: ResourceNotFoundError,
19411922
409: ResourceExistsError,
19421923
304: ResourceNotModifiedError,
1943-
404: cast(
1944-
Type[HttpResponseError],
1945-
lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
1946-
),
19471924
}
19481925
error_map.update(kwargs.pop("error_map", {}) or {})
19491926

@@ -1973,7 +1950,7 @@ async def get_route_for_vnet(
19731950
response = pipeline_response.http_response
19741951

19751952
if response.status_code not in [200]:
1976-
map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
1953+
map_error(status_code=response.status_code, response=response, error_map=error_map)
19771954
error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
19781955
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
19791956

@@ -2083,16 +2060,9 @@ async def create_or_update_vnet_route(
20832060
"""
20842061
error_map: MutableMapping = {
20852062
401: ClientAuthenticationError,
2063+
404: ResourceNotFoundError,
20862064
409: ResourceExistsError,
20872065
304: ResourceNotModifiedError,
2088-
400: cast(
2089-
Type[HttpResponseError],
2090-
lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat),
2091-
),
2092-
404: cast(
2093-
Type[HttpResponseError],
2094-
lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
2095-
),
20962066
}
20972067
error_map.update(kwargs.pop("error_map", {}) or {})
20982068

@@ -2134,7 +2104,7 @@ async def create_or_update_vnet_route(
21342104
response = pipeline_response.http_response
21352105

21362106
if response.status_code not in [200]:
2137-
map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
2107+
map_error(status_code=response.status_code, response=response, error_map=error_map)
21382108
error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
21392109
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
21402110

@@ -2167,12 +2137,9 @@ async def delete_vnet_route(
21672137
"""
21682138
error_map: MutableMapping = {
21692139
401: ClientAuthenticationError,
2140+
404: ResourceNotFoundError,
21702141
409: ResourceExistsError,
21712142
304: ResourceNotModifiedError,
2172-
404: cast(
2173-
Type[HttpResponseError],
2174-
lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
2175-
),
21762143
}
21772144
error_map.update(kwargs.pop("error_map", {}) or {})
21782145

@@ -2202,7 +2169,7 @@ async def delete_vnet_route(
22022169
response = pipeline_response.http_response
22032170

22042171
if response.status_code not in [200]:
2205-
map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
2172+
map_error(status_code=response.status_code, response=response, error_map=error_map)
22062173
error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
22072174
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
22082175

@@ -2308,16 +2275,9 @@ async def update_vnet_route(
23082275
"""
23092276
error_map: MutableMapping = {
23102277
401: ClientAuthenticationError,
2278+
404: ResourceNotFoundError,
23112279
409: ResourceExistsError,
23122280
304: ResourceNotModifiedError,
2313-
400: cast(
2314-
Type[HttpResponseError],
2315-
lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat),
2316-
),
2317-
404: cast(
2318-
Type[HttpResponseError],
2319-
lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
2320-
),
23212281
}
23222282
error_map.update(kwargs.pop("error_map", {}) or {})
23232283

@@ -2359,7 +2319,7 @@ async def update_vnet_route(
23592319
response = pipeline_response.http_response
23602320

23612321
if response.status_code not in [200]:
2362-
map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
2322+
map_error(status_code=response.status_code, response=response, error_map=error_map)
23632323
error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
23642324
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
23652325

0 commit comments

Comments
 (0)