Skip to content

Commit

Permalink
CodeGen from PR 31911 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 4e81672bceafd275b0ecb5cc8bb2fbb897ea5c6e into 6261cf1fb6533df73756cd828796ac01522a9776
  • Loading branch information
SDKAuto committed Feb 27, 2025
1 parent bdacba7 commit 942019b
Show file tree
Hide file tree
Showing 59 changed files with 2,243 additions and 7,656 deletions.
6 changes: 3 additions & 3 deletions sdk/appservice/azure-mgmt-web/_meta.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"commit": "ff7b8e12e78b352561e2e470dd045be310a313fa",
"commit": "405389ea52adf121a8c350844785d595fb0370d7",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.26.4",
"@autorest/python@6.27.4",
"@autorest/[email protected]"
],
"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",
"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",
"readme": "specification/web/resource-manager/readme.md",
"package-2023-01": "fatal: invalid object name 'from'. from: WebApps.json",
"package-2022-09": "fatal: invalid object name 'from'. from: WebApps.json",
Expand Down
4 changes: 1 addition & 3 deletions sdk/appservice/azure-mgmt-web/azure/mgmt/web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
# --------------------------------------------------------------------------

from ._web_site_management_client import WebSiteManagementClient

__all__ = ["WebSiteManagementClient"]
__all__ = ['WebSiteManagementClient']

try:
from ._patch import patch_sdk # type: ignore

patch_sdk()
except ImportError:
pass
Expand Down
39 changes: 22 additions & 17 deletions sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class WebSiteManagementClientConfiguration:
"""Configuration for WebSiteManagementClient.
Expand All @@ -32,30 +31,36 @@ class WebSiteManagementClientConfiguration:
:type subscription_id: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any):
def __init__(
self,
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
):
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

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

def _configure(self, **kwargs: Any):
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")
def _configure(
self,
**kwargs: Any
):
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)
Loading

0 comments on commit 942019b

Please sign in to comment.