2727 # pylint: disable=unused-import,ungrouped-imports
2828 from azure .core .credentials import TokenCredential
2929
30+
3031class _SDKClient (object ):
3132 def __init__ (self , * args , ** kwargs ):
3233 """This is a fake class to support current implementation of MultiApiClientMixin."
3334 Will be removed in final version of multiapi azure-core based client
3435 """
3536 pass
3637
38+
3739class ContainerServiceFleetMgmtClient (MultiApiClientMixin , _SDKClient ):
3840 """Azure Kubernetes Fleet Manager api client.
3941
@@ -71,19 +73,22 @@ def __init__(
7173 self ,
7274 credential : "TokenCredential" ,
7375 subscription_id : str ,
74- api_version : Optional [str ]= None ,
76+ api_version : Optional [str ] = None ,
7577 base_url : Optional [str ] = None ,
76- profile : KnownProfiles = KnownProfiles .default ,
78+ profile : KnownProfiles = KnownProfiles .default ,
7779 ** kwargs : Any
7880 ):
7981 if api_version :
8082 kwargs .setdefault ('api_version' , api_version )
81- _cloud = kwargs .pop ("cloud_setting" , None ) or settings .current .azure_cloud # type: ignore
83+ _cloud = kwargs .pop (
84+ "cloud_setting" , None ) or settings .current .azure_cloud # type: ignore
8285 _endpoints = get_arm_endpoints (_cloud )
8386 if not base_url :
8487 base_url = _endpoints ["resource_manager" ]
85- credential_scopes = kwargs .pop ("credential_scopes" , _endpoints ["credential_scopes" ])
86- self ._config = ContainerServiceFleetMgmtClientConfiguration (credential , subscription_id , credential_scopes = credential_scopes , ** kwargs )
88+ credential_scopes = kwargs .pop (
89+ "credential_scopes" , _endpoints ["credential_scopes" ])
90+ self ._config = ContainerServiceFleetMgmtClientConfiguration (
91+ credential , subscription_id , credential_scopes = credential_scopes , ** kwargs )
8792 _policies = kwargs .pop ("policies" , None )
8893 if _policies is None :
8994 _policies = [
@@ -99,10 +104,12 @@ def __init__(
99104 self ._config .custom_hook_policy ,
100105 self ._config .logging_policy ,
101106 policies .DistributedTracingPolicy (** kwargs ),
102- policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
107+ policies .SensitiveHeaderCleanupPolicy (
108+ ** kwargs ) if self ._config .redirect_policy else None ,
103109 self ._config .http_logging_policy ,
104110 ]
105- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = cast (str , base_url ), policies = _policies , ** kwargs )
111+ self ._client : ARMPipelineClient = ARMPipelineClient (
112+ base_url = cast (str , base_url ), policies = _policies , ** kwargs )
106113 super (ContainerServiceFleetMgmtClient , self ).__init__ (
107114 api_version = api_version ,
108115 profile = profile
@@ -157,6 +164,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
157164 elif api_version == '2025-04-01-preview' :
158165 from .v2025_04_01_preview import models
159166 return models
167+ elif api_version == '2025-08-01-preview' :
168+ from .v2025_08_01_preview import models
169+ return models
160170 raise ValueError ("API version {} is not available" .format (api_version ))
161171
162172 @property
@@ -171,8 +181,11 @@ def auto_upgrade_profile_operations(self):
171181 from .v2025_03_01 .operations import AutoUpgradeProfileOperationsOperations as OperationClass
172182 elif api_version == '2025-04-01-preview' :
173183 from .v2025_04_01_preview .operations import AutoUpgradeProfileOperationsOperations as OperationClass
184+ elif api_version == '2025-08-01-preview' :
185+ from .v2025_08_01_preview .operations import AutoUpgradeProfileOperationsOperations as OperationClass
174186 else :
175- raise ValueError ("API version {} does not have operation group 'auto_upgrade_profile_operations'" .format (api_version ))
187+ raise ValueError (
188+ "API version {} does not have operation group 'auto_upgrade_profile_operations'" .format (api_version ))
176189 self ._config .api_version = api_version
177190 return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )), api_version )
178191
@@ -188,8 +201,11 @@ def auto_upgrade_profiles(self):
188201 from .v2025_03_01 .operations import AutoUpgradeProfilesOperations as OperationClass
189202 elif api_version == '2025-04-01-preview' :
190203 from .v2025_04_01_preview .operations import AutoUpgradeProfilesOperations as OperationClass
204+ elif api_version == '2025-08-01-preview' :
205+ from .v2025_08_01_preview .operations import AutoUpgradeProfilesOperations as OperationClass
191206 else :
192- raise ValueError ("API version {} does not have operation group 'auto_upgrade_profiles'" .format (api_version ))
207+ raise ValueError (
208+ "API version {} does not have operation group 'auto_upgrade_profiles'" .format (api_version ))
193209 self ._config .api_version = api_version
194210 return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )), api_version )
195211
@@ -229,8 +245,11 @@ def fleet_members(self):
229245 from .v2025_03_01 .operations import FleetMembersOperations as OperationClass
230246 elif api_version == '2025-04-01-preview' :
231247 from .v2025_04_01_preview .operations import FleetMembersOperations as OperationClass
248+ elif api_version == '2025-08-01-preview' :
249+ from .v2025_08_01_preview .operations import FleetMembersOperations as OperationClass
232250 else :
233- raise ValueError ("API version {} does not have operation group 'fleet_members'" .format (api_version ))
251+ raise ValueError (
252+ "API version {} does not have operation group 'fleet_members'" .format (api_version ))
234253 self ._config .api_version = api_version
235254 return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )), api_version )
236255
@@ -255,8 +274,11 @@ def fleet_update_strategies(self):
255274 from .v2025_03_01 .operations import FleetUpdateStrategiesOperations as OperationClass
256275 elif api_version == '2025-04-01-preview' :
257276 from .v2025_04_01_preview .operations import FleetUpdateStrategiesOperations as OperationClass
277+ elif api_version == '2025-08-01-preview' :
278+ from .v2025_08_01_preview .operations import FleetUpdateStrategiesOperations as OperationClass
258279 else :
259- raise ValueError ("API version {} does not have operation group 'fleet_update_strategies'" .format (api_version ))
280+ raise ValueError (
281+ "API version {} does not have operation group 'fleet_update_strategies'" .format (api_version ))
260282 self ._config .api_version = api_version
261283 return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )), api_version )
262284
@@ -296,8 +318,11 @@ def fleets(self):
296318 from .v2025_03_01 .operations import FleetsOperations as OperationClass
297319 elif api_version == '2025-04-01-preview' :
298320 from .v2025_04_01_preview .operations import FleetsOperations as OperationClass
321+ elif api_version == '2025-08-01-preview' :
322+ from .v2025_08_01_preview .operations import FleetsOperations as OperationClass
299323 else :
300- raise ValueError ("API version {} does not have operation group 'fleets'" .format (api_version ))
324+ raise ValueError (
325+ "API version {} does not have operation group 'fleets'" .format (api_version ))
301326 self ._config .api_version = api_version
302327 return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )), api_version )
303328
@@ -310,8 +335,11 @@ def gates(self):
310335 api_version = self ._get_api_version ('gates' )
311336 if api_version == '2025-04-01-preview' :
312337 from .v2025_04_01_preview .operations import GatesOperations as OperationClass
338+ elif api_version == '2025-08-01-preview' :
339+ from .v2025_08_01_preview .operations import GatesOperations as OperationClass
313340 else :
314- raise ValueError ("API version {} does not have operation group 'gates'" .format (api_version ))
341+ raise ValueError (
342+ "API version {} does not have operation group 'gates'" .format (api_version ))
315343 self ._config .api_version = api_version
316344 return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )), api_version )
317345
@@ -345,8 +373,11 @@ def operations(self):
345373 from .v2025_03_01 .operations import Operations as OperationClass
346374 elif api_version == '2025-04-01-preview' :
347375 from .v2025_04_01_preview .operations import Operations as OperationClass
376+ elif api_version == '2025-08-01-preview' :
377+ from .v2025_08_01_preview .operations import Operations as OperationClass
348378 else :
349- raise ValueError ("API version {} does not have operation group 'operations'" .format (api_version ))
379+ raise ValueError (
380+ "API version {} does not have operation group 'operations'" .format (api_version ))
350381 self ._config .api_version = api_version
351382 return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )), api_version )
352383
@@ -377,15 +408,20 @@ def update_runs(self):
377408 from .v2025_03_01 .operations import UpdateRunsOperations as OperationClass
378409 elif api_version == '2025-04-01-preview' :
379410 from .v2025_04_01_preview .operations import UpdateRunsOperations as OperationClass
411+ elif api_version == '2025-08-01-preview' :
412+ from .v2025_08_01_preview .operations import UpdateRunsOperations as OperationClass
380413 else :
381- raise ValueError ("API version {} does not have operation group 'update_runs'" .format (api_version ))
414+ raise ValueError (
415+ "API version {} does not have operation group 'update_runs'" .format (api_version ))
382416 self ._config .api_version = api_version
383417 return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )), api_version )
384418
385419 def close (self ):
386420 self ._client .close ()
421+
387422 def __enter__ (self ):
388423 self ._client .__enter__ ()
389424 return self
425+
390426 def __exit__ (self , * exc_details ):
391427 self ._client .__exit__ (* exc_details )
0 commit comments