Skip to content

Commit dbd4576

Browse files
author
SDKAuto
committed
CodeGen from PR 31199 in Azure/azure-rest-api-specs
Merge 7c915f49b3b229a72df20242c6d9fa6fc2d46195 into fe44d3261ff0ea816315126120672ccec78c3074
1 parent 44990aa commit dbd4576

File tree

1,691 files changed

+75669
-971402
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,691 files changed

+75669
-971402
lines changed

sdk/appplatform/azure-mgmt-appplatform/_meta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"commit": "3cb1b51638616435470fc10ea00de92512186ece",
2+
"commit": "233f62004fe2b3ed975dc36b87e051ca5b39d31b",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.14.3",
6+
"@autorest/python@6.19.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/appplatform/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.14.3 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/appplatform/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/appplatform/resource-manager/readme.md",
1111
"package-2023-12": "2023-12-14 09:48:21 +0800 0fac19a4056fab82c3955a9d8eeba33e79158e49 Microsoft.AppPlatform/stable/2023-12-01/appplatform.json",
1212
"package-preview-2023-11": "2023-10-25 09:34:29 +0800 eac41e7f43d1fdfeff98eced43a90d7b1dd746e2 Microsoft.AppPlatform/preview/2023-11-01-preview/appplatform.json",

sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/__init__.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@
77
# --------------------------------------------------------------------------
88

99
from ._app_platform_management_client import AppPlatformManagementClient
10-
__all__ = ['AppPlatformManagementClient']
10+
from ._version import VERSION
11+
12+
__version__ = VERSION
1113

1214
try:
13-
from ._patch import patch_sdk # type: ignore
14-
patch_sdk()
15+
from ._patch import __all__ as _patch_all
16+
from ._patch import * # pylint: disable=unused-wildcard-import
1517
except ImportError:
16-
pass
18+
_patch_all = []
19+
from ._patch import patch_sdk as _patch_sdk
1720

18-
from ._version import VERSION
21+
__all__ = [
22+
"AppPlatformManagementClient",
23+
]
24+
__all__.extend([p for p in _patch_all if p not in __all__])
1925

20-
__version__ = VERSION
26+
_patch_sdk()

sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_app_platform_management_client.py

Lines changed: 225 additions & 1968 deletions
Large diffs are not rendered by default.
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for
5-
# license information.
6-
#
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
75
# Code generated by Microsoft (R) AutoRest Code Generator.
8-
# Changes may cause incorrect behavior and will be lost if the code is
9-
# regenerated.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
107
# --------------------------------------------------------------------------
8+
119
from typing import Any, TYPE_CHECKING
1210

1311
from azure.core.pipeline import policies
@@ -19,48 +17,50 @@
1917
# pylint: disable=unused-import,ungrouped-imports
2018
from azure.core.credentials import TokenCredential
2119

22-
class AppPlatformManagementClientConfiguration:
20+
21+
class AppPlatformManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
2322
"""Configuration for AppPlatformManagementClient.
2423
2524
Note that all parameters used to create this instance are saved as instance
2625
attributes.
2726
2827
:param credential: Credential needed for the client to connect to Azure. Required.
2928
:type credential: ~azure.core.credentials.TokenCredential
30-
:param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.
29+
:param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure
30+
subscription. The subscription ID forms part of the URI for every service call. Required.
3131
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2024-05-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
34+
:paramtype api_version: str
3235
"""
3336

34-
def __init__(
35-
self,
36-
credential: "TokenCredential",
37-
subscription_id: str,
38-
**kwargs: Any
39-
):
37+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38+
api_version: str = kwargs.pop("api_version", "2024-05-01-preview")
39+
4040
if credential is None:
4141
raise ValueError("Parameter 'credential' must not be None.")
4242
if subscription_id is None:
4343
raise ValueError("Parameter 'subscription_id' must not be None.")
4444

