1212from typing import Any , AsyncIterable , AsyncIterator , Callable , Dict , IO , List , Optional , TypeVar , Union , cast , overload
1313import urllib .parse
1414
15+ from azure .core import AsyncPipelineClient
1516from azure .core .async_paging import AsyncItemPaged , AsyncList
1617from azure .core .exceptions import (
1718 ClientAuthenticationError ,
3334from azure .mgmt .core .polling .async_arm_polling import AsyncARMPolling
3435
3536from ... import models as _models
36- from ..._model_base import SdkJSONEncoder , _deserialize
37+ from ..._model_base import SdkJSONEncoder , _deserialize , _failsafe_deserialize
38+ from ..._serialization import Deserializer , Serializer
3739from ...operations ._operations import (
3840 build_deid_services_create_request ,
3941 build_deid_services_delete_request ,
4850 build_private_endpoint_connections_list_by_deid_service_request ,
4951 build_private_links_list_by_deid_service_request ,
5052)
53+ from .._configuration import HealthDataAIServicesMgmtClientConfiguration
5154
5255if sys .version_info >= (3 , 9 ):
5356 from collections .abc import MutableMapping
@@ -70,10 +73,12 @@ class Operations:
7073
7174 def __init__ (self , * args , ** kwargs ) -> None :
7275 input_args = list (args )
73- self ._client = input_args .pop (0 ) if input_args else kwargs .pop ("client" )
74- self ._config = input_args .pop (0 ) if input_args else kwargs .pop ("config" )
75- self ._serialize = input_args .pop (0 ) if input_args else kwargs .pop ("serializer" )
76- self ._deserialize = input_args .pop (0 ) if input_args else kwargs .pop ("deserializer" )
76+ self ._client : AsyncPipelineClient = input_args .pop (0 ) if input_args else kwargs .pop ("client" )
77+ self ._config : HealthDataAIServicesMgmtClientConfiguration = (
78+ input_args .pop (0 ) if input_args else kwargs .pop ("config" )
79+ )
80+ self ._serialize : Serializer = input_args .pop (0 ) if input_args else kwargs .pop ("serializer" )
81+ self ._deserialize : Deserializer = input_args .pop (0 ) if input_args else kwargs .pop ("deserializer" )
7782
7883 @distributed_trace
7984 def list (self , ** kwargs : Any ) -> AsyncIterable ["_models.Operation" ]:
@@ -152,7 +157,7 @@ async def get_next(next_link=None):
152157
153158 if response .status_code not in [200 ]:
154159 map_error (status_code = response .status_code , response = response , error_map = error_map )
155- error = _deserialize (_models .ErrorResponse , response .json ())
160+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
156161 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
157162
158163 return pipeline_response
@@ -172,10 +177,12 @@ class DeidServicesOperations:
172177
173178 def __init__ (self , * args , ** kwargs ) -> None :
174179 input_args = list (args )
175- self ._client = input_args .pop (0 ) if input_args else kwargs .pop ("client" )
176- self ._config = input_args .pop (0 ) if input_args else kwargs .pop ("config" )
177- self ._serialize = input_args .pop (0 ) if input_args else kwargs .pop ("serializer" )
178- self ._deserialize = input_args .pop (0 ) if input_args else kwargs .pop ("deserializer" )
180+ self ._client : AsyncPipelineClient = input_args .pop (0 ) if input_args else kwargs .pop ("client" )
181+ self ._config : HealthDataAIServicesMgmtClientConfiguration = (
182+ input_args .pop (0 ) if input_args else kwargs .pop ("config" )
183+ )
184+ self ._serialize : Serializer = input_args .pop (0 ) if input_args else kwargs .pop ("serializer" )
185+ self ._deserialize : Deserializer = input_args .pop (0 ) if input_args else kwargs .pop ("deserializer" )
179186
180187 @distributed_trace_async
181188 async def get (self , resource_group_name : str , deid_service_name : str , ** kwargs : Any ) -> _models .DeidService :
@@ -230,7 +237,7 @@ async def get(self, resource_group_name: str, deid_service_name: str, **kwargs:
230237 except (StreamConsumedError , StreamClosedError ):
231238 pass
232239 map_error (status_code = response .status_code , response = response , error_map = error_map )
233- error = _deserialize (_models .ErrorResponse , response .json ())
240+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
234241 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
235242
236243 if _stream :
@@ -325,7 +332,7 @@ async def get_next(next_link=None):
325332
326333 if response .status_code not in [200 ]:
327334 map_error (status_code = response .status_code , response = response , error_map = error_map )
328- error = _deserialize (_models .ErrorResponse , response .json ())
335+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
329336 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
330337
331338 return pipeline_response
@@ -410,7 +417,7 @@ async def get_next(next_link=None):
410417
411418 if response .status_code not in [200 ]:
412419 map_error (status_code = response .status_code , response = response , error_map = error_map )
413- error = _deserialize (_models .ErrorResponse , response .json ())
420+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
414421 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
415422
416423 return pipeline_response
@@ -473,7 +480,7 @@ async def _create_initial(
473480 except (StreamConsumedError , StreamClosedError ):
474481 pass
475482 map_error (status_code = response .status_code , response = response , error_map = error_map )
476- error = _deserialize (_models .ErrorResponse , response .json ())
483+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
477484 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
478485
479486 response_headers = {}
@@ -705,7 +712,7 @@ async def _update_initial(
705712 except (StreamConsumedError , StreamClosedError ):
706713 pass
707714 map_error (status_code = response .status_code , response = response , error_map = error_map )
708- error = _deserialize (_models .ErrorResponse , response .json ())
715+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
709716 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
710717
711718 response_headers = {}
@@ -921,7 +928,7 @@ async def _delete_initial(
921928 except (StreamConsumedError , StreamClosedError ):
922929 pass
923930 map_error (status_code = response .status_code , response = response , error_map = error_map )
924- error = _deserialize (_models .ErrorResponse , response .json ())
931+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
925932 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
926933
927934 response_headers = {}
@@ -1008,10 +1015,12 @@ class PrivateEndpointConnectionsOperations:
10081015
10091016 def __init__ (self , * args , ** kwargs ) -> None :
10101017 input_args = list (args )
1011- self ._client = input_args .pop (0 ) if input_args else kwargs .pop ("client" )
1012- self ._config = input_args .pop (0 ) if input_args else kwargs .pop ("config" )
1013- self ._serialize = input_args .pop (0 ) if input_args else kwargs .pop ("serializer" )
1014- self ._deserialize = input_args .pop (0 ) if input_args else kwargs .pop ("deserializer" )
1018+ self ._client : AsyncPipelineClient = input_args .pop (0 ) if input_args else kwargs .pop ("client" )
1019+ self ._config : HealthDataAIServicesMgmtClientConfiguration = (
1020+ input_args .pop (0 ) if input_args else kwargs .pop ("config" )
1021+ )
1022+ self ._serialize : Serializer = input_args .pop (0 ) if input_args else kwargs .pop ("serializer" )
1023+ self ._deserialize : Deserializer = input_args .pop (0 ) if input_args else kwargs .pop ("deserializer" )
10151024
10161025 @distributed_trace_async
10171026 async def get (
@@ -1073,7 +1082,7 @@ async def get(
10731082 except (StreamConsumedError , StreamClosedError ):
10741083 pass
10751084 map_error (status_code = response .status_code , response = response , error_map = error_map )
1076- error = _deserialize (_models .ErrorResponse , response .json ())
1085+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
10771086 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
10781087
10791088 if _stream :
@@ -1144,7 +1153,7 @@ async def _create_initial(
11441153 except (StreamConsumedError , StreamClosedError ):
11451154 pass
11461155 map_error (status_code = response .status_code , response = response , error_map = error_map )
1147- error = _deserialize (_models .ErrorResponse , response .json ())
1156+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
11481157 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
11491158
11501159 response_headers = {}
@@ -1385,7 +1394,7 @@ async def _delete_initial(
13851394 except (StreamConsumedError , StreamClosedError ):
13861395 pass
13871396 map_error (status_code = response .status_code , response = response , error_map = error_map )
1388- error = _deserialize (_models .ErrorResponse , response .json ())
1397+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
13891398 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
13901399
13911400 response_headers = {}
@@ -1551,7 +1560,7 @@ async def get_next(next_link=None):
15511560
15521561 if response .status_code not in [200 ]:
15531562 map_error (status_code = response .status_code , response = response , error_map = error_map )
1554- error = _deserialize (_models .ErrorResponse , response .json ())
1563+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
15551564 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
15561565
15571566 return pipeline_response
@@ -1571,16 +1580,18 @@ class PrivateLinksOperations:
15711580
15721581 def __init__ (self , * args , ** kwargs ) -> None :
15731582 input_args = list (args )
1574- self ._client = input_args .pop (0 ) if input_args else kwargs .pop ("client" )
1575- self ._config = input_args .pop (0 ) if input_args else kwargs .pop ("config" )
1576- self ._serialize = input_args .pop (0 ) if input_args else kwargs .pop ("serializer" )
1577- self ._deserialize = input_args .pop (0 ) if input_args else kwargs .pop ("deserializer" )
1583+ self ._client : AsyncPipelineClient = input_args .pop (0 ) if input_args else kwargs .pop ("client" )
1584+ self ._config : HealthDataAIServicesMgmtClientConfiguration = (
1585+ input_args .pop (0 ) if input_args else kwargs .pop ("config" )
1586+ )
1587+ self ._serialize : Serializer = input_args .pop (0 ) if input_args else kwargs .pop ("serializer" )
1588+ self ._deserialize : Deserializer = input_args .pop (0 ) if input_args else kwargs .pop ("deserializer" )
15781589
15791590 @distributed_trace
15801591 def list_by_deid_service (
15811592 self , resource_group_name : str , deid_service_name : str , ** kwargs : Any
15821593 ) -> AsyncIterable ["_models.PrivateLinkResource" ]:
1583- """List private links on the given resource.
1594+ """List private links on the given resource. Test changes.
15841595
15851596 :param resource_group_name: The name of the resource group. The name is case insensitive.
15861597 Required.
@@ -1663,7 +1674,7 @@ async def get_next(next_link=None):
16631674
16641675 if response .status_code not in [200 ]:
16651676 map_error (status_code = response .status_code , response = response , error_map = error_map )
1666- error = _deserialize (_models .ErrorResponse , response .json ())
1677+ error = _failsafe_deserialize (_models .ErrorResponse , response .json ())
16671678 raise HttpResponseError (response = response , model = error , error_format = ARMErrorFormat )
16681679
16691680 return pipeline_response
0 commit comments