Skip to content

Commit

Permalink
CodeGen from PR 19955 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge d89ea1ee4f4ac6f01f2d3341e3f8c5bce479a981 into 152050002a09b76fd66ddb82dd9e90a41d87906c
  • Loading branch information
SDKAuto committed Aug 26, 2022
1 parent 1698f32 commit 3136510
Show file tree
Hide file tree
Showing 306 changed files with 74,356 additions and 53,620 deletions.
10 changes: 5 additions & 5 deletions sdk/sql/azure-mgmt-sql/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"autorest": "3.8.4",
"use": [
"@autorest/python@5.16.0",
"@autorest/modelerfour@4.19.3"
"@autorest/python@6.0.1",
"@autorest/modelerfour@4.23.5"
],
"commit": "b9b91929c304f8fb44002267b6c98d9fb9dde014",
"commit": "1b9ff65eb32dc3c931e48602ac694bd87b8eeab5",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/sql/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"autorest_command": "autorest specification/sql/resource-manager/readme.md --models-mode=msrest --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.0.1 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False",
"readme": "specification/sql/resource-manager/readme.md"
}
3 changes: 2 additions & 1 deletion sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['SqlManagementClient']

__all__ = ["SqlManagementClient"]
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
40 changes: 18 additions & 22 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,13 @@ class SqlManagementClientConfiguration(Configuration): # pylint: disable=too-ma
Note that all parameters used to create this instance are saved as instance
attributes.
:param credential: Credential needed for the client to connect to Azure.
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The subscription ID that identifies an Azure subscription.
:param subscription_id: The subscription ID that identifies an Azure subscription. Required.
:type subscription_id: str
"""

def __init__(
self,
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
) -> None:
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(SqlManagementClientConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -45,23 +40,24 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-sql/{}'.format(VERSION))
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-sql/{}".format(VERSION))
self._configure(**kwargs)

def _configure(
self,
**kwargs # type: Any
self, **kwargs # type: Any
):
# type: (...) -> None
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
if self.credential and not self.authentication_policy:
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(
self.credential, *self.credential_scopes, **kwargs
)
2 changes: 1 addition & 1 deletion sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
# 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():
pass
pass
Loading

0 comments on commit 3136510

Please sign in to comment.