4545
self.credential = credential
4646
self.subscription_id = subscription_id
47-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
48-
kwargs.setdefault('sdk_moniker', 'azure-mgmt-appplatform/{}'.format(VERSION))
47+
self.api_version = api_version
48+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
49+
kwargs.setdefault("sdk_moniker", "mgmt-appplatform/{}".format(VERSION))
4950
self.polling_interval = kwargs.get("polling_interval", 30)
5051
self._configure(**kwargs)
5152

52-
def _configure(
53-
self,
54-
**kwargs: Any
55-
):
56-
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
57-
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
58-
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
59-
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
60-
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
61-
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
62-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
63-
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
64-
self.authentication_policy = kwargs.get('authentication_policy')
53+
def _configure(self, **kwargs: Any) -> None:
54+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
55+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
56+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
57+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
58+
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
59+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
60+
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
61+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
62+
self.authentication_policy = kwargs.get("authentication_policy")
6563
if self.credential and not self.authentication_policy:
66-
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
64+
self.authentication_policy = ARMChallengeAuthenticationPolicy(
65+
self.credential, *self.credential_scopes, **kwargs
66+
)

sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_serialization.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON:
351351
def as_dict(
352352
self,
353353
keep_readonly: bool = True,
354-
key_transformer: Callable[
355-
[str, Dict[str, Any], Any], Any
356-
] = attribute_transformer,
354+
key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer,
357355
**kwargs: Any
358356
) -> JSON:
359357
"""Return a dict that can be serialized using json.dump.
@@ -542,7 +540,7 @@ class Serializer(object):
542540
"multiple": lambda x, y: x % y != 0,
543541
}
544542

545-
def __init__(self, classes: Optional[Mapping[str, type]]=None):
543+
def __init__(self, classes: Optional[Mapping[str, type]] = None):
546544
self.serialize_type = {
547545
"iso-8601": Serializer.serialize_iso,
548546
"rfc-1123": Serializer.serialize_rfc,
@@ -750,7 +748,7 @@ def query(self, name, data, data_type, **kwargs):
750748
# Treat the list aside, since we don't want to encode the div separator
751749
if data_type.startswith("["):
752750
internal_data_type = data_type[1:-1]
753-
do_quote = not kwargs.get('skip_quote', False)
751+
do_quote = not kwargs.get("skip_quote", False)
754752
return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs)
755753

756754
# Not a list, regular serialization
@@ -909,12 +907,8 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs):
909907
raise
910908
serialized.append(None)
911909

912-
if kwargs.get('do_quote', False):
913-
serialized = [
914-
'' if s is None else quote(str(s), safe='')
915-
for s
916-
in serialized
917-
]
910+
if kwargs.get("do_quote", False):
911+
serialized = ["" if s is None else quote(str(s), safe="") for s in serialized]
918912

919913
if div:
920914
serialized = ["" if s is None else str(s) for s in serialized]
@@ -1371,7 +1365,7 @@ class Deserializer(object):
13711365

13721366
valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?")
13731367

1374-
def __init__(self, classes: Optional[Mapping[str, type]]=None):
1368+
def __init__(self, classes: Optional[Mapping[str, type]] = None):
13751369
self.deserialize_type = {
13761370
"iso-8601": Deserializer.deserialize_iso,
13771371
"rfc-1123": Deserializer.deserialize_rfc,
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for
5-
# license information.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
67
# --------------------------------------------------------------------------
78

89
VERSION = "9.1.0"

sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/__init__.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,17 @@
77
# --------------------------------------------------------------------------
88

99
from ._app_platform_management_client import AppPlatformManagementClient
10-
__all__ = ['AppPlatformManagementClient']
10+
11+
try:
12+
from ._patch import __all__ as _patch_all
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
except ImportError:
15+
_patch_all = []
16+
from ._patch import patch_sdk as _patch_sdk
17+
18+
__all__ = [
19+
"AppPlatformManagementClient",
20+
]
21+
__all__.extend([p for p in _patch_all if p not in __all__])
22+
23+
_patch_sdk()

0 commit comments

Comments
 (0)