99from copy import deepcopy
1010from typing import Any , TYPE_CHECKING
1111
12- from msrest import Deserializer , Serializer
13-
1412from azure .core .rest import HttpRequest , HttpResponse
1513from azure .mgmt .core import ARMPipelineClient
1614
1715from . import models
1816from ._configuration import CognitiveServicesManagementClientConfiguration
19- from .operations import AccountsOperations , CognitiveServicesManagementClientOperationsMixin , CommitmentPlansOperations , CommitmentTiersOperations , DeletedAccountsOperations , DeploymentsOperations , Operations , PrivateEndpointConnectionsOperations , PrivateLinkResourcesOperations , ResourceSkusOperations
17+ from ._serialization import Deserializer , Serializer
18+ from .operations import (
19+ AccountsOperations ,
20+ CognitiveServicesManagementClientOperationsMixin ,
21+ CommitmentPlansOperations ,
22+ CommitmentTiersOperations ,
23+ DeletedAccountsOperations ,
24+ DeploymentsOperations ,
25+ Operations ,
26+ PrivateEndpointConnectionsOperations ,
27+ PrivateLinkResourcesOperations ,
28+ ResourceSkusOperations ,
29+ )
2030
2131if TYPE_CHECKING :
2232 # pylint: disable=unused-import,ungrouped-imports
2333 from azure .core .credentials import TokenCredential
2434
25- class CognitiveServicesManagementClient (CognitiveServicesManagementClientOperationsMixin ): # pylint: disable=too-many-instance-attributes
35+
36+ class CognitiveServicesManagementClient (
37+ CognitiveServicesManagementClientOperationsMixin
38+ ): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
2639 """Cognitive Services Management Client.
2740
2841 :ivar accounts: AccountsOperations operations
@@ -45,13 +58,13 @@ class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperati
4558 :vartype deployments: azure.mgmt.cognitiveservices.operations.DeploymentsOperations
4659 :ivar commitment_plans: CommitmentPlansOperations operations
4760 :vartype commitment_plans: azure.mgmt.cognitiveservices.operations.CommitmentPlansOperations
48- :param credential: Credential needed for the client to connect to Azure.
61+ :param credential: Credential needed for the client to connect to Azure. Required.
4962 :type credential: ~azure.core.credentials.TokenCredential
50- :param subscription_id: The ID of the target subscription.
63+ :param subscription_id: The ID of the target subscription. Required.
5164 :type subscription_id: str
5265 :param base_url: Service URL. Default value is "https://management.azure.com".
5366 :type base_url: str
54- :keyword api_version: Api Version. Default value is "2022-03 -01". Note that overriding this
67+ :keyword api_version: Api Version. Default value is "2022-10 -01". Note that overriding this
5568 default value may result in unsupported behavior.
5669 :paramtype api_version: str
5770 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -65,29 +78,36 @@ def __init__(
6578 base_url : str = "https://management.azure.com" ,
6679 ** kwargs : Any
6780 ) -> None :
68- self ._config = CognitiveServicesManagementClientConfiguration (credential = credential , subscription_id = subscription_id , ** kwargs )
81+ self ._config = CognitiveServicesManagementClientConfiguration (
82+ credential = credential , subscription_id = subscription_id , ** kwargs
83+ )
6984 self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
7085
7186 client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
7287 self ._serialize = Serializer (client_models )
7388 self ._deserialize = Deserializer (client_models )
7489 self ._serialize .client_side_validation = False
7590 self .accounts = AccountsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
76- self .deleted_accounts = DeletedAccountsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
91+ self .deleted_accounts = DeletedAccountsOperations (
92+ self ._client , self ._config , self ._serialize , self ._deserialize
93+ )
7794 self .resource_skus = ResourceSkusOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
7895 self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
79- self .commitment_tiers = CommitmentTiersOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
80- self .private_endpoint_connections = PrivateEndpointConnectionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
81- self .private_link_resources = PrivateLinkResourcesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
96+ self .commitment_tiers = CommitmentTiersOperations (
97+ self ._client , self ._config , self ._serialize , self ._deserialize
98+ )
99+ self .private_endpoint_connections = PrivateEndpointConnectionsOperations (
100+ self ._client , self ._config , self ._serialize , self ._deserialize
101+ )
102+ self .private_link_resources = PrivateLinkResourcesOperations (
103+ self ._client , self ._config , self ._serialize , self ._deserialize
104+ )
82105 self .deployments = DeploymentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
83- self .commitment_plans = CommitmentPlansOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
84-
106+ self .commitment_plans = CommitmentPlansOperations (
107+ self ._client , self ._config , self ._serialize , self ._deserialize
108+ )
85109
86- def _send_request (
87- self ,
88- request : HttpRequest ,
89- ** kwargs : Any
90- ) -> HttpResponse :
110+ def _send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
91111 """Runs the network request through the client's chained policies.
92112
93113 >>> from azure.core.rest import HttpRequest
@@ -96,7 +116,7 @@ def _send_request(
96116 >>> response = client._send_request(request)
97117 <HttpResponse: 200 OK>
98118
99- For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
119+ For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/ python/send_request
100120
101121 :param request: The network request you want to make. Required.
102122 :type request: ~azure.core.rest.HttpRequest
0 commit comments