Skip to content

Commit 09af896

Browse files
author
SDKAuto
committed
CodeGen from PR 20272 in Azure/azure-rest-api-specs
Merge 9b32b3312335c2a1a8c90c9c9368da3aaf6b9115 into 74c62048320aaafe43367357804a575196e186d0
1 parent d0f5c86 commit 09af896

37 files changed

+8135
-4208
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.7.2",
2+
"commit": "7ffda338a33698b69a3bf5869a3065f5b97ad822",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"autorest": "3.9.2",
35
"use": [
4-
"@autorest/python@5.12.0",
5-
"@autorest/modelerfour@4.19.3"
6+
"@autorest/python@6.1.11",
7+
"@autorest/modelerfour@4.24.3"
68
],
7-
"commit": "4acb59eaeaeff82d37f7e885096d3668588b33a1",
8-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/signalr/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
9+
"autorest_command": "autorest specification/signalr/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.1.11 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/signalr/resource-manager/readme.md"
1111
}

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
13-
__all__ = ['SignalRManagementClient']
1413

15-
# `._patch.py` is used for handwritten extensions to the generated code
16-
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
17-
from ._patch import patch_sdk
18-
patch_sdk()
14+
try:
15+
from ._patch import __all__ as _patch_all
16+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
17+
except ImportError:
18+
_patch_all = []
19+
from ._patch import patch_sdk as _patch_sdk
20+
21+
__all__ = ["SignalRManagementClient"]
22+
__all__.extend([p for p in _patch_all if p not in __all__])
23+
24+
_patch_sdk()

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

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,50 +19,52 @@
1919
from azure.core.credentials import TokenCredential
2020

2121

22-
class SignalRManagementClientConfiguration(Configuration):
22+
class SignalRManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for SignalRManagementClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
2626
attributes.
2727
28-
:param credential: Credential needed for the client to connect to Azure.
28+
:param credential: Credential needed for the client to connect to Azure. Required.
2929
: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.
30+
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure
31+
subscription. The subscription ID forms part of the URI for every service call. Required.
3132
:type subscription_id: str
33+
:keyword api_version: Api Version. Default value is "2022-08-01-preview". Note that overriding
34+
this default value may result in unsupported behavior.
35+
:paramtype api_version: str
3236
"""
3337

34-
def __init__(
35-
self,
36-
credential: "TokenCredential",
37-
subscription_id: str,
38-
**kwargs: Any
39-
) -> None:
38+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4039
super(SignalRManagementClientConfiguration, self).__init__(**kwargs)
40+
api_version = kwargs.pop("api_version", "2022-08-01-preview") # type: str
41+
4142
if credential is None:
4243
raise ValueError("Parameter 'credential' must not be None.")
4344
if subscription_id is None:
4445
raise ValueError("Parameter 'subscription_id' must not be None.")
4546

4647
self.credential = credential
4748
self.subscription_id = subscription_id
48-
self.api_version = "2022-02-01"
49-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
50-
kwargs.setdefault('sdk_moniker', 'mgmt-signalr/{}'.format(VERSION))
49+
self.api_version = api_version
50+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
51+
kwargs.setdefault("sdk_moniker", "mgmt-signalr/{}".format(VERSION))
5152
self._configure(**kwargs)
5253

5354
def _configure(
54-
self,
55-
**kwargs # type: Any
55+
self, **kwargs # type: Any
5656
):
5757
# type: (...) -> None
58-
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
59-
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
60-
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
61-
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
62-
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
63-
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
64-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
65-
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
66-
self.authentication_policy = kwargs.get('authentication_policy')
58+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
59+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
60+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
61+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
62+
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
63+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
64+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
65+
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
66+
self.authentication_policy = kwargs.get("authentication_policy")
6767
if self.credential and not self.authentication_policy:
68-
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
68+
self.authentication_policy = ARMChallengeAuthenticationPolicy(
69+
self.credential, *self.credential_scopes, **kwargs
70+
)

sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_metadata.json

Lines changed: 0 additions & 109 deletions
This file was deleted.

sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
# This file is used for handwritten extensions to the generated code. Example:
2929
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3030
def patch_sdk():
31-
pass
31+
pass

0 commit comments

Comments
 (0)