Skip to content

Commit 6972921

Browse files
committed
regenerate with latest swagger
1 parent 0030ab7 commit 6972921

29 files changed

+14953
-6214
lines changed

sdk/purview/azure-purview-catalog/azure/purview/catalog/_azure_purview_catalog_client.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
if TYPE_CHECKING:
1717
# pylint: disable=unused-import,ungrouped-imports
18-
from typing import Any, Dict, Optional
18+
from typing import Any, Dict
1919

2020
from azure.core.credentials import TokenCredential
2121
from azure.purview.catalog.core.rest import HttpRequest
@@ -44,6 +44,7 @@ def __init__(
4444
self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs)
4545

4646
self._serialize = Serializer()
47+
self._deserialize = Deserializer()
4748
self._serialize.client_side_validation = False
4849

4950
def send_request(self, http_request, **kwargs):
@@ -54,7 +55,7 @@ def send_request(self, http_request, **kwargs):
5455
Use these helper methods to create the request you pass to this method. See our example below:
5556
5657
>>> from azure.purview.catalog.rest import build_create_or_update_request
57-
>>> request = build_create_or_update_request(json, content, api_version)
58+
>>> request = build_create_or_update_request(json, content)
5859
<HttpRequest [POST], url: '/atlas/v2/entity'>
5960
>>> response = client.send_request(request)
6061
<HttpResponse: 200 OK>
@@ -77,7 +78,7 @@ def send_request(self, http_request, **kwargs):
7778
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
7879
if kwargs.pop("stream_response", False):
7980
return _StreamContextManager(
80-
client=self._client,
81+
client=self._client._pipeline,
8182
request=request_copy,
8283
)
8384
pipeline_response = self._client._pipeline.run(request_copy._internal_request, **kwargs)

sdk/purview/azure-purview-catalog/azure/purview/catalog/_configuration.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
if TYPE_CHECKING:
1717
# pylint: disable=unused-import,ungrouped-imports
18-
from typing import Any, Optional
18+
from typing import Any
1919

2020
from azure.core.credentials import TokenCredential
2121

@@ -47,6 +47,7 @@ def __init__(
4747

4848
self.credential = credential
4949
self.endpoint = endpoint
50+
self.api_version = "2021-05-01-preview"
5051
self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default'])
5152
kwargs.setdefault('sdk_moniker', 'purview-catalog/{}'.format(VERSION))
5253
self._configure(**kwargs)

sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_azure_purview_catalog_client.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Optional, TYPE_CHECKING
10+
from typing import Any, TYPE_CHECKING
1111

1212
from azure.core import AsyncPipelineClient
1313
from azure.purview.catalog.core.rest import AsyncHttpResponse, HttpRequest, _AsyncStreamContextManager
@@ -42,6 +42,7 @@ def __init__(
4242
self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs)
4343

4444
self._serialize = Serializer()
45+
self._deserialize = Deserializer()
4546
self._serialize.client_side_validation = False
4647

4748
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
5152
Use these helper methods to create the request you pass to this method. See our example below:
5253
5354
>>> 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)
5556
<HttpRequest [POST], url: '/atlas/v2/entity'>
5657
>>> response = await client.send_request(request)
5758
<AsyncHttpResponse: 200 OK>
@@ -74,7 +75,7 @@ async def send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncH
7475
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
7576
if kwargs.pop("stream_response", False):
7677
return _AsyncStreamContextManager(
77-
client=self._client,
78+
client=self._client._pipeline,
7879
request=request_copy,
7980
)
8081
pipeline_response = await self._client._pipeline.run(request_copy._internal_request, **kwargs)

sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_configuration.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from typing import Any, Optional, TYPE_CHECKING
9+
from typing import Any, TYPE_CHECKING
1010

1111
from azure.core.configuration import Configuration
1212
from azure.core.pipeline import policies
@@ -44,6 +44,7 @@ def __init__(
4444

4545
self.credential = credential
4646
self.endpoint = endpoint
47+
self.api_version = "2021-05-01-preview"
4748
self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default'])
4849
kwargs.setdefault('sdk_moniker', 'purview-catalog/{}'.format(VERSION))
4950
self._configure(**kwargs)

sdk/purview/azure-purview-catalog/azure/purview/catalog/rest/discovery_rest/__init__.py renamed to sdk/purview/azure-purview-catalog/azure/purview/catalog/rest/discovery/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
# --------------------------------------------------------------------------
88

99
try:
10-
from ._request_builders_py3 import build_search_advanced_request
10+
from ._request_builders_py3 import build_query_request
1111
from ._request_builders_py3 import build_suggest_request
1212
from ._request_builders_py3 import build_auto_complete_request
1313
except (SyntaxError, ImportError):
14-
from ._request_builders import build_search_advanced_request # type: ignore
14+
from ._request_builders import build_query_request # type: ignore
1515
from ._request_builders import build_suggest_request # type: ignore
1616
from ._request_builders import build_auto_complete_request # type: ignore
1717

1818
__all__ = [
19-
'build_search_advanced_request',
19+
'build_query_request',
2020
'build_suggest_request',
2121
'build_auto_complete_request',
2222
]

0 commit comments

Comments
 (0)