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
9
9
from copy import deepcopy
10
10
from typing import Any , TYPE_CHECKING
11
+ from typing_extensions import Self
11
12
12
13
from azure .core .pipeline import policies
13
14
from azure .core .rest import HttpRequest , HttpResponse
14
15
from azure .mgmt .core import ARMPipelineClient
15
16
from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
16
17
18
+ from . import models as _models
17
19
from ._configuration import InformaticaDataMgmtClientConfiguration
18
20
from ._serialization import Deserializer , Serializer
19
21
from .operations import Operations , OrganizationsOperations , ServerlessRuntimesOperations
@@ -33,14 +35,14 @@ class InformaticaDataMgmtClient: # pylint: disable=client-accepts-api-version-k
33
35
:ivar serverless_runtimes: ServerlessRuntimesOperations operations
34
36
:vartype serverless_runtimes:
35
37
azure.mgmt.informaticadatamanagement.operations.ServerlessRuntimesOperations
36
- :param credential: Credential used to authenticate requests to the service . Required.
38
+ :param credential: Credential needed for the client to connect to Azure . Required.
37
39
:type credential: ~azure.core.credentials.TokenCredential
38
40
:param subscription_id: The ID of the target subscription. Required.
39
41
:type subscription_id: str
40
- :param base_url: Service host . Default value is "https://management.azure.com".
42
+ :param base_url: Service URL . Default value is "https://management.azure.com".
41
43
:type base_url: str
42
- :keyword api_version: The API version to use for this operation . Default value is "2024-05-08".
43
- Note that overriding this default value may result in unsupported behavior.
44
+ :keyword api_version: Api Version . Default value is "2024-05-08". Note that overriding this
45
+ default value may result in unsupported behavior.
44
46
:paramtype api_version: str
45
47
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
46
48
Retry-After header is present.
@@ -76,22 +78,23 @@ def __init__(
76
78
]
77
79
self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
78
80
79
- self ._serialize = Serializer ()
80
- self ._deserialize = Deserializer ()
81
+ client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
82
+ self ._serialize = Serializer (client_models )
83
+ self ._deserialize = Deserializer (client_models )
81
84
self ._serialize .client_side_validation = False
82
85
self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
83
86
self .organizations = OrganizationsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
84
87
self .serverless_runtimes = ServerlessRuntimesOperations (
85
88
self ._client , self ._config , self ._serialize , self ._deserialize
86
89
)
87
90
88
- def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
91
+ def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
89
92
"""Runs the network request through the client's chained policies.
90
93
91
94
>>> from azure.core.rest import HttpRequest
92
95
>>> request = HttpRequest("GET", "https://www.example.org/")
93
96
<HttpRequest [GET], url: 'https://www.example.org/'>
94
- >>> response = client.send_request (request)
97
+ >>> response = client._send_request (request)
95
98
<HttpResponse: 200 OK>
96
99
97
100
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -110,7 +113,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
110
113
def close (self ) -> None :
111
114
self ._client .close ()
112
115
113
- def __enter__ (self ) -> "InformaticaDataMgmtClient" :
116
+ def __enter__ (self ) -> Self :
114
117
self ._client .__enter__ ()
115
118
return self
116
119
0 commit comments