22# --------------------------------------------------------------------------
33# Copyright (c) Microsoft Corporation. All rights reserved.
44# Licensed under the MIT License. See License.txt in the project root for license information.
5- # Code generated by Microsoft (R) AutoRest Code Generator.
5+ # Code generated by Microsoft (R) Python Code Generator.
66# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77# --------------------------------------------------------------------------
88
1515from azure .mgmt .core import ARMPipelineClient
1616from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
1717
18- from . import models as _models
19- from ._configuration import ServiceFabricManagedClustersManagementClientConfiguration
18+ from ._configuration import ServiceFabricClientConfiguration
2019from ._serialization import Deserializer , Serializer
2120from .operations import (
2221 ApplicationTypeVersionsOperations ,
2322 ApplicationTypesOperations ,
2423 ApplicationsOperations ,
2524 ManagedApplyMaintenanceWindowOperations ,
26- ManagedAzResiliencyStatusOperations ,
2725 ManagedClusterVersionOperations ,
2826 ManagedClustersOperations ,
29- ManagedMaintenanceWindowStatusOperations ,
27+ ManagedGetAzResiliencyStatusOperations ,
28+ ManagedGetMaintenanceWindowStatusOperations ,
3029 ManagedUnsupportedVMSizesOperations ,
3130 NodeTypeSkusOperations ,
3231 NodeTypesOperations ,
4039 from azure .core .credentials import TokenCredential
4140
4241
43- class ServiceFabricManagedClustersManagementClient : # pylint: disable=too-many-instance-attributes,name-too-long
42+ class ServiceFabricClient : # pylint: disable=too-many-instance-attributes
4443 """Service Fabric Managed Clusters Management Client.
4544
45+ :ivar operations: Operations operations
46+ :vartype operations: azure.mgmt.servicefabricmanagedclusters.operations.Operations
47+ :ivar applications: ApplicationsOperations operations
48+ :vartype applications:
49+ azure.mgmt.servicefabricmanagedclusters.operations.ApplicationsOperations
4650 :ivar application_types: ApplicationTypesOperations operations
4751 :vartype application_types:
4852 azure.mgmt.servicefabricmanagedclusters.operations.ApplicationTypesOperations
4953 :ivar application_type_versions: ApplicationTypeVersionsOperations operations
5054 :vartype application_type_versions:
5155 azure.mgmt.servicefabricmanagedclusters.operations.ApplicationTypeVersionsOperations
52- :ivar applications: ApplicationsOperations operations
53- :vartype applications:
54- azure.mgmt.servicefabricmanagedclusters.operations.ApplicationsOperations
5556 :ivar services: ServicesOperations operations
5657 :vartype services: azure.mgmt.servicefabricmanagedclusters.operations.ServicesOperations
57- :ivar managed_clusters: ManagedClustersOperations operations
58- :vartype managed_clusters:
59- azure.mgmt.servicefabricmanagedclusters.operations.ManagedClustersOperations
60- :ivar managed_az_resiliency_status: ManagedAzResiliencyStatusOperations operations
61- :vartype managed_az_resiliency_status:
62- azure.mgmt.servicefabricmanagedclusters.operations.ManagedAzResiliencyStatusOperations
63- :ivar managed_maintenance_window_status: ManagedMaintenanceWindowStatusOperations operations
64- :vartype managed_maintenance_window_status:
65- azure.mgmt.servicefabricmanagedclusters.operations.ManagedMaintenanceWindowStatusOperations
66- :ivar managed_apply_maintenance_window: ManagedApplyMaintenanceWindowOperations operations
67- :vartype managed_apply_maintenance_window:
68- azure.mgmt.servicefabricmanagedclusters.operations.ManagedApplyMaintenanceWindowOperations
6958 :ivar managed_cluster_version: ManagedClusterVersionOperations operations
7059 :vartype managed_cluster_version:
7160 azure.mgmt.servicefabricmanagedclusters.operations.ManagedClusterVersionOperations
7261 :ivar managed_unsupported_vm_sizes: ManagedUnsupportedVMSizesOperations operations
7362 :vartype managed_unsupported_vm_sizes:
7463 azure.mgmt.servicefabricmanagedclusters.operations.ManagedUnsupportedVMSizesOperations
75- :ivar operation_status: OperationStatusOperations operations
76- :vartype operation_status:
77- azure.mgmt.servicefabricmanagedclusters.operations.OperationStatusOperations
78- :ivar operation_results: OperationResultsOperations operations
79- :vartype operation_results:
80- azure.mgmt.servicefabricmanagedclusters.operations.OperationResultsOperations
81- :ivar operations: Operations operations
82- :vartype operations: azure.mgmt.servicefabricmanagedclusters.operations.Operations
64+ :ivar managed_clusters: ManagedClustersOperations operations
65+ :vartype managed_clusters:
66+ azure.mgmt.servicefabricmanagedclusters.operations.ManagedClustersOperations
67+ :ivar managed_get_az_resiliency_status: ManagedGetAzResiliencyStatusOperations operations
68+ :vartype managed_get_az_resiliency_status:
69+ azure.mgmt.servicefabricmanagedclusters.operations.ManagedGetAzResiliencyStatusOperations
70+ :ivar managed_apply_maintenance_window: ManagedApplyMaintenanceWindowOperations operations
71+ :vartype managed_apply_maintenance_window:
72+ azure.mgmt.servicefabricmanagedclusters.operations.ManagedApplyMaintenanceWindowOperations
73+ :ivar managed_get_maintenance_window_status: ManagedGetMaintenanceWindowStatusOperations
74+ operations
75+ :vartype managed_get_maintenance_window_status:
76+ azure.mgmt.servicefabricmanagedclusters.operations.ManagedGetMaintenanceWindowStatusOperations
8377 :ivar node_types: NodeTypesOperations operations
8478 :vartype node_types: azure.mgmt.servicefabricmanagedclusters.operations.NodeTypesOperations
8579 :ivar node_type_skus: NodeTypeSkusOperations operations
8680 :vartype node_type_skus:
8781 azure.mgmt.servicefabricmanagedclusters.operations.NodeTypeSkusOperations
88- :param credential: Credential needed for the client to connect to Azure. Required.
82+ :ivar operation_results: OperationResultsOperations operations
83+ :vartype operation_results:
84+ azure.mgmt.servicefabricmanagedclusters.operations.OperationResultsOperations
85+ :ivar operation_status: OperationStatusOperations operations
86+ :vartype operation_status:
87+ azure.mgmt.servicefabricmanagedclusters.operations.OperationStatusOperations
88+ :param credential: Credential used to authenticate requests to the service. Required.
8989 :type credential: ~azure.core.credentials.TokenCredential
90- :param subscription_id: The customer subscription identifier . Required.
90+ :param subscription_id: The ID of the target subscription. The value must be an UUID . Required.
9191 :type subscription_id: str
92- :param base_url: Service URL . Default value is "https://management.azure.com".
92+ :param base_url: Service host . Default value is "https://management.azure.com".
9393 :type base_url: str
94- :keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
95- this default value may result in unsupported behavior.
94+ :keyword api_version: The API version to use for this operation. Default value is
95+ "2024-11-01-preview". Note that overriding this default value may result in unsupported
96+ behavior.
9697 :paramtype api_version: str
9798 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
9899 Retry-After header is present.
@@ -105,8 +106,9 @@ def __init__(
105106 base_url : str = "https://management.azure.com" ,
106107 ** kwargs : Any
107108 ) -> None :
108- self ._config = ServiceFabricManagedClustersManagementClientConfiguration (
109- credential = credential , subscription_id = subscription_id , ** kwargs
109+ _endpoint = "{endpoint}"
110+ self ._config = ServiceFabricClientConfiguration (
111+ credential = credential , subscription_id = subscription_id , base_url = base_url , ** kwargs
110112 )
111113 _policies = kwargs .pop ("policies" , None )
112114 if _policies is None :
@@ -126,55 +128,54 @@ def __init__(
126128 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
127129 self ._config .http_logging_policy ,
128130 ]
129- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
131+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = _endpoint , policies = _policies , ** kwargs )
130132
131- client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
132- self ._serialize = Serializer (client_models )
133- self ._deserialize = Deserializer (client_models )
133+ self ._serialize = Serializer ()
134+ self ._deserialize = Deserializer ()
134135 self ._serialize .client_side_validation = False
136+ self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
137+ self .applications = ApplicationsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
135138 self .application_types = ApplicationTypesOperations (
136139 self ._client , self ._config , self ._serialize , self ._deserialize
137140 )
138141 self .application_type_versions = ApplicationTypeVersionsOperations (
139142 self ._client , self ._config , self ._serialize , self ._deserialize
140143 )
141- self .applications = ApplicationsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
142144 self .services = ServicesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
143- self .managed_clusters = ManagedClustersOperations (
145+ self .managed_cluster_version = ManagedClusterVersionOperations (
144146 self ._client , self ._config , self ._serialize , self ._deserialize
145147 )
146- self .managed_az_resiliency_status = ManagedAzResiliencyStatusOperations (
148+ self .managed_unsupported_vm_sizes = ManagedUnsupportedVMSizesOperations (
147149 self ._client , self ._config , self ._serialize , self ._deserialize
148150 )
149- self .managed_maintenance_window_status = ManagedMaintenanceWindowStatusOperations (
151+ self .managed_clusters = ManagedClustersOperations (
150152 self ._client , self ._config , self ._serialize , self ._deserialize
151153 )
152- self .managed_apply_maintenance_window = ManagedApplyMaintenanceWindowOperations (
154+ self .managed_get_az_resiliency_status = ManagedGetAzResiliencyStatusOperations (
153155 self ._client , self ._config , self ._serialize , self ._deserialize
154156 )
155- self .managed_cluster_version = ManagedClusterVersionOperations (
157+ self .managed_apply_maintenance_window = ManagedApplyMaintenanceWindowOperations (
156158 self ._client , self ._config , self ._serialize , self ._deserialize
157159 )
158- self .managed_unsupported_vm_sizes = ManagedUnsupportedVMSizesOperations (
160+ self .managed_get_maintenance_window_status = ManagedGetMaintenanceWindowStatusOperations (
159161 self ._client , self ._config , self ._serialize , self ._deserialize
160162 )
161- self .operation_status = OperationStatusOperations (
163+ self .node_types = NodeTypesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
164+ self .node_type_skus = NodeTypeSkusOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
165+ self .operation_results = OperationResultsOperations (
162166 self ._client , self ._config , self ._serialize , self ._deserialize
163167 )
164- self .operation_results = OperationResultsOperations (
168+ self .operation_status = OperationStatusOperations (
165169 self ._client , self ._config , self ._serialize , self ._deserialize
166170 )
167- self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
168- self .node_types = NodeTypesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
169- self .node_type_skus = NodeTypeSkusOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
170171
171- def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
172+ def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
172173 """Runs the network request through the client's chained policies.
173174
174175 >>> from azure.core.rest import HttpRequest
175176 >>> request = HttpRequest("GET", "https://www.example.org/")
176177 <HttpRequest [GET], url: 'https://www.example.org/'>
177- >>> response = client._send_request (request)
178+ >>> response = client.send_request (request)
178179 <HttpResponse: 200 OK>
179180
180181 For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -187,7 +188,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
187188 """
188189
189190 request_copy = deepcopy (request )
190- request_copy .url = self ._client .format_url (request_copy .url )
191+ path_format_arguments = {
192+ "endpoint" : self ._serialize .url ("self._config.base_url" , self ._config .base_url , "str" , skip_quote = True ),
193+ }
194+
195+ request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
191196 return self ._client .send_request (request_copy , stream = stream , ** kwargs ) # type: ignore
192197
193198 def close (self ) -> None :
0 commit comments