Skip to content

Commit

Permalink
CodeGen from PR 3325 in test-repo-billy/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge fc81bd3dca245e96b53c39c8dd293e75de26b9bc into fac972f7bd293be3217b60d0035d68fabf1e2601
  • Loading branch information
SDKAuto committed Apr 26, 2024
1 parent 1e3ce6d commit 8992812
Show file tree
Hide file tree
Showing 51 changed files with 511 additions and 11,336 deletions.
10 changes: 5 additions & 5 deletions sdk/servicelinker/azure-mgmt-servicelinker/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "84849e5293de3a8e01cbdde13b2d7086d3fb34d6",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"commit": "d48b117e2debb28420f0c237e25a58f8746b63c0",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
"@autorest/python@6.13.7",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/servicelinker/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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"autorest_command": "autorest specification/servicelinker/resource-manager/readme.md --generate-sample=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.13.7 --use=@autorest/modelerfour@4.27.0 --version=3.9.7 --version-tolerant=False",
"readme": "specification/servicelinker/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

Expand All @@ -19,22 +18,21 @@
from azure.core.credentials import TokenCredential


class ServiceLinkerManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
class ServiceLinkerManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
"""Configuration for ServiceLinkerManagementClient.
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. Required.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None:
super(ServiceLinkerManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
api_version: str = kwargs.pop("api_version", "2022-05-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -43,6 +41,7 @@ def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None:
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-servicelinker/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(self, **kwargs: Any) -> None:
Expand All @@ -51,9 +50,9 @@ def _configure(self, **kwargs: Any) -> None:
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.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
if self.credential and not self.authentication_policy:
self.authentication_policy = ARMChallengeAuthenticationPolicy(
Expand Down
Loading

0 comments on commit 8992812

Please sign in to comment.