11# coding=utf-8
22# --------------------------------------------------------------------------
33# Copyright (c) Microsoft Corporation. All rights reserved.
4- # Licensed under the MIT License. See License.txt in the project root for
5- # license information.
6- #
4+ # Licensed under the MIT License. See License.txt in the project root for license information.
75# Code generated by Microsoft (R) AutoRest Code Generator.
8- # Changes may cause incorrect behavior and will be lost if the code is
9- # regenerated.
6+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
107# --------------------------------------------------------------------------
8+
119from typing import Any , TYPE_CHECKING
1210
13- from azure .core .configuration import Configuration
1411from azure .core .pipeline import policies
1512from azure .mgmt .core .policies import ARMChallengeAuthenticationPolicy , ARMHttpLoggingPolicy
1613
2017 # pylint: disable=unused-import,ungrouped-imports
2118 from azure .core .credentials import TokenCredential
2219
23- class DataBoxManagementClientConfiguration (Configuration ):
20+
21+ class DataBoxManagementClientConfiguration : # pylint: disable=too-many-instance-attributes,name-too-long
2422 """Configuration for DataBoxManagementClient.
2523
2624 Note that all parameters used to create this instance are saved as instance
@@ -30,38 +28,38 @@ class DataBoxManagementClientConfiguration(Configuration):
3028 :type credential: ~azure.core.credentials.TokenCredential
3129 :param subscription_id: The Subscription Id. Required.
3230 :type subscription_id: str
31+ :keyword api_version: Api Version. Default value is "2022-12-01". Note that overriding this
32+ default value may result in unsupported behavior.
33+ :paramtype api_version: str
3334 """
3435
35- def __init__ (
36- self ,
37- credential : "TokenCredential" ,
38- subscription_id : str ,
39- ** kwargs : Any
40- ):
36+ def __init__ (self , credential : "TokenCredential" , subscription_id : str , ** kwargs : Any ) -> None :
37+ api_version : str = kwargs .pop ("api_version" , "2022-12-01" )
38+
4139 if credential is None :
4240 raise ValueError ("Parameter 'credential' must not be None." )
4341 if subscription_id is None :
4442 raise ValueError ("Parameter 'subscription_id' must not be None." )
45- super (DataBoxManagementClientConfiguration , self ).__init__ (** kwargs )
4643
4744 self .credential = credential
4845 self .subscription_id = subscription_id
49- self .credential_scopes = kwargs .pop ('credential_scopes' , ['https://management.azure.com/.default' ])
50- kwargs .setdefault ('sdk_moniker' , 'azure-mgmt-databox/{}' .format (VERSION ))
46+ self .api_version = api_version
47+ self .credential_scopes = kwargs .pop ("credential_scopes" , ["https://management.azure.com/.default" ])
48+ kwargs .setdefault ("sdk_moniker" , "mgmt-databox/{}" .format (VERSION ))
49+ self .polling_interval = kwargs .get ("polling_interval" , 30 )
5150 self ._configure (** kwargs )
5251
53- def _configure (
54- self ,
55- ** kwargs : Any
56- ):
57- self .user_agent_policy = kwargs .get ('user_agent_policy' ) or policies .UserAgentPolicy (** kwargs )
58- self .headers_policy = kwargs .get ('headers_policy' ) or policies .HeadersPolicy (** kwargs )
59- self .proxy_policy = kwargs .get ('proxy_policy' ) or policies .ProxyPolicy (** kwargs )
60- self .logging_policy = kwargs .get ('logging_policy' ) or policies .NetworkTraceLoggingPolicy (** kwargs )
61- self .http_logging_policy = kwargs .get ('http_logging_policy' ) or ARMHttpLoggingPolicy (** kwargs )
62- self .retry_policy = kwargs .get ('retry_policy' ) or policies .RetryPolicy (** kwargs )
63- self .custom_hook_policy = kwargs .get ('custom_hook_policy' ) or policies .CustomHookPolicy (** kwargs )
64- self .redirect_policy = kwargs .get ('redirect_policy' ) or policies .RedirectPolicy (** kwargs )
65- self .authentication_policy = kwargs .get ('authentication_policy' )
52+ def _configure (self , ** kwargs : Any ) -> None :
53+ self .user_agent_policy = kwargs .get ("user_agent_policy" ) or policies .UserAgentPolicy (** kwargs )
54+ self .headers_policy = kwargs .get ("headers_policy" ) or policies .HeadersPolicy (** kwargs )
55+ self .proxy_policy = kwargs .get ("proxy_policy" ) or policies .ProxyPolicy (** kwargs )
56+ self .logging_policy = kwargs .get ("logging_policy" ) or policies .NetworkTraceLoggingPolicy (** kwargs )
57+ self .http_logging_policy = kwargs .get ("http_logging_policy" ) or ARMHttpLoggingPolicy (** kwargs )
58+ self .custom_hook_policy = kwargs .get ("custom_hook_policy" ) or policies .CustomHookPolicy (** kwargs )
59+ self .redirect_policy = kwargs .get ("redirect_policy" ) or policies .RedirectPolicy (** kwargs )
60+ self .retry_policy = kwargs .get ("retry_policy" ) or policies .RetryPolicy (** kwargs )
61+ self .authentication_policy = kwargs .get ("authentication_policy" )
6662 if self .credential and not self .authentication_policy :
67- self .authentication_policy = ARMChallengeAuthenticationPolicy (self .credential , * self .credential_scopes , ** kwargs )
63+ self .authentication_policy = ARMChallengeAuthenticationPolicy (
64+ self .credential , * self .credential_scopes , ** kwargs
65+ )
0 commit comments