7
7
# --------------------------------------------------------------------------
8
8
9
9
from copy import deepcopy
10
- from typing import Any , Optional , TYPE_CHECKING
10
+ from typing import Any , TYPE_CHECKING
11
11
12
12
from azure .core import AsyncPipelineClient
13
13
from azure .purview .catalog .core .rest import AsyncHttpResponse , HttpRequest , _AsyncStreamContextManager
@@ -42,6 +42,7 @@ def __init__(
42
42
self ._client = AsyncPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
43
43
44
44
self ._serialize = Serializer ()
45
+ self ._deserialize = Deserializer ()
45
46
self ._serialize .client_side_validation = False
46
47
47
48
async def send_request (self , http_request : HttpRequest , ** kwargs : Any ) -> AsyncHttpResponse :
@@ -51,7 +52,7 @@ async def send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncH
51
52
Use these helper methods to create the request you pass to this method. See our example below:
52
53
53
54
>>> from azure.purview.catalog.rest import build_create_or_update_request
54
- >>> request = build_create_or_update_request(json, content, api_version )
55
+ >>> request = build_create_or_update_request(json, content)
55
56
<HttpRequest [POST], url: '/atlas/v2/entity'>
56
57
>>> response = await client.send_request(request)
57
58
<AsyncHttpResponse: 200 OK>
@@ -74,7 +75,7 @@ async def send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncH
74
75
request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
75
76
if kwargs .pop ("stream_response" , False ):
76
77
return _AsyncStreamContextManager (
77
- client = self ._client ,
78
+ client = self ._client . _pipeline ,
78
79
request = request_copy ,
79
80
)
80
81
pipeline_response = await self ._client ._pipeline .run (request_copy ._internal_request , ** kwargs )
0 commit comments