1010# --------------------------------------------------------------------------
1111from typing import Any , TYPE_CHECKING
1212
13- from azure .core .configuration import Configuration
1413from azure .core .pipeline import policies
1514from azure .mgmt .core .policies import ARMChallengeAuthenticationPolicy , ARMHttpLoggingPolicy
1615
2019 # pylint: disable=unused-import,ungrouped-imports
2120 from azure .core .credentials import TokenCredential
2221
23-
24- class AppConfigurationManagementClientConfiguration (Configuration ):
22+ class AppConfigurationManagementClientConfiguration :
2523 """Configuration for AppConfigurationManagementClient.
2624
2725 Note that all parameters used to create this instance are saved as instance
@@ -33,30 +31,36 @@ class AppConfigurationManagementClientConfiguration(Configuration):
3331 :type subscription_id: str
3432 """
3533
36- def __init__ (self , credential : "TokenCredential" , subscription_id : str , ** kwargs : Any ):
34+ def __init__ (
35+ self ,
36+ credential : "TokenCredential" ,
37+ subscription_id : str ,
38+ ** kwargs : Any
39+ ):
3740 if credential is None :
3841 raise ValueError ("Parameter 'credential' must not be None." )
3942 if subscription_id is None :
4043 raise ValueError ("Parameter 'subscription_id' must not be None." )
41- super (AppConfigurationManagementClientConfiguration , self ).__init__ (** kwargs )
4244
4345 self .credential = credential
4446 self .subscription_id = subscription_id
45- self .credential_scopes = kwargs .pop ("credential_scopes" , ["https://management.azure.com/.default" ])
46- kwargs .setdefault ("sdk_moniker" , "azure-mgmt-appconfiguration/{}" .format (VERSION ))
47+ self .credential_scopes = kwargs .pop ('credential_scopes' , ['https://management.azure.com/.default' ])
48+ kwargs .setdefault ('sdk_moniker' , 'azure-mgmt-appconfiguration/{}' .format (VERSION ))
49+ self .polling_interval = kwargs .get ("polling_interval" , 30 )
4750 self ._configure (** kwargs )
4851
49- def _configure (self , ** kwargs : Any ):
50- self .user_agent_policy = kwargs .get ("user_agent_policy" ) or policies .UserAgentPolicy (** kwargs )
51- self .headers_policy = kwargs .get ("headers_policy" ) or policies .HeadersPolicy (** kwargs )
52- self .proxy_policy = kwargs .get ("proxy_policy" ) or policies .ProxyPolicy (** kwargs )
53- self .logging_policy = kwargs .get ("logging_policy" ) or policies .NetworkTraceLoggingPolicy (** kwargs )
54- self .http_logging_policy = kwargs .get ("http_logging_policy" ) or ARMHttpLoggingPolicy (** kwargs )
55- self .retry_policy = kwargs .get ("retry_policy" ) or policies .RetryPolicy (** kwargs )
56- self .custom_hook_policy = kwargs .get ("custom_hook_policy" ) or policies .CustomHookPolicy (** kwargs )
57- self .redirect_policy = kwargs .get ("redirect_policy" ) or policies .RedirectPolicy (** kwargs )
58- self .authentication_policy = kwargs .get ("authentication_policy" )
52+ def _configure (
53+ self ,
54+ ** kwargs : Any
55+ ):
56+ self .user_agent_policy = kwargs .get ('user_agent_policy' ) or policies .UserAgentPolicy (** kwargs )
57+ self .headers_policy = kwargs .get ('headers_policy' ) or policies .HeadersPolicy (** kwargs )
58+ self .proxy_policy = kwargs .get ('proxy_policy' ) or policies .ProxyPolicy (** kwargs )
59+ self .logging_policy = kwargs .get ('logging_policy' ) or policies .NetworkTraceLoggingPolicy (** kwargs )
60+ self .http_logging_policy = kwargs .get ('http_logging_policy' ) or ARMHttpLoggingPolicy (** kwargs )
61+ self .retry_policy = kwargs .get ('retry_policy' ) or policies .RetryPolicy (** kwargs )
62+ self .custom_hook_policy = kwargs .get ('custom_hook_policy' ) or policies .CustomHookPolicy (** kwargs )
63+ self .redirect_policy = kwargs .get ('redirect_policy' ) or policies .RedirectPolicy (** kwargs )
64+ self .authentication_policy = kwargs .get ('authentication_policy' )
5965 if self .credential and not self .authentication_policy :
60- self .authentication_policy = ARMChallengeAuthenticationPolicy (
61- self .credential , * self .credential_scopes , ** kwargs
62- )
66+ self .authentication_policy = ARMChallengeAuthenticationPolicy (self .credential , * self .credential_scopes , ** kwargs )
0 commit comments