66# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77# --------------------------------------------------------------------------
88
9+ import sys
910from typing import Any , TYPE_CHECKING
1011
1112from azure .core .configuration import Configuration
1415
1516from ._version import VERSION
1617
18+ if sys .version_info >= (3 , 8 ):
19+ from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20+ else :
21+ from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22+
1723if TYPE_CHECKING :
1824 # pylint: disable=unused-import,ungrouped-imports
1925 from azure .core .credentials import TokenCredential
@@ -25,23 +31,18 @@ class LogicManagementClientConfiguration(Configuration): # pylint: disable=too-
2531 Note that all parameters used to create this instance are saved as instance
2632 attributes.
2733
28- :param credential: Credential needed for the client to connect to Azure.
34+ :param credential: Credential needed for the client to connect to Azure. Required.
2935 :type credential: ~azure.core.credentials.TokenCredential
30- :param subscription_id: The subscription id.
36+ :param subscription_id: The subscription id. Required.
3137 :type subscription_id: str
3238 :keyword api_version: Api Version. Default value is "2019-05-01". Note that overriding this
3339 default value may result in unsupported behavior.
3440 :paramtype api_version: str
3541 """
3642
37- def __init__ (
38- self ,
39- credential : "TokenCredential" ,
40- subscription_id : str ,
41- ** kwargs : Any
42- ) -> None :
43+ def __init__ (self , credential : "TokenCredential" , subscription_id : str , ** kwargs : Any ) -> None :
4344 super (LogicManagementClientConfiguration , self ).__init__ (** kwargs )
44- api_version = kwargs .pop (' api_version' , "2019-05-01" ) # type: str
45+ api_version = kwargs .pop (" api_version" , "2019-05-01" ) # type: Literal["2019-05-01"]
4546
4647 if credential is None :
4748 raise ValueError ("Parameter 'credential' must not be None." )
@@ -51,23 +52,24 @@ def __init__(
5152 self .credential = credential
5253 self .subscription_id = subscription_id
5354 self .api_version = api_version
54- self .credential_scopes = kwargs .pop (' credential_scopes' , [' https://management.azure.com/.default' ])
55- kwargs .setdefault (' sdk_moniker' , ' mgmt-logic/{}' .format (VERSION ))
55+ self .credential_scopes = kwargs .pop (" credential_scopes" , [" https://management.azure.com/.default" ])
56+ kwargs .setdefault (" sdk_moniker" , " mgmt-logic/{}" .format (VERSION ))
5657 self ._configure (** kwargs )
5758
5859 def _configure (
59- self ,
60- ** kwargs # type: Any
60+ self , ** kwargs # type: Any
6161 ):
6262 # type: (...) -> None
63- self .user_agent_policy = kwargs .get (' user_agent_policy' ) or policies .UserAgentPolicy (** kwargs )
64- self .headers_policy = kwargs .get (' headers_policy' ) or policies .HeadersPolicy (** kwargs )
65- self .proxy_policy = kwargs .get (' proxy_policy' ) or policies .ProxyPolicy (** kwargs )
66- self .logging_policy = kwargs .get (' logging_policy' ) or policies .NetworkTraceLoggingPolicy (** kwargs )
67- self .http_logging_policy = kwargs .get (' http_logging_policy' ) or ARMHttpLoggingPolicy (** kwargs )
68- self .retry_policy = kwargs .get (' retry_policy' ) or policies .RetryPolicy (** kwargs )
69- self .custom_hook_policy = kwargs .get (' custom_hook_policy' ) or policies .CustomHookPolicy (** kwargs )
70- self .redirect_policy = kwargs .get (' redirect_policy' ) or policies .RedirectPolicy (** kwargs )
71- self .authentication_policy = kwargs .get (' authentication_policy' )
63+ self .user_agent_policy = kwargs .get (" user_agent_policy" ) or policies .UserAgentPolicy (** kwargs )
64+ self .headers_policy = kwargs .get (" headers_policy" ) or policies .HeadersPolicy (** kwargs )
65+ self .proxy_policy = kwargs .get (" proxy_policy" ) or policies .ProxyPolicy (** kwargs )
66+ self .logging_policy = kwargs .get (" logging_policy" ) or policies .NetworkTraceLoggingPolicy (** kwargs )
67+ self .http_logging_policy = kwargs .get (" http_logging_policy" ) or ARMHttpLoggingPolicy (** kwargs )
68+ self .retry_policy = kwargs .get (" retry_policy" ) or policies .RetryPolicy (** kwargs )
69+ self .custom_hook_policy = kwargs .get (" custom_hook_policy" ) or policies .CustomHookPolicy (** kwargs )
70+ self .redirect_policy = kwargs .get (" redirect_policy" ) or policies .RedirectPolicy (** kwargs )
71+ self .authentication_policy = kwargs .get (" authentication_policy" )
7272 if self .credential and not self .authentication_policy :
73- self .authentication_policy = ARMChallengeAuthenticationPolicy (self .credential , * self .credential_scopes , ** kwargs )
73+ self .authentication_policy = ARMChallengeAuthenticationPolicy (
74+ self .credential , * self .credential_scopes , ** kwargs
75+ )
0 commit comments