2
2
# --------------------------------------------------------------------------
3
3
# Copyright (c) Microsoft Corporation. All rights reserved.
4
4
# Licensed under the MIT License. See License.txt in the project root for license information.
5
- # Code generated by Microsoft (R) Python Code Generator.
5
+ # Code generated by Microsoft (R) AutoRest Code Generator.
6
6
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
# --------------------------------------------------------------------------
8
8
15
15
from azure .mgmt .core import ARMPipelineClient
16
16
from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
17
17
18
- from ._configuration import HealthDataAIServicesMgmtClientConfiguration
18
+ from . import models as _models
19
+ from ._configuration import MicrosoftHealthDataAIServicesConfiguration
19
20
from ._serialization import Deserializer , Serializer
20
21
from .operations import DeidServicesOperations , Operations , PrivateEndpointConnectionsOperations , PrivateLinksOperations
21
22
22
23
if TYPE_CHECKING :
23
24
from azure .core .credentials import TokenCredential
24
25
25
26
26
- class HealthDataAIServicesMgmtClient :
27
- """HealthDataAIServicesMgmtClient .
27
+ class MicrosoftHealthDataAIServices :
28
+ """MicrosoftHealthDataAIServices .
28
29
29
30
:ivar operations: Operations operations
30
31
:vartype operations: azure.mgmt.healthdataaiservices.operations.Operations
@@ -35,14 +36,14 @@ class HealthDataAIServicesMgmtClient:
35
36
azure.mgmt.healthdataaiservices.operations.PrivateEndpointConnectionsOperations
36
37
:ivar private_links: PrivateLinksOperations operations
37
38
:vartype private_links: azure.mgmt.healthdataaiservices.operations.PrivateLinksOperations
38
- :param credential: Credential used to authenticate requests to the service . Required.
39
+ :param credential: Credential needed for the client to connect to Azure . Required.
39
40
:type credential: ~azure.core.credentials.TokenCredential
40
41
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
41
42
:type subscription_id: str
42
- :param base_url: Service host . Default value is "https://management.azure.com".
43
+ :param base_url: Service URL . Default value is "https://management.azure.com".
43
44
:type base_url: str
44
- :keyword api_version: The API version to use for this operation . Default value is "2024-09-20".
45
- Note that overriding this default value may result in unsupported behavior.
45
+ :keyword api_version: Api Version . Default value is "2024-09-20". Note that overriding this
46
+ default value may result in unsupported behavior.
46
47
:paramtype api_version: str
47
48
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
48
49
Retry-After header is present.
@@ -55,9 +56,8 @@ def __init__(
55
56
base_url : str = "https://management.azure.com" ,
56
57
** kwargs : Any
57
58
) -> None :
58
- _endpoint = "{endpoint}"
59
- self ._config = HealthDataAIServicesMgmtClientConfiguration (
60
- credential = credential , subscription_id = subscription_id , base_url = base_url , ** kwargs
59
+ self ._config = MicrosoftHealthDataAIServicesConfiguration (
60
+ credential = credential , subscription_id = subscription_id , ** kwargs
61
61
)
62
62
_policies = kwargs .pop ("policies" , None )
63
63
if _policies is None :
@@ -77,10 +77,11 @@ def __init__(
77
77
policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
78
78
self ._config .http_logging_policy ,
79
79
]
80
- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = _endpoint , policies = _policies , ** kwargs )
80
+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
81
81
82
- self ._serialize = Serializer ()
83
- self ._deserialize = Deserializer ()
82
+ client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
83
+ self ._serialize = Serializer (client_models )
84
+ self ._deserialize = Deserializer (client_models )
84
85
self ._serialize .client_side_validation = False
85
86
self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
86
87
self .deid_services = DeidServicesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
@@ -89,13 +90,13 @@ def __init__(
89
90
)
90
91
self .private_links = PrivateLinksOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
91
92
92
- def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
93
+ def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
93
94
"""Runs the network request through the client's chained policies.
94
95
95
96
>>> from azure.core.rest import HttpRequest
96
97
>>> request = HttpRequest("GET", "https://www.example.org/")
97
98
<HttpRequest [GET], url: 'https://www.example.org/'>
98
- >>> response = client.send_request (request)
99
+ >>> response = client._send_request (request)
99
100
<HttpResponse: 200 OK>
100
101
101
102
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -108,11 +109,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
108
109
"""
109
110
110
111
request_copy = deepcopy (request )
111
- path_format_arguments = {
112
- "endpoint" : self ._serialize .url ("self._config.base_url" , self ._config .base_url , "str" , skip_quote = True ),
113
- }
114
-
115
- request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
112
+ request_copy .url = self ._client .format_url (request_copy .url )
116
113
return self ._client .send_request (request_copy , stream = stream , ** kwargs ) # type: ignore
117
114
118
115
def close (self ) -> None :
0 commit comments